Declarations is only needed for C targets (and really only to be C89
compliant which used to be important before gcc everywhere). So just roll
them up:
@declarations
{
int i;
}
@init
{
i = 0;
}
from a C target is just
@init
{
int i = 0;
}
In C# and Java targets and probably most others.
Jim
> -----Original Message-----
> From: [email protected] [mailto:antlr-interest-
> [email protected]] On Behalf Of The Researcher
> Sent: Thursday, May 12, 2011 11:32 AM
> To: [email protected]
> Subject: [antlr-interest] @declarations
>
> I am working on converting the C++ grammar by *Aurelian Melinte* from a
> C back end to a C# back end and for the life of me cannot find out how
> to property convert the @declarations section to C#.
>
> The searching of @declarations in both Google, and MarkMail drop the @
> and then the results become meaningless.
>
> I am currently converting it to scope and @init sections if only to get
> the C# to build. Once built I will need to debug the code and thus need
> to know more about how to properly convert @declarations.
>
> Thanks, Eric
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.