I am trying to compile a grammar and make it work in ANTLR4. Grammar was written for ANTLR3, and I get a lot of compilation errors. Here is one of them:
syntax error: '->' came as a complete surprise to me while looking for rule element
This rule causes an error.
tokens {
ZONE;
ZONE_OFFSET;
}
time_zone_abbreviation
: UTC -> ZONE["UTC"]
| EST -> ZONE["America/New_York"]
| CST -> ZONE["America/Chicago"]
| PST -> ZONE["America/Los_Angeles"]
| MST -> ZONE["America/Denver"]
| AKST -> ZONE["America/Anchorage"]
| HAST -> ZONE["Pacific/Honolulu"]
;
I know that a statement ->can be used to specify the lexer command in ANTLR4. But what does the operator mean in ANTLR3?
source
share