I think Antlr expects the first rule name to be in the small case. I was getting the same error with my grammar
grammar ee; Condition : LogicalExpression ; LogicalExpression : BooleanLiteral ; BooleanLiteral : True ; True : 'true' ;
Changing the first production rule in the grammar to lowercase, he solved the problem, that is, the following grammar worked for me.
grammar ee; Condition : LogicalExpression ; LogicalExpression : BooleanLiteral ; BooleanLiteral : True ; True : 'true' ;
Note. This is my personal interpretation, I could not find this argument in the online documentation.
source share