anchor.diff:              print >>f, "    hal_%s_t *%s;" % (type, to_c(name))
           names[name] = 1
   
  -    for name, type, dir, value in params:
  +    for name, type, array, dir, value in params:
           if names.has_key(name):
               raise RuntimeError, "Duplicate item name: %s" % name
  -        print >>f, "    hal_%s_t %s;" % (type, to_c(name))
  +        if array:
  +            print >>f, "    hal_%s_t %s[%s];" % (type, to_c(name), array)
  +        else:
  +            print >>f, "    hal_%s_t %s;" % (type, to_c(name))
           names[name] = 1
   
       if has_data:
  
positive.code:             | STRING {{ return eval(STRING) }}
   
      rule OptArray: '\[' NUMBER '\]' {{ return int(NUMBER) }}
              | {{ return None }} 
      rule OptString: TSTRING {{ return eval(TSTRING) }} 
              | STRING {{ return eval(STRING) }}
              | {{ return '' }}
  
negative.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, array, dir, value in params:
              if array:
                  print >>f, "#define %s(i) (inst->%s[i])" % (to_c(name), to_c(name))
              else:
                  print >>f, "#define %s (inst->%s)" % (to_c(name), to_c(name))
          
          if has_data:
              print >>f, "#define data (*(%s*)&(inst->_data))" % options['data']
  