Next: , Up: A Complete C++ Example   [Contents][Index] Calc++ — C++ Calculator

Of course the grammar is dedicated to arithmetic, 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