anchor.diff:  	;
   
   block: LBRACE stmt* RBRACE -> ^( BLOCK stmt* )
  -    ;
  -
  -
  -stmt:
  -        SEMICOLON ->
  -    |   (real_stmt) -> real_stmt
  -    ;
  -
  -real_stmt:
  -        (stmt_chain)
  -    |   (if_stmt)
  -    |   (switch_stmt)
  -    |   (block)
  -    |   (foreach_loop)
  -    |   (for_loop)
  -    |   (iterate_loop)
  -    |   (wait_stmt)
  -    |   (update_stmt)
  -    ;
  -
  -stmt_chain:
  -        chainable_stmt
  -          (  SEMICOLON
  -                    -> chainable_stmt
  -          | stmt_chain_op real_stmt
  -                    ->  ^( STATEMENT_CHAIN chainable_stmt real_stmt ))
  -    ;
  -
  -chainable_stmt:
  -        (declaration_multi)
  -    |   (assignment_expr)
  -    |   (expr_stmt)
  -    ;
  -
  - stmt_chain_op:
  -        '=' '>'
       ;
   
   if_stmt:
  
positive.code: grammar ExM;
  
  // TODO: need backtracking to disambiguate between function type
  // signature and function call statements in top_level_statement
  options {output=AST; backtrack=true;}
  
  tokens {
  
negative.code: }
  
  program:
          stmt* EOF -> ^( PROGRAM stmt* EOF )
      ;
  
  stmt:
          SEMICOLON ->
      |   (real_stmt) -> real_stmt
      ;
  
  real_stmt:
          (function_definition)
      |   (new_type_definition)
      |   (global_const_definition)
      |   (import_statement)
      |   (stmt_chain)
      |   (if_stmt)
      |   (switch_stmt)
      |   (block)
      |   (foreach_loop)
      |   (for_loop)
      |   (iterate_loop)
      |   (wait_stmt)
      |   (update_stmt)
      ;
  
  stmt_chain:
          chainable_stmt
            (  SEMICOLON
                      -> chainable_stmt
            | stmt_chain_op real_stmt
                      ->  ^( STATEMENT_CHAIN chainable_stmt real_stmt ))
      ;
  
  chainable_stmt:
          (declaration_multi)
      |   (assignment_expr)
      |   (expr_stmt)
      ;
  
   stmt_chain_op:
          '=' '>'
      ;
  
  new_type_definition:
  