1 | // Refactoring of LL(1) Grammar for Xapian
|
---|
2 |
|
---|
3 | // Symbols:
|
---|
4 | // 0 $ 10 HATE_AFTER_AND 20 BRA 30 stop_prob
|
---|
5 | // 1 ERROR 11 SYNONYM 21 KET 31 stop_term
|
---|
6 | // 2 OR 12 TERM 22 EMPTY_GROUP_OK 32 compound_term
|
---|
7 | // 3 XOR 13 GROUP_TERM 23 error 33 phrase
|
---|
8 | // 4 AND 14 PHR_TERM 24 query 34 phrased_term
|
---|
9 | // 5 NOT 15 WILD_TERM 25 expr 35 group
|
---|
10 | // 6 NEAR 16 PARTIAL_TERM 26 prob_expr 36 near_expr
|
---|
11 | // 7 ADJ 17 BOOLEAN_FILTER 27 bool_arg 37 adj_expr
|
---|
12 | // 8 PLUS 18 RANGE 28 prob
|
---|
13 | // 9 MINUS 19 QUOTE 29 term
|
---|
14 |
|
---|
15 | query ::= expr.
|
---|
16 | query ::=.
|
---|
17 |
|
---|
18 | expr ::= binop.
|
---|
19 | expr ::= unop.
|
---|
20 | expr ::= prob.
|
---|
21 | expr ::= term.
|
---|
22 |
|
---|
23 | binop ::= expr AND expr.
|
---|
24 | binop ::= expr OR expr.
|
---|
25 | binop ::= expr XOR expr.
|
---|
26 | binop ::= expr PLUS expr.
|
---|
27 | binop ::= expr MINUS expr.
|
---|
28 |
|
---|
29 | unop ::= MINUS expr. [UMINUS]
|
---|
30 | unop ::= PLUS expr. [UPLUS]
|
---|
31 | unop ::= NOT expr.
|
---|
32 |
|
---|
33 | prob ::= term.
|
---|
34 | prob ::= term prob.
|
---|
35 | prob ::= BOOLEAN_FILTER.
|
---|
36 |
|
---|
37 | term ::= TERM.
|
---|
38 | term ::= RANGE.
|
---|
39 | term ::= compound_term.
|
---|
40 |
|
---|
41 | compound_term ::= WILD_TERM.
|
---|
42 | compound_term ::= PARTIAL_TERM.
|
---|
43 | compound_term ::= QUOTE phrase QUOTE.
|
---|
44 | compound_term ::= phrased_term.
|
---|
45 | compound_term ::= group.
|
---|
46 | compound_term ::= near_expr.
|
---|
47 | compound_term ::= adj_expr.
|
---|
48 | compound_term ::= BRA expr KET.
|
---|
49 | compound_term ::= SYNONYM TERM.
|
---|
50 |
|
---|
51 | phrase ::= TERM phrase.
|
---|
52 | phrase ::= TERM.
|
---|
53 |
|
---|
54 | phrased_term ::= TERM PHR_TERM.
|
---|
55 | phrased_term ::= PHR_TERM phrased_term.
|
---|
56 |
|
---|
57 | group ::= TERM GROUP_TERM.
|
---|
58 | group ::= GROUP_TERM group.
|
---|
59 | group ::= EMPTY_GROUP_OK.
|
---|
60 |
|
---|
61 | near_expr ::= TERM NEAR TERM.
|
---|
62 | near_expr ::= TERM NEAR near_expr.
|
---|
63 |
|
---|
64 | adj_expr ::= TERM ADJ TERM.
|
---|
65 | adj_expr ::= TERM ADJ adj_expr. |
---|