anchor.diff:      name = re.sub("#+", lambda m: "%%0%dd" % len(m.group(0)), name)
       return name.replace("_", "-").rstrip("-").rstrip(".")
   def to_c(name):
  +    name = re.sub("[.-_]*#+", "", name)
       name = name.replace("#", "").replace(".", "_").replace("-", "_")
       return re.sub("_+", "_", name)
   
  
positive.code:                     print >>f, "#define %s (0+*inst->%s)" % (to_c(name), to_c(name))
                  else:
                      print >>f, "#define %s (*inst->%s)" % (to_c(name), to_c(name))
          for name, type, dir, value in params:
              print >>f, "#define %s (inst->%s)" % (to_c(name), to_c(name))
          
          if has_data:
              print >>f, "#define data (*(%s*)&(inst->_data))" % options['data']
  
negative.code:     rule Declaration:
          "component" NAME OptString";" {{ comp(NAME, OptString); }}
        | "pin" PINDIRECTION TYPE HALNAME OptArray OptAssign OptString ";"  {{ pin(HALNAME, TYPE, OptArray, PINDIRECTION, OptString, OptAssign) }}
        | "param" PARAMDIRECTION TYPE HALNAME OptArray OptAssign OptString ";" {{ param(HALNAME, TYPE, OptArray, PARAMDIRECTION, OptString, OptAssign) }}
        | "function" NAME OptFP OptString ";"       {{ function(NAME, OptFP, OptString) }}
        | "option" NAME OptValue ";"   {{ option(NAME, OptValue) }}
        | "see_also" String ";"   {{ see_also(String) }}
  