anchor.diff:      | NUMBER                                             /* Number literal */
       ;
   
  -csort
  -    : COLONCOLON csortname;                              /* Sort annotation */
  -
  -cdispatchCases
  -    : cterm (SEMI cterm)*                                /* Dispatch cases */
  +cvariable
  +    : VARIABLE<symbol> FUNCTIONAL? csortas?              /* Variable occurrence */
       ;
   
  -clist
  -    : LPAR term* RPAR                                    /* List of term */
  -    | LPAR ckv* RPAR                                     /* List of key-value pair */
  +csortas
  +    : AS csort                                           /* Sort annotation */
       ;
   
   ckv
  
positive.code:  * Copyright (c) 2015 IBM Corporation.
   *
   * This is the Crsx Core grammar specification.
   *
   * Only one grammar is used throughout the compilation pipeline. However
   * restrictions apply as lowering occurs.
   *
   */
  grammar Core;
  
  ccrsx
      : cdecl (SEMI cdecl)*
      ;
  
  cdecl
      : DATA     csortparams? csortname LPAR cforms RPAR  /* Data sort declaration */
      | FUNCTION csortparams? cform csortname             /* Function sort declaration */
      | RULE     cterm ARROW cterm                        /* Rule declaration */
      ;
  
  
  cterm
      : cconstructor csargs                                /* Construction with zero or more args */
      | cliteral                                           /* Literal construction */
      | cvariable                                          /* Variable */
      | clist                                              /* association list */
      | DISPATCH cterm cdispatchCases                      /* dispatch expression */
      ;
  
  cscope
      : cbinders                                           /* Scoped term  */
      | cterm                                              /* No-scoped term */
      ;
  
  cbinders
      : VARIABLE<binder=x> LINEAR? FUNCTIONAL? csort? cbinders<binds=x>
      | DOT cterm
      ;
  
  cargs
      : LSQUARE cterms? RSQUARE                             /* No scoped argument list */
      ;
  
  csargs
      : LSQUARE cscopes? RSQUARE                            /* Scoped argument list */
      ;
  
  cterms
      : cterm (COMMA cterm)*                                /* No Scoped term list */
      ;
  
  cscopes
      : cscope (COMMA cscope)*                             /* Scoped term list */
      ;
  
  cvariable
      : VARIABLE<symbol> DATAVAR LINEAR? csort?           /* Scoped variable */
      | VARIABLE<symbol> FUNCTIONVAR csort?               /* Formal parameter */
      ;
  
  cliteral
  
negative.code:     | STRING COLON cterm                                 /* match named property value / construct    */
      ;
  
  cterms
      : cterm (COMMA cterm)*                               /* Term list */
      ;
      
  cconstructor
      : CONSTRUCTOR
      | COLON
  