[antlr-interest] Question about grammar name

mark4 at voila.fr mark4 at voila.fr
Mon Sep 3 04:53:30 PDT 2012


Hello,

I'm new to ANTLR and the first thing that comes to my mind is that AntlrWorks sends an error when the name of the grammar starts with an uppercase letter. Though, the grammars' names do start with an uppercase letter in all tutorials, like this one:
http://www.antlr.org/wiki/display/ANTLR3/Five+minute+introduction+to+ANTLR+3

Another thing, from the examples given, I'm supposing that the lexer and the parser class names do start with the name of the grammar, right?

For instance, for the grammar SimpleCalc, the lexer and parser are instantiated this way:
lexer = SimpleCalcLexer(char_stream);
parser = SimpleCalcParser(tokens);

Thanks in advance,
Mark
___________________________________________________________
Quand Jean-Luc Delarue parlait de son grand amour… à lire sur Voila.fr http://people.voila.fr/people/actu-stars/personnalites/quand-jean-luc-delarue-parlait-d-anissa-kehl-son-grand-amour-people_8397.html


More information about the antlr-interest mailing list