Package memely
Class ExpressionParser
java.lang.Object
memely.ExpressionParser
public class ExpressionParser extends Object
-
Constructor Summary
Constructors Constructor Description ExpressionParser() -
Method Summary
Modifier and Type Method Description static voidmain(String[] args)Main method.static Expressionparse(String string)Parse a string into an expression.
-
Constructor Details
-
ExpressionParser
public ExpressionParser()
-
-
Method Details
-
main
Main method. Parses and then reprints an example expression.- Parameters:
args- command line arguments, not used- Throws:
edu.mit.eecs.parserlib.UnableToParseException- if example expression can't be parsed
-
parse
Parse a string into an expression.- Parameters:
string- string to parse- Returns:
- Expression parsed from the string
- Throws:
edu.mit.eecs.parserlib.UnableToParseException- if the string doesn't match the Expression grammar
-