anchor.diff:      | STRING COLON cterm                                 /* match named property value / construct    */
       ;
   
  +/*
  +%MS: Could be inlined.
  +*/
   cterms
       : cterm (COMMA cterm)*                               /* Term list */
       ;
  -    
  +
  +/*
  +%MS: Where is the COLON case needed?
  +     It seems a bit strange and allow sort and function declarations such as:
  +     :(#X) or F(:,:) 
  +     Is it possible to drop it/ put it just where it is really needed?
  +     And then inline the 'cconstructor'?
  +*/
   cconstructor
       : CONSTRUCTOR
       | COLON
  
positive.code: 
  // -- Sorts
  
  csortparams
      : FORALL cvariable+ DOT                              /* Sort parameters. */
      ;
  
  cforms
      : cform (COMMA cform)*                               /* List of forms */
      ;
  
  cform
      : cconstructor csortargs?                            /* Construction form */
      | cvariable                                          /* Allow variable form */
      ;
     
  csortargs
      : LPAR csorts RPAR                                   /* Construction sort arguments */
      ;
      
  csorts
      : csort (COMMA csort)*                               /* List of sort references */
      ;
  
  csort
      : cconstructor csortargs?                            /* Construction sort */
      | cvariable                                          /* Parameterized sort  */
      | LCURLY csortkv+ RCURLY                             /* Association map sort */
      ;
          
  csortkv
      : cconstructor COLON cterm                          /* Key-value sort */
      ;
      
  // -- Term
  
  cterm
      : cconstructor                                       /* Constant */
      | cconstructor LPAR cbounds RPAR                     /* Construction */
      | cliteral                                           /* Literal construction */
      | cvariable                                          /* Variable */
      | LCURLY ckv* RCURLY                                 /* association map */
      | METAVAR                                            /* Meta variable */
      | METAVAR LPAR cterms RPAR                           /* Substitution */
      ;
  
  cbounds
      : cbound (COMMA cbound)*                             /* Bound term list */
      ;
  
negative.code:     ;
  
  cbinder
      /* VARIABLE<binder=x> is an extension to ANTLR and specifies:
         "this VARIABLE is a binder we call x"
         with
         t<binds=x> specifies:
         "x is bound in the context of the t" 
      */
      /*
      %MS: The 'csort?' of variables is new? 
           Is the sort not defined in the (function) declaration? 
      */
      : VARIABLE<binder=x> csort? cbinder<binds=x>
      | DOT cterm
      ;
  
  