anchor.diff:  	print >>f, "    r = extra_setup(inst, extra_arg);"
   	print >>f, "    if(r != 0) return r;"
   
  -    for name, type, dir in pins:
  +    for name, type, dir, value in pins:
           print >>f, "    r = hal_pin_%s_newf(%s, &(inst->%s), comp_id," % (
               type, dirmap[dir], name)
           print >>f, "        \"%%s%s\", prefix);" % to_hal("." + name)
           print >>f, "    if(r != 0) return r;"
  +        if value is not None:
  +            print >>f, "    *(inst->%s) = %s;" % (name, value)
   
       for name, type, dir, value in params:
           print >>f, "    r = hal_param_%s_newf(%s, &(inst->%s), comp_id," % (
  
positive.code:     rule File: Declaration* "$" {{ return True }}
      rule Declaration:
          "component" NAME OptString";" {{ comp(NAME, OptString); }}
        | "pin" PINDIRECTION TYPE NAME OptString ";"  {{ pin(NAME, TYPE, PINDIRECTION, OptString) }}
        | "param" PARAMDIRECTION TYPE NAME OptAssign OptString ";" {{ param(NAME, TYPE, PARAMDIRECTION, OptString, OptAssign) }}
        | "function" NAME OptFP OptString ";"       {{ function(NAME, OptFP, OptString) }}
        | "option" NAME OptValue ";"   {{ option(NAME, OptValue) }}
  
negative.code: 
      print >>f
      print >>f, "struct state {"
      for name, type, dir, value in pins:
          if names.has_key(name):
              raise RuntimeError, "Duplicate item name: %s" % name
          print >>f, "    hal_%s_t *%s;" % (type, name)
  