Convenience class for using the MathParser library. More...
Public Member Functions | |
| setSimplifying ($flag) | |
| parse ($text) | |
| Parse the given mathematical expression into an abstract syntax tree. More... | |
| getTokenList () | |
| Return the token list for the last parsed expression. More... | |
| getTree () | |
| Return the AST of the last parsed expression. More... | |
Private Attributes | |
| $lexer | |
| StdMathLexer $lexer instance of StdMathLexer used for tokenizing. | |
| $parser | |
| Parser $parser instance of Parsed used for the actual parsing. | |
| $tokens | |
| Token[] $tokens list of tokens generated by the Lexer. | |
| $tree | |
| Node $tree AST generated by the parser. | |
Convenience class for using the MathParser library.
StdMathParser is a wrapper for the StdMathLexer and Parser classes, and if you do not require any tweaking, this is the most straightforward way to use the MathParser library.
| MathParser\RationalMathParser::getTokenList | ( | ) |
Return the token list for the last parsed expression.
| Token[] |
| MathParser\RationalMathParser::getTree | ( | ) |
Return the AST of the last parsed expression.
| Node |
| MathParser\RationalMathParser::parse | ( | $text | ) |
Parse the given mathematical expression into an abstract syntax tree.
| string | $text | Input |
| Node |