|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectParse
public class Parse
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.
SimpleParser,
ParseNode,
Stmt,
Visitor,
PostfixPrinter| Constructor Summary | |
|---|---|
Parse()
|
|
| 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)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||