[antlr-interest] Predicate and problem with generated code

fridi fridi70 at gmx.de
Thu Feb 11 10:53:22 PST 2010


Hi,

i have  a parser rule for an if-else

rule
  :
  IF^ expression 'then'! actionSequence ('else'! actionSequence)? 'endif'!
  ;

The treewalker rule is

ifElse
  :
  ^(
    IF b=expression
    (
      {b}?=> actionSequence .
      | . actionSequence
    )
   )
  ;

The problem now is that the generated code for DFA1 and there the method 
specialStateTransition() does not know about my variable b
Any ideas?

Thanks in advance,
 fridi


More information about the antlr-interest mailing list