Package edu.cmu.tetrad.calculator.parser
Class ExpressionParser
java.lang.Object
edu.cmu.tetrad.calculator.parser.ExpressionParser
Parses a string into a tree-like expression.
- Author:
- Tyler Gibson
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumThe type of restriction on parameters.
- 
Constructor SummaryConstructorsConstructorDescriptionConstructrs a parser that has no allowable parameters.ExpressionParser(Collection<String> parameters, ExpressionParser.RestrictionType type) Constructs the parser given a collection of allowable parameters.
- 
Method SummaryModifier and TypeMethodDescriptionintparseEquation(String equation) Parses an equation of the form Variable = Expression.parseExpression(String expression) Parses the given expression, or throws an exception if its not possible.
- 
Constructor Details- 
ExpressionParserpublic ExpressionParser()Constructrs a parser that has no allowable parameters.
- 
ExpressionParserConstructs the parser given a collection of allowable parameters.
 
- 
- 
Method Details- 
parseExpressionParses the given expression, or throws an exception if its not possible.- Throws:
- ParseException
 
- 
parseEquationParses an equation of the form Variable = Expression.- Throws:
- ParseException
 
- 
getNextOffsetpublic int getNextOffset()
- 
getParameters
 
-