[antlr-interest] Help in using antlr
Austin Hastings
Austin_Hastings at Yahoo.com
Tue Oct 16 19:38:53 PDT 2007
@lexer::header {
package xxx;
}
H. Wan wrote:
> I am a newbie in antlr and I need some help on the
> followings:
>
> 1. I put the following in a .g file
>
> header {
> package xxx;
> }
>
> After I ran antlr with this file, the Parser file
> generated does contain a "package xxx;" line at the
> top of the file. But the Lexer file does not have
> that line.
> How could I make antlr put that "package xxx;" in the
> Lexer file?
>
>
> 2. In the same case as (1), apparently antlr generates
> the source file in the same directory as the .g file.
> However, the java source file should go to a
> subdirectory xxx. How can I tell antlr where to put
> the generated files?
>
>
> I am using antlr 3.0.1.
>
> Thanks in advance for your response.
>
> - Hans
>
>
> ____________________________________________________________________________________
> Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
>
>
>
>
More information about the antlr-interest
mailing list