Hi Meyer
I am not getting a clear picture of where I need to change the code in the
grammar?
What are the changes that are ned in the java grammar code?
// Single-line comments
SL_COMMENT
: "//" (~('\r'|'\n'))* {$setType(Token.SKIP);}
;
// multiple-line comments
ML_COMMENT
: "/*"
(options {generateAmbigWarnings=false;}:
{ LA(2)!='/' }? '*'
| EndOfLine
| ~('*'|'\n'|'\r')
)*
"*/" {$setType(Token.SKIP);}
;
In the above code what are the changes that have to be made
On Tue, Jun 2, 2009 at 4:40 PM, Andreas Meyer
<[email protected]>wrote:
> Didn't the linked documentation help?
>
> vasanthi a schrieb:
> > Hi,
> >
> > Can you please let me know how to retain comments after instrumenting
> > the code in ANTRL V2.
> >
> > Thanks
> > Vasanthi.
> >
> > On Mon, Apr 20, 2009 at 6:21 PM, Andreas Meyer
> > <[email protected] <mailto:[email protected]>>
> wrote:
> >
> > It seems you are using ANTLR2. There, hidden tokens were handled
> > differently from ANTLR3 (see http://www.antlr2.org/doc/streams.html)
> >
> > Best,
> > Andreas Meyer
> >
> >
> > vasanthi a schrieb:
> > > Hi All
> > > But when I try to use this syntax it says undefined symbol $.
> > > The below mentioned syntax is java
> > > "undefined char $'
> > >
> > > Vasanthi.
> >
> >
> > List: http://www.antlr.org/mailman/listinfo/antlr-interest
> > Unsubscribe:
> >
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
> >
> >
>
>
> --
>
> Mit freundlichen Grüßen
>
>
> Andreas Meyer
> Consultant
> _______
> smartShift GmbH
> Willy-Brandt Platz 6
> 68161 Mannheim
> Germany
> T +49 (0)621.400 67.613
>
> Geschäftsführer: Stefan Hetges
> Amtsgericht Hamburg, HRB 83484
> Ust.-ID-Nr.: DE 813489791
>
>
> 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
-~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address