anchor.diff:  grammar Tiger;
   
   options {
  -  language = C;
     k = 1;
     output = AST;
   }
  
positive.code:   ;
  
  or
    : '|' and                                                                     -> ^(OR and*)
    ;
  
  and
    : ('&' comparison)*                                                           -> ^(AND comparison*)
    ;
  
  comparison
    : (('='|'<>'|'<'|'>'|'<='|'>=') addition)*                                    -> ^(COMP addition*)
    ;
  
  addition
    : (('+'|'-') multiplication)*                                                 -> ^(ADD multiplication*)
    ;
  multiplication
    : (('*'|'/') atom)*                                                           -> ^(MULT atom)
    ;
  
negative.code: 
  after_ID
    : ':='                                                                        -> ^(ASSIGNE)
    | '(' (p1=atom (',' p2=atom)*)? ')'                                               -> ^(FUNC_CALL ($p1 $p2*)?)
    ;
  
  
  