Ticket #521: grammar.out

File grammar.out, 1.8 KB (added by Dan, 14 years ago)

Literal Refactoring of Grammar

Line 
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
15query ::= expr.
16query ::=.
17
18expr ::= binop.
19expr ::= unop.
20expr ::= prob.
21expr ::= term.
22
23binop ::= expr AND expr.
24binop ::= expr OR expr.
25binop ::= expr XOR expr.
26binop ::= expr PLUS expr.
27binop ::= expr MINUS expr.
28
29unop ::= MINUS expr. [UMINUS]
30unop ::= PLUS expr. [UPLUS]
31unop ::= NOT expr.
32
33prob ::= term.
34prob ::= term prob.
35prob ::= BOOLEAN_FILTER.
36
37term ::= TERM.
38term ::= RANGE.
39term ::= compound_term.
40
41compound_term ::= WILD_TERM.
42compound_term ::= PARTIAL_TERM.
43compound_term ::= QUOTE phrase QUOTE.
44compound_term ::= phrased_term.
45compound_term ::= group.
46compound_term ::= near_expr.
47compound_term ::= adj_expr.
48compound_term ::= BRA expr KET.
49compound_term ::= SYNONYM TERM.
50
51phrase ::= TERM phrase.
52phrase ::= TERM.
53
54phrased_term ::= TERM PHR_TERM.
55phrased_term ::= PHR_TERM phrased_term.
56
57group ::= TERM GROUP_TERM.
58group ::= GROUP_TERM group.
59group ::= EMPTY_GROUP_OK.
60
61near_expr ::= TERM NEAR TERM.
62near_expr ::= TERM NEAR near_expr.
63
64adj_expr ::= TERM ADJ TERM.
65adj_expr ::= TERM ADJ adj_expr.