I have a data type of very simple algebraic expressions (with only identifiers, addition, and multiplication), and I want to parse strings such as “a + b * (c + d)” into this type. My default impulse would be to use Ulex+Menhir, but I wonder if there is not a simpler solution for such a simple problem. Any suggestions?
I have a data type of very simple algebraic expressions (with only identifiers, addition,
Share
Stream parser? http://caml.inria.fr/pub/docs/tutorial-camlp4/tutorial002.html
and Genlex for scanner http://caml.inria.fr/pub/docs/manual-ocaml/libref/Genlex.html