Class Parse

  extended by Parse

public class Parse
extends java.lang.Object

This class is an entry point to the LL(1) parser in the simple package. The program's interface is as required by Homework 1 specification.
Sample usage (where input is a file containing the input expression string):

java Parse < input

The driver program creates a SimpleParser object by passing the source string in input. The parser parses it and returns a parse tree rooted with a Stmt node. A PostfixPrinter visitor is then created to visit the tree and outputs a postfix string version of input. Finally, if any problem is encountered along the way, a ParseException is caught and the message "Parse error" is displayed.

Santoso Wijaya
See Also:
SimpleParser, ParseNode, Stmt, Visitor, PostfixPrinter

Constructor Summary
Method Summary
static void main(java.lang.String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Parse()
Method Detail


public static void main(java.lang.String[] args)