[antlr-interest] The combined grammar definition
Silvester Pozarnik
silvester.pozarnik at tracetracker.com
Tue Dec 11 03:45:36 PST 2007
Thanks, but my problem is how to include a "tree grammar" in the same
file, heaving also the possibility to separately define @header,
@members and other sections.
BR.
Silvester
> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Sam Ellis
> Sent: 11. desember 2007 12:41
> To: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] The combined grammar definition
>
> antlr-interest-bounces at antlr.org wrote:
> > 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.
> >
> > 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?
>
> Prefix the section name with the grammar type, for example:
>
> @parser::header {
> }
>
> @lexer::header{
> }
>
> The same applies for members etc.
>
>
> --
> Sam Ellis, Engineering Manager,
> Product Engineering Group, Tel: +44 (0) 1223 400516
> System Design Division, Fax: +44 (0) 1223 400887
> ARM Ltd., 110 Fulbourn Road, skype:armsamellis
> Cambridge, CB1 9NJ mailto:sam.ellis at arm.com
>
> --
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose
the
> contents to any other person, use it for any purpose, or store or copy
the
> information in any medium. Thank you.
>
More information about the antlr-interest
mailing list