Lines Matching refs:tokens
63 def setHandlerStyle(tokens): argument
65 if len(tokens) != 2:
67 style = tokens[1]
77 def setHandlerSize(tokens): argument
81 if len(tokens) != 2:
87 handler_size_bytes = bytes = int(tokens[1])
102 def importFile(tokens): argument
103 if len(tokens) != 2:
105 source = tokens[1]
107 appendSourceFile(tokens[1], getGlobalSubDict(), asm_fp, None)
116 def setAsmStub(tokens): argument
118 if len(tokens) != 2:
121 stub_fp = open(tokens[1])
132 def setFallbackStub(tokens): argument
134 if len(tokens) != 2:
137 stub_fp = open(tokens[1])
147 def setAsmAltStub(tokens): argument
149 if len(tokens) != 2:
151 default_alt_stub = tokens[1]
156 def setFunctionTypeFormat(tokens): argument
158 function_type_format = tokens[1]
162 def setFunctionSizeFormat(tokens): argument
164 function_size_format = tokens[1]
168 def setGlobalNameFormat(tokens): argument
170 global_name_format = tokens[1]
175 def opStart(tokens): argument
178 if len(tokens) != 2:
182 default_op_dir = tokens[1]
189 def altEntry(tokens): argument
191 if len(tokens) != 3:
196 index = opcodes.index(tokens[1])
198 raise DataParseError("unknown opcode %s" % tokens[1])
199 if alt_opcode_locations.has_key(tokens[1]):
201 % (tokens[1], alt_opcode_locations[tokens[1]], tokens[2])
202 alt_opcode_locations[tokens[1]] = tokens[2]
209 def opEntry(tokens): argument
211 if len(tokens) != 3:
216 index = opcodes.index(tokens[1])
218 raise DataParseError("unknown opcode %s" % tokens[1])
219 if opcode_locations.has_key(tokens[1]):
221 % (tokens[1], opcode_locations[tokens[1]], tokens[2])
222 opcode_locations[tokens[1]] = tokens[2]
228 def opEnd(tokens): argument
230 if len(tokens) != 1:
241 def genaltop(tokens): argument
244 if len(tokens) != 1:
442 tokens = line.strip().split(' ', 2)
443 if len(tokens) < 2:
446 alt_source = tokens[1].strip("\"")
452 if len(tokens) == 3:
453 new_dict.update(eval(tokens[2]))
460 tokens = line.strip().split(' ', 1)
461 if len(tokens) < 2:
463 defaultValues = eval(tokens[1])
571 tokens = line.split(' ') # tokenize variable
573 if len(tokens[0]) == 0:
576 elif tokens[0][0] == '#':
580 if tokens[0] == "handler-size":
581 setHandlerSize(tokens)
582 elif tokens[0] == "import":
583 importFile(tokens)
584 elif tokens[0] == "asm-stub":
585 setAsmStub(tokens)
586 elif tokens[0] == "asm-alt-stub":
587 setAsmAltStub(tokens)
588 elif tokens[0] == "op-start":
589 opStart(tokens)
590 elif tokens[0] == "op-end":
591 opEnd(tokens)
592 elif tokens[0] == "alt":
593 altEntry(tokens)
594 elif tokens[0] == "op":
595 opEntry(tokens)
596 elif tokens[0] == "handler-style":
597 setHandlerStyle(tokens)
598 elif tokens[0] == "alt-ops":
599 genaltop(tokens)
600 elif tokens[0] == "split-ops":
602 elif tokens[0] == "fallback-stub":
603 setFallbackStub(tokens)
604 elif tokens[0] == "function-type-format":
605 setFunctionTypeFormat(tokens)
606 elif tokens[0] == "function-size-format":
607 setFunctionSizeFormat(tokens)
608 elif tokens[0] == "global-name-format":
609 setGlobalNameFormat(tokens)
611 raise DataParseError, "unrecognized command '%s'" % tokens[0]
613 print "tokens[0] = %s" % tokens[0]