anchor.diff:  		('-')?
   		// fraction
   		( ('0'..'9')+ ( '.' ('0'..'9')* { $setType(REAL); } )?
  -		| '.' ( ('0'..'9')+ { $setType(REAL); } )?
  -		) 
  +		| '.' ('0'..'9')+ { $setType(REAL); }
  +		)
   		// exponent
   		( ('e'|'E') ('-'|'+')? ('0'..'9')+ { $setType(REAL); } )?
   	;
  
positive.code: grammar
  	: 
  		( docstring )? 
  		( part )* 
  		EOF!
  	;
  
  part
  	: HEADER^ ACTION
  	| 
  		CLASS^ id ( LPAREN! id RPAREN! )? COLON!
  		( docstring )?
  		( method )*
  	;
  
  method
  	: ACTION
  	| rule
  	;
  
  rule
  
negative.code: 		{ ## = #(#[APPL,"APPL"], ##) }
  	|
  		( LCID | WILDCARD )
  		( (LPAREN) => LPAREN! terms RPAREN!
  			{ ## = #(#[APPL,"APPL"], ##) }	
  		)?
  	| DOT opt_args
  		{ ## = #(#[TRNSF,"TRNSF"], ##) }	
  	| ACTION^ opt_args
  	;
  
  opt_args
  	: (LPAREN) => LPAREN! terms RPAREN!
  	| nil
  	;
  	
  nil
  	:
  		{ ## = #(#[NIL,"NIL"]) }	
  