943,580 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Marked Solved
  • Views: 1341
  • Python RSS
Sep 21st, 2009
0

Math lexer/parser

Expand Post »
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?
Similar Threads
Featured Poster
Reputation Points: 975
Solved Threads: 140
Posting Virtuoso
scru is offline Offline
1,624 posts
since Feb 2007
Sep 21st, 2009
0

Re: Math lexer/parser

Why don't you use the Python interpreter...It does a great job of parsing
Reputation Points: 499
Solved Threads: 366
Postaholic
gerard4143 is offline Offline
2,195 posts
since Jan 2008
Sep 21st, 2009
0

Re: Math lexer/parser

Click to Expand / Collapse  Quote originally posted by gerard4143 ...
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.
Last edited by scru; Sep 21st, 2009 at 7:24 pm.
Featured Poster
Reputation Points: 975
Solved Threads: 140
Posting Virtuoso
scru is offline Offline
1,624 posts
since Feb 2007
Sep 21st, 2009
1

Re: Math lexer/parser

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.
Last edited by Gribouillis; Sep 21st, 2009 at 9:44 pm.
Reputation Points: 930
Solved Threads: 666
Posting Maven
Gribouillis is offline Offline
2,655 posts
since Jul 2008
Sep 26th, 2009
0

Re: Math lexer/parser

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.
Featured Poster
Reputation Points: 975
Solved Threads: 140
Posting Virtuoso
scru is offline Offline
1,624 posts
since Feb 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Automatic Downloader from URL
Next Thread in Python Forum Timeline: wx.ListCtrl help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC