[antlr-interest] The combined grammar definition

Silvester Pozarnik silvester.pozarnik at tracetracker.com
Tue Dec 11 03:31:02 PST 2007


Hi,

In the antlr V2 one could define all three grammars (lexer, parser &
tree) in the single file, each with it's own 'option' and 'header'
information.

The WIKI documentation for the ANTLR3 ("ANTLR3 /Grammars" document)
states that "... There are four kinds of grammars: lexer, parser, tree,
and combined (no modifier) ...". 

How to define a combine grammar in ANTLR3 heaving possibility to
separately define @header, @members,... section for each of the
grammars, all in one file?

A template file should be appreciated.

Thanks a lot
Silvester.
 


More information about the antlr-interest mailing list