[antlr-interest] Java package in generated code

Austin Hastings Austin_Hastings at Yahoo.com
Wed Oct 3 19:25:54 PDT 2007


Use

@header { ... }

for parser header info (package) and use

@lexer::header { ... }

for lexer info.


See:  http://www.antlr.org/wiki/pages/viewpage.action?pageId=819257


=Austin


Mark Volkmann wrote:
> When I generate Java code from a grammar that has "output = AST", the 
> generated Lexer class isn't in a package.
> Is there a way I can tell ANTLR to put it in a specific package?
>



More information about the antlr-interest mailing list