[antlr-interest] Lexer and Parser class packaging
Vadim Tropashko
vadimtro at yahoo.com
Tue Jan 30 15:33:42 PST 2007
--- Jim Idle <jimi at intersystems.com> wrote:
> You need to use @header::lexer and @header::parser.
@parser::header {}
not the @header::lexer
:-)
> Otherwise the header element will only appear in one
> of them (cant remember which it is now by default
> ;-).
>
> Jim
>
> -----Original Message-----
> From: antlr-interest-bounces at antlr.org
> [mailto:antlr-interest-bounces at antlr.org] On Behalf
> Of Vadim Tropashko
> Sent: Tuesday, January 30, 2007 3:15 PM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] Lexer and Parser class
> packaging
>
> As a general rule default packaging in java doest't
> work (or rather gives you such a headache that
> you'll
> never use default pakages). Therefore it is a good
> idea to wrap grammar file into a package.
>
> grammar MyGrammar;
>
> @header {
> package company.dir;
> }
>
> However, after I run antlr Tool, it generates two
> classes Lexer and Parser, one packaged properly, and
> the other one is not! Is it a bug? (I'm on v.3)
>
>
>
>
>
>
____________________________________________________________________________________
> Expecting? Get great news right away with email
> Auto-Check.
> Try the Yahoo! Mail Beta.
>
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.432 / Virus Database: 268.17.14/658 -
> Release Date: 1/29/2007 2:49 PM
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.432 / Virus Database: 268.17.14/658 -
> Release Date: 1/29/2007 2:49 PM
>
>
____________________________________________________________________________________
Never Miss an Email
Stay connected with Yahoo! Mail on your mobile. Get started!
http://mobile.yahoo.com/services?promote=mail
More information about the antlr-interest
mailing list