1. Make the rule public. 2. Fix ambiguities if has 3. Add an action for the rule (check how whitesapce is handled): $setType(Token.SKIP); > I tried following > > protected UNDEFINED_TOKEN :"TE_" ; > -- Xue Yong Zhi XRuby (Ruby to Java bytecode compiler): http://xruby.blogspot.com