[antlr-interest] ugrade from 270 to 271

nagii5 nagii5 at yahoo.com
Tue Feb 19 17:05:44 PST 2002


In an attempt to have my method called in a rule 
i tried this

protected SAMPLE: ( {isEndRule("</anytag>")}? NL_CTR)*;

protected NL_CTR: 
        c:. {if (c=='\n') newline(); buff.append((char)c);};

271 generates the following code:
 if (((LA(1) >= '\u0003' && LA(1) <= '\uffff'))) {
         mNL_CTR(false);
 }
so it never called my method called isEndRule()
whereas:

270 generates the following code:
  if ((((LA(1) >= '\3' && LA(1) <= '\uffff')))&& 
                           (isEndRule("</anytag>"))) {
                   mNL_CTR(false);
  }


How do i make antlr271 generate the code similar to 270 in this 
case. 
thanks
nagesh




 

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



More information about the antlr-interest mailing list