anchor.diff:  	;
   
   alternative
  -	: ( p:SEMPRED )* term (element)*
  +	:
  +		( SEMPRED
  +		| ACTION
  +		)*
  +		term
  +		( SEMPRED
  +		| ACTION
  +		)*
  +		( INTO 
  +			( ACTION )*
  +			( term )
  +			( ACTION )*
  +		)?
   		{ ## = #(#[ALTERNATIVE,"ALTERNATIVE"], ##) }
  -	;
  -
  -element
  -	: p:SEMPRED^
  -	| INTO^ term
  -	| a:ACTION^
   	;
   
   term
  
positive.code:                 self.writeln("args = []")
                  self.writeln("kargs = {}")
  			}
  		( element )+
  			{
                  self.writeln("return result")
                  self.deindent()
  
negative.code: 		{ ## = #(#[TRNSF,"TRNSF"], ##) }	
  	;
  
  inner_term
  	: term
  	|
  		ACTION^
  		( LPAREN! terms RPAREN!
  			{ ## = #(#[APPL,"APPL"], ##) }	
  		)?	;
  
  terms
  	:
  	| terms_rest
  	;
  	
  terms_rest
  	: inner_term ( COMMA! terms_rest )?
  	| STAR^ ( ( WILDCARD )? | VAR )
  	;
  
  