anchor.diff:  expr -> assign_expr : '$1'.
   
   %% Assignment
  -assign_expr -> assign_expr '=' fun_expr :
  -  { match, ?line('$2'), '$1', '$3' }.
  -
  +assign_expr -> assign_expr '=' fun_expr : build_match('$1', '$2', '$3').
   assign_expr -> fun_expr : '$1'.
   
   %% Function definitions
  
positive.code: fun_expr -> add_expr : '$1'.
  
  %% Arithmetic operations
  add_expr -> add_expr add_op mult_expr :
    { binary_op, ?line('$1'), ?op('$2'), '$1', '$3' }.
  
  add_expr -> mult_expr : '$1'.
  
  mult_expr -> mult_expr mult_op unary_expr :
    { binary_op, ?line('$1'), ?op('$2'), '$1', '$3' }.
  
  mult_expr -> unary_expr : '$1'.
  
  unary_expr -> unary_op min_expr :
    { unary_op, ?line('$1'), ?op('$1'), '$2' }.
  
  unary_expr -> min_expr : '$1'.
  
  %% Minimum expressions
  
negative.code: -define(line(Node), element(2, Node)).
  
  build_fun(Stab, Clauses) ->
    { 'fun', ?line(Stab), { clauses, Clauses } }.
  
  build_binary_op(F1, F2, F3) ->
    { binary_op, ?line(F1), ?op(F2), F1, F3 }.
  
  build_unary_op(F1, F2) ->
    { unary_op, ?line(F1), ?op(F1), F2 }.
  
  build_match(F1, F2, F3) ->
    { match, ?line(F2), F1, F3 }.