Allow ANTLR 3.5 to work
This involves a harmless backwards-compatible adjustment to the grammar. I can't explain why this is necessary but this might help. http://stackoverflow.com/questions/20057063/follow-set-in-is-undefined-in-generated-parser
This commit is contained in:
parent
34cc45b12d
commit
7cf35d1e8b
34
src/RSP.g
34
src/RSP.g
|
@ -43,43 +43,43 @@ strcrit : FIELD strop STR -> ^(strop FIELD STR)
|
|||
| FIELD NOT strop STR -> ^(NOT ^(strop FIELD STR))
|
||||
;
|
||||
|
||||
strop : EQUAL
|
||||
| INCLUDES
|
||||
| STARTSW
|
||||
| ENDSW
|
||||
strop : equal=EQUAL
|
||||
| includes=INCLUDES
|
||||
| startsw=STARTSW
|
||||
| endsw=ENDSW
|
||||
;
|
||||
|
||||
intcrit : FIELD intop INT -> ^(intop FIELD INT)
|
||||
| FIELD NOT intop INT -> ^(NOT ^(intop FIELD INT))
|
||||
;
|
||||
|
||||
intop : EQUAL
|
||||
| LESS
|
||||
| GREATER
|
||||
| LTE
|
||||
| GTE
|
||||
intop : equal=EQUAL
|
||||
| less=LESS
|
||||
| greater=GREATER
|
||||
| lte=LTE
|
||||
| gte=GTE
|
||||
;
|
||||
|
||||
datecrit: FIELD dateop datespec -> ^(dateop FIELD datespec)
|
||||
;
|
||||
|
||||
dateop : BEFORE
|
||||
| AFTER
|
||||
dateop : before=BEFORE
|
||||
| after=AFTER
|
||||
;
|
||||
|
||||
datespec: dateref
|
||||
| INT dateintval dateop dateref -> ^(dateop dateref INT dateintval)
|
||||
;
|
||||
|
||||
dateref : DATE
|
||||
| TODAY
|
||||
dateref : date=DATE
|
||||
| today=TODAY
|
||||
;
|
||||
|
||||
dateintval
|
||||
: DAY
|
||||
| WEEK
|
||||
| MONTH
|
||||
| YEAR
|
||||
: day=DAY
|
||||
| week=WEEK
|
||||
| month=MONTH
|
||||
| year=YEAR
|
||||
;
|
||||
|
||||
QUOTE : '"';
|
||||
|
|
Loading…
Reference in New Issue