Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The above example utilizes the pre-built Expressions class to help building expression parser. Another example is for a simpler s-expression parser (in lisp syntax, "- (+ 1 (* 2 2)) (1)" sort of thing). As s-expression is way simpler to parse expression than expressions with infix operators, we will build the parser without using Expressions class:

...