anchor.diff:  
       %% scalar expressions
   
  -scalar_exp -> scalar_exp '+' scalar_exp                                                         : {'+','$1','$3'}.
  -scalar_exp -> scalar_exp '-' scalar_exp                                                         : {'-','$1','$3'}.
  -scalar_exp -> scalar_exp '*' scalar_exp                                                         : {'*','$1','$3'}.
  -scalar_exp -> scalar_exp '/' scalar_exp                                                         : {'/','$1','$3'}.
  -scalar_exp -> '+' scalar_exp                                                                    : {'+','$2'}. %prec UMINU
  -scalar_exp -> '-' scalar_exp                                                                    : {'-','$2'}. %prec UMINU
  -scalar_exp -> '+' literal                                                                       : '$2'.
  -scalar_exp -> '-' literal                                                                       : list_to_binary(["-",'$2']).
  -scalar_exp -> scalar_exp NAME                                                                   : {as, '$1', unwrap_bin('$2')}.
  -scalar_exp -> scalar_exp AS NAME                                                                : {as, '$1', unwrap_bin('$3')}.
  -scalar_exp -> NULLX NAME                                                                        : {as, <<"NULL">>, unwrap_bin('$2')}.
  -scalar_exp -> NULLX AS NAME                                                                     : {as, <<"NULL">>, unwrap_bin('$3')}.
  -scalar_exp -> NAME NAME                                                                         : {as, unwrap_bin('$1'), unwrap_bin('$2')}.
  -scalar_exp -> NAME AS NAME                                                                      : {as, unwrap_bin('$1'), unwrap_bin('$3')}.
  -scalar_exp -> STRING NAME                                                                       : {as, unwrap_bin('$1'), unwrap_bin('$2')}.
  -scalar_exp -> STRING AS NAME                                                                    : {as, unwrap_bin('$1'), unwrap_bin('$3')}.
  -scalar_exp -> INTNUM NAME                                                                       : {as, unwrap_bin('$1'), unwrap_bin('$2')}.
  -scalar_exp -> INTNUM AS NAME                                                                    : {as, unwrap_bin('$1'), unwrap_bin('$3')}.
  -scalar_exp -> APPROXNUM NAME                                                                    : {as, unwrap_bin('$1'), unwrap_bin('$2')}.
  -scalar_exp -> APPROXNUM AS NAME                                                                 : {as, unwrap_bin('$1'), unwrap_bin('$3')}.
  -scalar_exp -> atom                                                                              : '$1'.
  -scalar_exp -> subquery                                                                          : '$1'.
  -scalar_exp -> column_ref                                                                        : '$1'.
  -scalar_exp -> column_ref NAME                                                                   : {as, '$1', unwrap_bin('$2')}.
  -scalar_exp -> column_ref AS NAME                                                                : {as, '$1', unwrap_bin('$3')}.
  -scalar_exp -> function_ref                                                                      : '$1'.
  -scalar_exp -> function_ref NAME                                                                 : {as, '$1', unwrap_bin('$2')}.
  -scalar_exp -> function_ref AS NAME                                                              : {as, '$1', unwrap_bin('$3')}.
  -scalar_exp -> '(' scalar_exp ')'                                                                : '$2'.
  +scalar_exp -> scalar_sub_exp                                                                    : '$1'.
  +scalar_exp -> scalar_sub_exp NAME                                                               : {as, '$1', unwrap_bin('$2')}. 
  +scalar_exp -> scalar_sub_exp AS NAME                                                            : {as, '$1', unwrap_bin('$3')}. 
  +
  +scalar_sub_exp -> scalar_sub_exp '+' scalar_sub_exp                                             : {'+','$1','$3'}.
  +scalar_sub_exp -> scalar_sub_exp '-' scalar_sub_exp                                             : {'-','$1','$3'}.
  +scalar_sub_exp -> scalar_sub_exp '*' scalar_sub_exp                                             : {'*','$1','$3'}.
  +scalar_sub_exp -> scalar_sub_exp '/' scalar_sub_exp                                             : {'/','$1','$3'}.
  +scalar_sub_exp -> '+' scalar_sub_exp                                                            : {'+','$2'}. %prec UMINU
  +scalar_sub_exp -> '-' scalar_sub_exp                                                            : {'-','$2'}. %prec UMINU
  +scalar_sub_exp -> '+' literal                                                                   : '$2'.
  +scalar_sub_exp -> '-' literal                                                                   : list_to_binary(["-",'$2']).
  +scalar_sub_exp -> NULLX                                                                         : <<"NULL">>.
  +scalar_sub_exp -> atom                                                                          : '$1'.
  +scalar_sub_exp -> subquery                                                                      : '$1'.
  +scalar_sub_exp -> column_ref                                                                    : '$1'.
  +scalar_sub_exp -> function_ref                                                                  : '$1'.
  +scalar_sub_exp -> '(' scalar_sub_exp ')'                                                        : '$2'.
   
   scalar_exp_commalist -> scalar_exp                                                              : ['$1'].
   scalar_exp_commalist -> scalar_exp_commalist ',' scalar_exp                                     : '$1' ++ ['$3'].
  
positive.code:  existence_test
   subquery
   scalar_exp
   scalar_exp_commalist
   atom
   parameter_ref
  
negative.code: assignment_commalist -> assignment_commalist ',' assignment                                     : '$1' ++ ['$3'].
  
  assignment -> column '=' scalar_exp                                                             : {'=', '$1', '$3'}.
  
  update_statement_searched -> UPDATE table SET assignment_commalist opt_where_clause             : {'update', '$2', {'set', '$4'}, '$5'}.
  
  