[antlr-interest] How to specify lexer options without composite grammars
Achim Westermann
Achim.Westermann at gmx.de
Mon Jun 16 12:16:17 PDT 2008
Hi list,
I need to specify the lexer option filter.
Within one file it seems impossible to start:
...
lexer grammar myname; -> unexpected token "lexer"
I tried this in order to start an options block for the lexer.
The wiki example for filter lexers shows only a single lexer grammar. So
the next try was to use a composite grammar ant import the lexer
grammar from the parser grammar.
For java this only seems to work when both files are placed in the
unnamed package. Otherwise the imported lexer grammar is not generated
(at least i cannot find it, even if renaming the lexer grammar file will
cause an error).
Does anybody have a clue? Might the package declaration for java be a bug?
kind regards,
Achim
More information about the antlr-interest
mailing list