Reputation: 9443
// Parser
statement
: DELIMITER* statementPart+ DELIMITER* (EOL { newline(); })?
;
// Lexer
DELIMITER
: ';'
;
sql-stmt.g:85:13: rule classDef trapped:
sql-stmt.g:85:13: unexpected token: DELIMITER
Line 85 is the statement
rule. I really have no idea why this fails. Please help?
This is with Antlr2 btw. Yes, yes, super old, yes, yes...
Thanks!
Upvotes: 1
Views: 58
Reputation: 9443
Been playing with Antlr4 too much :) In Antlr2 I guess tokens / rules have to be wrapped in parens to apply *
or +
or ...
Upvotes: 2