/** * Vladimir Vacic, Betul Buyukkurt * Computer Science and Engineering Department * University of California, Riverside * * CS152 - Compiler Construction */ import java_cup.runtime.*; import java.io.FileReader; import syntaxtree.*; import visitor.*; public class Main { public static void main(String [] args) { try { // Do not get confused, "Program" is the name of a syntax-tree node. Parser p = new Parser(new Lexer(new FileReader(args[0]))); Program prog = (Program)p.parse().value; prog.accept(new PrettyPrintVisitor()); } catch(Exception e) { } } }