import jsonMode as func import tablaDGA as TS #VARIABLES GLOBALES resultadotxt = "" tabla = TS.Tabla() cont = 0 contambito = 0 NombreDB = "" def Textoresultado(): global tabla global resultadotxt print(resultadotxt) for simbolo in tabla.simbolos: print("ID: " + str(tabla.simbolos[simbolo].id) + " Nombre: " + tabla.simbolos[simbolo].nombre + " Ambito: " + str(tabla.simbolos[simbolo].ambito)) print("\n") resultadotxt = "" class instruccion: """INSTRUCCION""" """RODUCCIONES GENERALES""" class cond(instruccion):
from tkinter import filedialog from tkinter import messagebox from tkinter import scrolledtext import grammar2 as g import tablaDGA as TabladeSimbolos from reportAST import * from reportError import * from reportBNF import * from reportTable import * import prettytable as pt import os from reportBNF import * import webbrowser as wb default_db = 'DB1' ts = TabladeSimbolos.Tabla() def analiz(input): raiz = g.parse(input) results = [] executeGraphTree(raiz) for val in raiz: res = val.ejecutar() if isinstance(res,CError): results.append("Error "+ res.tipo+". Descripcion: " +res.descripcion) else: results.append( res) graphTable(ts) report_errors() report_BNF()