def numexp_action(self, text, loc, num):
exshared.setpos(loc, text)<EOL>if DEBUG > <NUM_LIT:0>:<EOL><INDENT>print("<STR_LIT>",num)<EOL>if DEBUG == <NUM_LIT:2>: self.symtab.display()<EOL>if DEBUG > <NUM_LIT:2>: return<EOL><DEDENT>n = list(num)<EOL>while len(n) > <NUM_LIT:1>:<EOL><INDENT>if not self.symtab.same_types(n[<NUM_LIT:0>], n[<NUM_LIT:2>]):<EOL><INDENT>raise SemanticException("<STR_LIT>" % n[<NUM_LIT:1>])<EOL><DEDENT>reg = self.codegen.arithmetic(n[<NUM_LIT:1>], n[<NUM_LIT:0>], n[<NUM_LIT:2>])<EOL>n[<NUM_LIT:0>:<NUM_LIT:3>] = [reg]<EOL><DEDENT>return n[<NUM_LIT:0>]<EOL>
Code executed after recognising a numexp expression (something +|- something)