[antlr-interest] Modifying lexer state from parser

Xue Yong Zhi zhixueyong at hotmail.com
Mon Feb 12 08:17:08 PST 2007


Yes you can. But there is no such thing as '$lexer', just add a regular 
field youself.

> 
> what I am trying to do is to access the lexer and modify it when this 
> condition is met.
> 

> 
> foo: bar{$lexer.m_conditionMet = true;}
> 
> 
> Is that possible?
> 
> 
>      Omry.
> 


-- 
Xue Yong Zhi
XRuby (Ruby to Java bytecode compiler):
http://xruby.blogspot.com



More information about the antlr-interest mailing list