anchor.diff:          ;
   
   pitch returns [p]
  -    locals [tt=None ,alert=None, reg=None]:
  +    locals [tt=None, alert=None, reg=None]:
       tone {$tt = $tone.t}
       (':' INT {$reg = $INT.int})? {$p=self.lc.construct_pitch($tt, $reg)};
   
  
positive.code:     calculated.
  
      Example: '{ <E-Major:iv> C:5 D Eb F (1:8, 2)[C:3 D:4 E] <:v> [i@C#:3 sBb D:4 Fbb]}'
  
      NOTE: Ties are in the syntax but not supported at this time.
  */
  
negative.code: durationFraction returns [f]:
      numerator=INT ':'  denominator=INT {$f = ($numerator.int, $denominator.int)};
  
  tonality returns [tonal]
      locals [modal_index=0]:
      tone '-' MODALITY ('(' INT {$modal_index = $INT.int}')')? {$tonal = self.lc.construct_tonality($tone.t, $MODALITY.text, $modal_index)};
  
  chordTemplate returns [ctemplate]
      locals [cm=None, secondary_numeral=None, secondary_modality=None]:
      (tone '-' CHORDMODALITY {$ctemplate = self.lc.construct_chord_template($tone.t, None, $CHORDMODALITY.text)})
      | ((CHORDNUMERAL (CHORDMODALITY {$cm=$CHORDMODALITY.text})? {$ctemplate = self.lc.construct_chord_template(None, $CHORDNUMERAL.text, $cm)}
      | COMMON_DURATION_CHORD_NUMERAL_LETTERS (CHORDMODALITY {$cm=$CHORDMODALITY.text})? {$ctemplate = self.lc.construct_chord_template(None, $COMMON_DURATION_CHORD_NUMERAL_LETTERS.text, $cm)})
       ( '/' (CHORDNUMERAL {$secondary_numeral=$CHORDNUMERAL.text} | COMMON_DURATION_CHORD_NUMERAL_LETTERS {$secondary_numeral=$COMMON_DURATION_CHORD_NUMERAL_LETTERS.text})
       ('-' MODALITY {$secondary_modality=$MODALITY.text})? {$ctemplate = self.lc.construct_secondary_chord_template($ctemplate, $secondary_numeral, $secondary_modality)})?
      )
      ;
  
  harmonicTag returns[ht]:
  