anchor.diff:                  | NAME {{ return NAME }}
                   | FPNUMBER {{ return float(FPNUMBER.rstrip("f")) }}
                   | NUMBER {{ return int(NUMBER,0) }}
  +    rule SValue: "yes" {{ return "yes" }} | "no" {{ return "no" }}  
  +                | "true" {{ return "true" }} | "false" {{ return "false" }}  
  +                | "TRUE" {{ return "TRUE" }} | "FALSE" {{ return "FALSE" }}  
  +                | NAME {{ return NAME }}
  +                | FPNUMBER {{ return FPNUMBER }}
  +                | NUMBER {{ return NUMBER }}
       rule OptValue: Value {{ return Value }}
                   | {{ return 1 }}
  +    rule OptSValue: SValue {{ return SValue }}
  +                | {{ return 1 }}
   %%
  +
  +mp_decl_map = {'int': 'RTAPI_MP_INT', 'dummy': None}
   
   def parse(rule, text, filename=None):
       global P, S
  
positive.code:       | "see_also" String ";"   {{ see_also(String) }}
        | "description" String ";"   {{ description(String) }}
        | "license" String ";"   {{ license(String) }}
  
      rule String: TSTRING {{ return eval(TSTRING) }} 
              | STRING {{ return eval(STRING) }}
  
negative.code:     else:
          if rest:
              print >>f, rest
          else:
              print >>f, ".HP"
              if options.get("singleton") or options.get("count_function"):
                  if has_personality:
                      print >>f, ".B loadrt %s personality=\\fIP\\fB" % comp_name,
                  else:
                      print >>f, ".B loadrt %s" % comp_name,
              else:
                  if has_personality:
                      print >>f, ".B loadrt %s [count=\\fIN\\fB] [personality=\\fIP,P,...\\fB]" % comp_name,
                  else:
                      print >>f, ".B loadrt %s [count=\\fIN\\fB]" % comp_name,
              for type, name, default, doc in modparams:
                  print >>f, "[%s=\\fIN\\fB]" % name,
              print >>f
  
              hasparamdoc = False
              for type, name, default, doc in modparams:
                  if doc: hasparamdoc = True
  
              if hasparamdoc:
                  print >>f, ".RS 4"
                  for type, name, default, doc in modparams:
                      print >>f, ".TP"
                      print >>f, "\\fB%s\\fR" % name,
                      if default:
                          print >>f, "[default: %s]" % default
                      else:
                          print >>f
                      print >>f, doc
                  print >>f, ".RE"
  
          if options.get("constructable") and not options.get("singleton"):
              print >>f, ".PP\n.B newinst %s \\fIname\\fB" % comp_name
  
  