Esempio n. 1
0
        private static void prueba()
        {
            String txto = "CREAR TABLA Departamento( $Id_departamento entero, nombre cadena);INSERTAR EN Departamento VALORES(0,\"Alta Verapaz\");INSERTAR EN Departamento VALORES(1,\"Baja Verapaz\");INSERTAR EN Departamento VALORES(2,\"Chimaltenango\");INSERTAR EN Departamento VALORES(3#,\"Chiquimula\");%&# ";

            Scanner sc = new Scanner(txto);

            listaTokens         = sc.Scan();
            listaErroresLexicos = sc.getErrores();

            foreach (Token t in listaTokens)
            {
                Console.WriteLine(t.toString());
            }

            foreach (Token t in listaErroresLexicos)
            {
                Console.WriteLine(t.toString());
            }

            ruta = @"C:\Users\JOSED\Documents\Reportes\SQL-es";

            String  descripcion = "Reporte de todos los toquens reconocidos por el programa al ejecutar el Scanner()";
            Archivo a           = new Archivo();
            HTML    html        = new HTML("Reporte Tokens", "Reporte de Tokens - SQL-es", descripcion);

            a.crearHTML(ruta, "reporteTokens", html.crear(listaTokens));

            html = new HTML("Reporte De Errores", "Reporte de Errores - SQL-es", "Errores encontrados...");
            a.crearHTML(ruta, "reporteErr", html.crear(listaErroresLexicos));
        }
Esempio n. 2
0
        private void mostrarTablas()
        {
            escribirLinea("\t> tablas.html...");

            Archivo a    = new Archivo();
            HTML    html = new HTML();

            a.crearHTML(pathArchivo, "tablas", html.crear(this.listaTablas));
            openFile(pathArchivo + "\\tablas.html");
        }
Esempio n. 3
0
        private void generarReportes()
        {
            escribirLinea(" - Generando los reportes...");

            //pathCarpeta = @"C:\Users\JOSED\source\repos\-OLC1-PY1_201503836\Reportes";

            String  descripcion = "Reporte de todos los toquens reconocidos por el programa al ejecutar el Scanner()";
            Archivo a           = new Archivo();
            HTML    html        = new HTML("Reporte Tokens", "Reporte de Tokens - SQL-es", descripcion);

            a.crearHTML(pathArchivo, "reporteTokens", html.crear(listaTokens));

            foreach (Token t in listaErroresSintacticos)
            {
                listaErroresLexicos.Add(t);
            }

            html = new HTML("Reporte De Errores", "Reporte de Errores - SQL-es", "Errores encontrados...");
            a.crearHTML(pathArchivo, "reporteErr", html.crear(listaErroresLexicos));
        }