anchor.diff:  	: ACTION
   	;
   
  -debug_term
  -	: t:term
  +debug_term[matching]
  +	: t:term[matching]
   		{
               if self.debug:
                   import sys
  
positive.code: 		{ ret = "_f.parse(%r)" % #s.getText() }
  	| c:CONS 
  		{ ret = "_f.makeStr(%r)" % #c.getText() }
  	| v:VAR // p=build_term
  //		{ ret = "_f.makeVar(%r,%s)" % (#v.getText(), p) }
  		{ ret = "_k[%r]" % #v.getText() }
  	| w:WILDCARD 
  //		{ ret = "_f.makeWildcard()" }
  
negative.code: 	;
  
  // TODO: support variable assignments
  term[matching]
  	: INT
  	| REAL
  	| STR
  	| LSQUARE! term_list[matching] RSQUARE!
  		{ ## = #(#[LIST,"LIST"], ##) }
  	| term_args[matching]
  		{ ## = #(#[APPL,"APPL"], #[CONS,""], ##) }
  	| CONS ( (LPAREN) => term_args[matching] | term_nil_list)
  		{ ## = #(#[APPL,"APPL"], ##) }
  	| VAR term_args[matching]
  		{ ## = #(#[APPL,"APPL"], ##) }
  	| WILDCARD term_args[matching]
  		{ ## = #(#[APPL,"APPL"], ##) }
  	| VAR
  	| WILDCARD
  	| { matching }? VAR ( TRANSF^ | TRANSF_MAP^) ( transf_args )?
  	|
  		{
              if matching:
                  ## = #(#[WILDCARD,"_"])
  		}
  		( t:TRANSF^ | TRANSF_MAP^) 
  		( transf_args | 
  		{
              if not matching:
                  #t.setType(TRANSF_ADDR)
  		}
  		)
  	;
  
  term_implicit_wildcard
  