[antlr-interest] Multiple lexers and parsers in one grammar file

Terence Parr parrt at jguru.com
Tue Jan 21 10:50:28 PST 2003


On Tuesday, January 21, 2003, at 09:45 AM, rmsanjivp 
<rmsanjivp at yahoo.com> wrote:

> Hi!
>
> THe documentation for 2.7.1 shows that we can have multiple lexer and
> parser classes in one grammar file. But when I try to write two lexer
> classes and two parser classes in a file I get the error while
> generating the code that the grammar file may have only one lexer or
> parser.

I think you'd need to put a class prefix of "" to remove the default 
"public" or something.  That's a java limitation.

>
> Is it not possible to have multiple lexer and parser classes in one
> grammar file?

Hmm...haven't tried that in years ;)

Ter
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Lecturer in Comp. Sci., University of San Francisco


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list