[antlr-interest] 3.0 final will require t.g has t in it
Terence Parr
parrt at cs.usfca.edu
Mon Jul 10 12:15:09 PDT 2006
On Jul 10, 2006, at 12:01 PM, Martin Probst wrote:
>>> So "grammar MyLang" would generate MyLangParser.(java|tokens)
>>> and MyLangLexer.(java|tokens).
>>
>> Heh, that's pretty good! Anybody object to this?
>
> Well, why would you want to expose the Lexer as a top-level class
> if the user didn't even declare it explicitly? Have it be a nested
> class within the parser, that would keep the user surprise as low
> as possible.
That would make the file too big to debug sometimes; java has weird
limits. Also, it's a convenience but it doesn't change the fact that
ANTLR is generating parser and lexer from that grammar. THough I
guess you're right...one could pass the input stream to the parser
and ignore the lexer..hmm...anybody have an opinion?
Ter
More information about the antlr-interest
mailing list