G L M N P R S T

G

getLeft() - Method in class Node
Getter for the left subtree
getRight() - Method in class Node
Getter for the right subtree
getString() - Method in class Node
Getter for the content

L

left - Variable in class Node
Reference to the left subtree

M

Main - Class in <Unnamed>
A primitive tester to verify that the parser works as expected.
Main() - Constructor for class Main
 
main(String[]) - Static method in class Main
Instantiates the parser and lets it parse the command line arguments

N

Node - Class in <Unnamed>
Node for the parse tree
Node(String) - Constructor for class Node
Constructs a new node, sets the left and the right subtree to null

P

parse(String) - Method in class Parser
Sets up the members, starts the parser and checks if the whole string was parsed correctly.
ParseException - Exception in <Unnamed>
Exception class for the expression parser
ParseException(String) - Constructor for exception ParseException
Constructs a new ParseException
parseExpression() - Method in class Parser
Parses an "expression", which is a production with the operators + and -
parseFactor() - Method in class Parser
Parses a "factor", which is either an expression enclosed by "(" and ")" or a simple number.
parseNumber() - Method in class Parser
Returns an integer number from the string
Parser - Class in <Unnamed>
A parser for simple arithmetic expressions with the operators +, -, *, / and ( ) It was written as a demonstration of a recursive descent parser, therefore the emphasis is on simplicity.
Parser() - Constructor for class Parser
 
parseTerm() - Method in class Parser
Parses a "term", which is a production with the operators "*" or "/"
position - Variable in class Parser
Current position in the string

R

right - Variable in class Node
Reference to the right subtree

S

setLeft(Node) - Method in class Node
Setter for the left subtree
setRight(Node) - Method in class Node
Setter for the right subtree
str - Variable in class Parser
String to be parsed
string - Variable in class Node
Content of the node

T

traverse(Node) - Static method in class Main
Traverses the parse tree and prints the nodes in post order

G L M N P R S T