title: ANTLR3: Parameters and semantic predicates ("cannot find symbol", "illegal start of type")
body: <p>I would like to realize a "branch" in ANTLR3.</p>
  
  <p>I figured using</p>
  
  <pre><code>branch[boolean is_a]
      : ({ $is_a}? =&gt; a)
      | ({!$is_a}? =&gt; b);
  </code></pre>
  
  <p>would do the trick, but I get the compiling errors "cannot find symbol" and "illegal start of type", because in the in the generated source i.e. <code>DFA45.specialStateTransition(...)</code> does not have a parameter <code>is_a</code>.</p>
  
  <p>I tried omitting the <code>=&gt;</code>¹, and/or omitting the <code>$</code> of <code>$is_a</code>.</p>
  
  <p>The FIRST sets of <code>a</code> and <code>b</code> are not disjoint.</p>
  
  <p>In fact <code>b</code> is of type <code>((C) =&gt; c) | a</code>.</p>
  
  <p>¹) as I don't understand the difference between <code>{...}? =&gt; ...</code> and <code>{...}? ...</code></p>