def run(self): """ Corrida de la instruccion """ global BotSymbolTable global posicionmatriz # Creamos el simbolo simbolo = Simbolo(self.identifier,self.botType,None) simbolo.tablaDeComportamientos = self.declarationSet # Agregamos el simbolo a la tabla BotSymbolTable.agregarATabla(self.identifier, simbolo)
def p_botCreate(p): '''botCreate : TkInt TkBot TkIdent botDeclaracionList TkEnd | TkBool TkBot TkIdent botDeclaracionList TkEnd | TkChar TkBot TkIdent botDeclaracionList TkEnd''' p[0] = Instruccion.CreateInstruccion(p[1],p[3],p[4]) simbolo = Simbolo(p[3],p[1],None) simbolo.tablaDeComportamientos = p[4] global sintBotSymbolTable sintBotSymbolTable = sintBotSymbolTable.agregarATabla(p[3],simbolo) global currentBotType currentBotType = p[1]