title: How to modify the parser rule return text in a one-liner action
body: <p>Let's say I have the following grammar:</p>
  
  <pre><code>rule1 : sub1  sub2 sub3
      ;
  </code></pre>
  
  <p>Suppose I only want to return rule sub2's text and my target language is C. I tried:</p>
  
  <pre><code>rule1 : sub1  sub2 sub3
      {$text = $sub2.text;}
      ;
  </code></pre>
  
  <p>But it is not right. I think I saw some example somewhere I can simply change attribute, but google does not locate it.</p>
  
  <p>Thanks for the help.</p>
  
  <p>I am using ANTLR v3.4 and target language is C( the example in my mind does not use any C function though).</p>