anchor.diff:  
   rule enumeration:
           ( 'enumeration' | 'enum' )
  -        IDENT '{'                               {{ evalues = []; global yyecounter; yyecounter = 1 }}
  +        IDENT '{'                               {{ evalues = []; yy.ecounter = 1 }}
           enumeration_rest                        {{ evalues = enumeration_rest }}
  -        '}' ';'                                 {{ AIn (IDENT); yydict[IDENT] = tuple (evalues); yyecounter = None }}
  +        '}' ';'                                 {{ AIn (IDENT); yy.dict[IDENT] = tuple (evalues); yy.ecounter = None }}
   rule enumeration_rest:                          {{ evalues = [] }}
           ( ''                                    # empty
           | enumeration_value                     {{ evalues = evalues + [ add_evalue (enumeration_value) ] }}
  
positive.code: 
  import yapps2runtime as runtime
  
  yydict = None
  yyecounter = None
  yynamespace = None
  yynamespaces = []
  
  def namespace_open (ident):
      global yynamespace, yydict
      assert yynamespace == None and yydict == None
      yynamespace = ident
      yydict = {}
  def namespace_close ():
      global yynamespace, yydict
      assert isinstance (yynamespace, str) and isinstance (yydict, dict)
      yynamespaces.append ((yynamespace, yydict))
      yynamespace = None
      yydict = None
  def constant_lookup (variable):
      global yydict
      assert isinstance (yydict, dict)
      if not yydict.has_key (variable):
          raise NameError ('undeclared symbol: ' + variable)
      return yydict[variable]
  def add_evalue (evalue_tuple):
      global yyecounter
      evalue_name   = evalue_tuple[0]
      evalue_number = evalue_tuple[1]
      evalue_label  = evalue_tuple[2]
      evalue_blurb  = evalue_tuple[3]
      if evalue_number == None:
        evalue_number = yyecounter
        yyecounter += 1
      else:
        yyecounter = 1 + evalue_number
      AS (evalue_name)
      AN (evalue_number)
      yydict[evalue_name] = evalue_number
      return (evalue_name, evalue_label, evalue_blurb)
  def quote (qstring):
      import rfc822
  
negative.code:         token FRACTFLOAT:                     r'\.[0-9]+([eE][+-][0-9]+)?'
          token STRING:       r'"([^"\\]+|\\.)*"'             # double quotes string
  
  rule IdlSyntax: ( ';' | namespace )* EOF        {{ return yy.ns_list; }}
  
  rule namespace:
          'namespace' IDENT                       {{ namespace_open (IDENT) }}
  