Basic parser to transform a simple maths equation into a tree representation. Currently provides support for parsing Prefix and Infix representations.
None
Parsing an infix expression into a tree representation
$equation = "3+5*4+8";
$parser = new Equation\Parser\Infix(
new Equation\Lexer\Regex(),
new SplStack(),
new SplStack()
);
$tree = $parser->parse($equation);
Printing a parsed tree into an alternative notation
print (new Equation\Printer\Prefix)->print($equationTree);