Is there an open source (lgpl, bsd, mit) math parser/lexer library available out there? Has anybody ever written one by themselves (with support for variables, exponents, grouping) and have some tips/hints?

Why don't you use the Python interpreter...It does a great job of parsing

I could use the intepreter to evaluate, but that's not what I want. I want to parse the expressions into data structures that I can easily inspect in code.

So... this question is still open.

Edited 7 Years Ago by scru: n/a

A nice LR(1) parser is wisent. Simple to use and efficient. Also it generates parsers independant of wisent, so that a user of your program wouldn't need wisent to run your wisent-generated parser.

Edited 7 Years Ago by Gribouillis: n/a

A nice LR(1) parser is wisent. Simple to use and efficient. Also it generates parsers independant of wisent, so that a user of your program wouldn't need wisent to run your wisent-generated parser.

Thanks for the suggestion. I've been able to use wisent for what I want.

This question has already been answered. Start a new discussion instead.