Package pascalcompiler.parser

Examples of pascalcompiler.parser.SymbolTable


    /**
     * Method used to test a specified file.
     * @param fileName
     */
    public static void testFile(String fileName) {
        SymbolTable idTable = new SymbolTable();
        File input = new File("src\\pascalcompiler\\test\\syntaxtree\\" + fileName);
        PascalParser pp = new PascalParser(input, idTable);
        String syntaxTree = pp.program().indentedToString(0);
        if(pp.isParsable()) {
            System.out.println("Printing syntax tree for " + fileName);
View Full Code Here


     * Static method that is used to outputs the test results of a specified
     * file.
     * @param fileName
     */
    public static void testFile(String fileName) {
        SymbolTable idTable = new SymbolTable();
        File input = new File("src\\pascalcompiler\\test\\codegeneration\\" + fileName + ".txt");
        PascalParser pp = new PascalParser(input, idTable);
        SyntaxTreeNode syntaxTree = pp.program();
        String output;
        CodeGenerator myCode = new CodeGenerator();
View Full Code Here

    /**
     * Generates MIPS code for the file name given to to the method.
     * @param fileName
     */
    public static void generateAssemblyCode(String fileName) {
        SymbolTable idTable = new SymbolTable();
        File input;
        PascalParser pp = null;
        try {
            input = new File(fileName + ".pascal");
            pp = new PascalParser(input, idTable);
View Full Code Here

TOP

Related Classes of pascalcompiler.parser.SymbolTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.