[antlr-interest] Need help for SL_Comment in Java Grammar

vasanthi a vasanthi.ak at gmail.com
Thu Apr 16 10:10:19 PDT 2009


HI ALL

I am facing a problem in SL_Comment..
My code has //[FEATURE_PDL_START]//

but when it finds //, it ignores the line or rather skip it.

It should not skip the line  //[FEATURE_PDL_START]//, when it finds such
syntax like //[id]//
Can you please let me know how to modify the single line comment
so that when ever it finds syntax like  //[FEATURE_PDL_START]// it should
not ignore it. I am using the below single line comment

// Single-line comments

SL_COMMENT

: "//" (~('\r'|'\n'))* {$setType(Token.SKIP);}

//:"//" (~('\r'|'\n'))*

;

Please help me..

Its very urgent.



Vasanthi.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090416/2dffdbd4/attachment.html 


More information about the antlr-interest mailing list