@@ -13,53 +13,60 @@ expr:
13
13
;
14
14
15
15
single :
16
- nucleotide_mutation
16
+ nucleotide_mutation_query
17
17
| pangolineage_query
18
18
| n_of_query
19
- | nucleotide_insertion
20
- | aa_mutation
21
- | aa_insertion
19
+ | nucleotide_insertion_query
20
+ | aa_mutation_query
21
+ | aa_insertion_query
22
22
| nextclade_pangolineage_query
23
23
| nextstrain_clade_lineage_query
24
24
| gisaid_clade_lineage_query
25
25
;
26
26
27
- nucleotide_mutation : nucleotide_symbol? position ambigous_nucleotide_symbol?;
27
+ nucleotide_mutation_query : nucleotide_mutation_query_first_symbol? position nucleotide_mutation_query_second_symbol?;
28
+ nucleotide_mutation_query_first_symbol : nucleotide_symbol;
29
+ nucleotide_mutation_query_second_symbol : possible_ambigous_nucleotide_symbol;
28
30
position : NUMBER +;
29
31
nucleotide_symbol : A | C | G | T ;
30
- ambigous_nucleotide_symbol : nucleotide_symbol | M | R | W | S | Y | K | V | H | D | B | N | MINUS | DOT ;
32
+ ambigous_nucleotide_symbol : M | R | W | S | Y | K | V | H | D | B | N | MINUS | DOT ;
33
+ possible_ambigous_nucleotide_symbol : nucleotide_symbol | ambigous_nucleotide_symbol;
34
+
31
35
32
36
pangolineage_query : pangolineage pangolineage_include_sublineages?;
33
37
pangolineage : pangolineage_character pangolineage_character? pangolineage_character? pangolineage_number_component*;
34
38
pangolineage_character : A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z ;
35
39
pangolineage_number_component : ' .' NUMBER NUMBER ? NUMBER ?;
36
40
pangolineage_include_sublineages : DOT ? ASTERISK ;
37
41
38
- n_of_query : ' [' n_of_match_exactly? n_of_number_of_matchers ' -of:' n_of_exprs ' ]' ;
39
- n_of_match_exactly : ' EXACTLY-' ;
42
+ n_of_query : ' [' n_of_match_exactly? n_of_number_of_matchers no_of_of_keyword n_of_exprs ' ]' ;
43
+ no_of_of_keyword : ' -of:' | ' -OF:' ;
44
+ n_of_match_exactly : ' EXACTLY-' | ' exactly-' ;
40
45
n_of_number_of_matchers : NUMBER +;
41
46
n_of_exprs : expr (' ,' expr)*;
42
47
43
- nucleotide_insertion : ' ins_' position ' :' (ambigous_nucleotide_symbol | ' ?' )+;
48
+ nucleotide_insertion_query : insertion_keyword position ' :' (possible_ambigous_nucleotide_symbol | ' ?' )+;
49
+ insertion_keyword : ' ins_' | ' INS_' ;
44
50
45
- aa_mutation : gene ' :' aa_symbol? position ambigous_aa_symbol ?;
51
+ aa_mutation_query : gene ' :' aa_symbol? position possible_ambigous_aa_symbol ?;
46
52
aa_symbol : A | R | N | D | C | E | Q | G | H | I | L | K | M | F | P | S | T | W | Y | V | ASTERISK ;
47
- ambigous_aa_symbol : aa_symbol | X | MINUS | DOT ;
53
+ ambigous_aa_symbol : X | MINUS | DOT ;
54
+ possible_ambigous_aa_symbol : aa_symbol | ambigous_aa_symbol;
48
55
gene : covid_gene;
49
56
covid_gene : E | M | N | S | ORF ;
50
57
51
- aa_insertion : ' ins_ ' gene ' :' (ambigous_aa_symbol | ' ?' )+;
58
+ aa_insertion_query : insertion_keyword gene ' : ' position ' :' (possible_ambigous_aa_symbol | ' ?' )+;
52
59
53
60
nextclade_pangolineage_query : nextclade_pango_lineage_prefix pangolineage_query;
54
- nextclade_pango_lineage_prefix : ' nextcladePangoLineage:' ;
61
+ nextclade_pango_lineage_prefix : ' nextcladePangoLineage:' | ' NEXTCLADEPANGOLINEAGE: ' ;
55
62
56
63
nextstrain_clade_lineage_query : nextstrain_clade_prefix nextstrain_clade_query;
57
- nextstrain_clade_prefix : ' nextstrainClade:' ;
64
+ nextstrain_clade_prefix : ' nextstrainClade:' | ' NEXTSTRAINCLADE: ' ;
58
65
nextstrain_clade_query : NUMBER NUMBER nextstrain_clade_character | ' RECOMBINANT' ;
59
66
nextstrain_clade_character : A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z ;
60
67
61
68
gisaid_clade_lineage_query : gisaid_clade_prefix gisaid_clade_query;
62
- gisaid_clade_prefix : ' gisaid:' ;
69
+ gisaid_clade_prefix : ( ' gisaid:' | ' GISAID: ' ) ;
63
70
gisaid_clade_query : gisaid_clade_character gisaid_clade_character?;
64
71
gisaid_clade_character : A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z ;
65
72
0 commit comments