[antlr-interest] Retaining Comments after parsing the file
Tilman Bender
tbender at stud.hs-heilbronn.de
Sun Apr 19 10:18:54 PDT 2009
Hi,
The problem is, that you use skip() where you should actually use
something like:
: "//" (~('\r'|'\n'))* {$channel=HIDDEN;}
This way the comment will still be acessible in the parser:
http://www.antlr.org/wiki/pages/viewpage.action?pageId=557063
HTH
Tilman Bender
Student des Software Engineering
Hochschule Heilbronn
tbender at stud.hs-heilbronn.de
Am 19.04.2009 um 16:28 schrieb vasanthi a:
> SL_COMMENT
>
> : "//" (~('\r'|'\n'))* {$setType(Token.SKIP);}
>
> ;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090419/76e290d5/attachment.html
More information about the antlr-interest
mailing list