[antlr-interest] Tokenizing question

Andrew Lentvorski bsder at allcaps.org
Wed Jul 25 13:26:03 PDT 2007


Randall R Schulz wrote:
> ML_COMMENT
>     :   '/*' ( options { greedy = false; } : . ) * '*/'
>     ;
> 
> That should be clear enough on how to use it and what it does.

Yes, it is.  But it tokenizes the entire statement so it can throw it out.

What I don't have is a good way to tokenize that into:
"/*", COMMENTTEXT, "*/"

Using gates like the wiki shows for parsing XML *does* seem to get me 
the ability to do that.

-a




More information about the antlr-interest mailing list