title: ANTLR Tree rewriting based on pattern
body: <p>I've got a fairly basic grammar in ANTLR 3 and I am looking to do the following:
   - If a '+' appears in front of a 'term', just remove it as it is redundant (done).
   - If a '-' appears in front of a 'term', keep it, however add a '0' to the first child node so that I effectively go from "-2" to "0-2".</p>
  
  <pre><code>expression:
    unaryterm ((ADD^ | MINUS^) term)*
  ;
  
  unaryterm:
    (ADD! | MINUS^)? term
  ;
  </code></pre>
  
  <p>I've had a go at tree rewriting but seem to get stuck when it comes to matching the possible '-'.</p>
  
  <p>Note: ADD represents '+' and MINUS represents '-'.</p>