Next: Calc++ Parsing Driver, Up: A Complete C++ Example
Of course the grammar is dedicated to arithmetics, a single
expression, possibly preceded by variable assignments. An
environment containing possibly predefined variables such as
one and two, is exchanged with the parser. An example
of valid input follows.
three := 3
seven := one + two * three
seven * seven