Lines Matching refs:statement
126 def handle_statement(parser, container, statement):
127 if statement.is_microop:
128 if statement.mnemonic not in parser.microops.keys():
129 raise Exception, "Unrecognized mnemonic: %s" % statement.mnemonic
131 parser.microops[statement.mnemonic]
134 statement.params, {}, parser.symbols)
137 statement.mnemonic)
140 for label in statement.labels:
144 container.add_microop(statement.mnemonic, microop)
148 elif statement.is_directive:
149 if statement.name not in container.directives.keys():
150 raise Exception, "Unrecognized directive: %s" % statement.name
152 container.directives[statement.name]
155 statement.params, {}, parser.symbols)
161 raise Exception, "Didn't recognize the type of statement", statement
223 # Parameters are a string of text which don't contain an unescaped statement
224 # statement terminator, ie a newline or semi colon.
273 # token is needed by the parser to detect the end of a statement.
279 # A newline or semi colon when looking for params signals that the statement
337 for statement in t[3].statements:
338 handle_statement(t.parser, t.parser.rom, statement)
359 for statement in t[4].statements:
360 handle_statement(t.parser, curop, statement)
371 'statements : statement'
378 'statements : statements statement'
384 'statement : content_of_statement end_of_statement'
387 # A statement can be a microop or an assembler directive