[antlr-interest] superClass option for lexer in a combined grammar ?

Oti ohumbel at gmail.com
Mon Sep 3 03:03:12 PDT 2007


Kevin,

this also works for me.
Thanks again!

Oti.

On 8/24/07, Braun, Kevin T <Kevin.Braun at fnis.com> wrote:
> Here is what I am doing to solve this; it seems it will work.  When
> ANTLR generates the lexer and parser, it (fortunately) just says
> "extends Parser" or "extends Lexer", with package qualification (it
> imports org.antlr.runtime.*).  In the header I specify my own package
> for the generated lexer and parser.  I then extend ANTLR's Lexer and
> Parser with classes also called Lexer and Parser, in that same package.
> As a result, the generated classes extend my Lexer and Parser classes
> instead of ANTLR's.
>
> --------
> Oti ohumbel at gmail.com
> Fri Aug 3 02:03:10 PDT 2007
>
> Hi,
>
> trying out the superClass option (pages 104, 111/112) from the book.
> In a combined grammar the parser gets the specified super class.
>
> Is there a way to specify the lexer superClass, too ?
>
> Thanks,
> and best wishes,
> Oti.
>
>


More information about the antlr-interest mailing list