[antlr-interest]Skipping a Lexer Rule

Nijesh Panchratna, Noida nijesh at noida.hcltech.com
Mon Dec 15 22:58:59 PST 2003


Hi !!
My rule in lexer -
ROLE
:("$Role")+
 (' '|'\t'|'\n' {count++; newline();}|'\r')+
{$setType(Token.SKIP);}
;
ignores $Role in a file and doesn't pass it to parser.but it seems it does
pass something else.
Also, I am not clear what happens if my file doesn't contain this $Role word
i.e I want this rule to execute if there is a $Role word in the file else
skip this rule.How can I achieve this??
thanks in advance.
Rg
Nijesh

 

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/antlr-interest/

To unsubscribe from this group, send an email to:
 antlr-interest-unsubscribe at yahoogroups.com

Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list