[antlr-interest] 3.0 final will require t.g has t in it
Loring Craymer
craymer at warpiv.com
Mon Jul 10 16:41:15 PDT 2006
If you are going to have combined grammars, Martin's suggestion is a good
one--the generated code then looks like it was from a combined grammar, and
having implicit lexer creation in such cases would be a convenience.
--Loring
> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Terence Parr
> Sent: Monday, July 10, 2006 12:15 PM
> To: Antlr Interest
> Subject: Re: [antlr-interest] 3.0 final will require t.g has t in it
>
>
> 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