anchor.diff:        | "pin" PINDIRECTION TYPE HALNAME OptArray OptAssign OptPersonality OptString ";"  {{ pin(HALNAME, TYPE, OptArray, PINDIRECTION, OptString, OptAssign, OptPersonality) }}
         | "param" PARAMDIRECTION TYPE HALNAME OptArray OptAssign OptPersonality OptString ";" {{ param(HALNAME, TYPE, OptArray, PARAMDIRECTION, OptString, OptAssign, OptPersonality) }}
         | "function" NAME OptFP OptString ";"       {{ function(NAME, OptFP, OptString) }}
  +      | "variable" NAME {{ NAME1=NAME; }} NAME OptSimpleArray OptAssign ";" {{ variable(NAME1, NAME, OptSimpleArray, OptAssign) }}
         | "option" NAME OptValue ";"   {{ option(NAME, OptValue) }}
         | "see_also" String ";"   {{ see_also(String) }}
         | "description" String ";"   {{ description(String) }}
  
positive.code:         raise runtime.SyntaxError, "Duplicate option name %s" % name
      options[name] = value
  
  def removeprefix(s,p):
      if s.startswith(p): return s[len(p):]
      return s
  
negative.code:         if personality:
              print >>f, "}"
  
      for type, name, array, value in variables:
          if value is None: continue
          if array:
              print >>f, "    for(j=0; j < %s; j++) {" % array
              print >>f, "        inst->%s[j] = %s;" % (name, value)
              print >>f, "    }"
          else:
              print >>f, "    inst->%s = %s;" % (name, value)
  
      for name, fp in functions:
          print >>f, "    rtapi_snprintf(buf, HAL_NAME_LEN, \"%%s%s\", prefix);"\
              % to_hal("." + name)
  