[antlr-interest] What does this error mean? grammer.txt:10:1: Lexical rule Program defined outside of lexer

Martin Probst mail at martin-probst.com
Thu Feb 23 01:01:15 PST 2006


> grammer.txt:10:1: Lexical rule Program defined outside of lexer
> 
> What does it mean  that lexcial rule "Program" was defined outside of lexer?
> Sorry for the noob question.

In ANTLR all grammar rules have to start lowercase, all lexer rules have
to start uppercase. So ANTLR tells you it found an uppercase rule (which
should be a lexer rule) within the parser.

Martin



More information about the antlr-interest mailing list