-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Polish Notation #19
Comments
I think it could be implemented as another parse function, like parse_polish or so. The resulting AST would be the same (as it's elixir AST anyway). |
Do you like the idea of having this in your library? Or would it be something that would be at application level? |
I'll gladly accept a PR that adds a second function to parse a different syntax into the same internal representation (the AST). If you need any pointers, feel free to ask. I think writing your own parser is an excellent excercise. |
You can probably get away with copying and then modifying this file: https://github.com/narrowtux/abacus/blob/master/src/math_term_parser.yrl This is in erlangs yecc language: https://erlang.org/doc/man/yecc.html When it's compiled, a module named |
Thanks, I will try it out and send a PR! :) |
Supporting Polish Notation would be a cool addition to this library in my opinion. Or a polish notation evaluation library may be a idea for another math library? But I dont know how something like this would be done. Just throwing the idea out here.
https://en.wikipedia.org/wiki/Polish_notation
Thanks for reading my issue!
The text was updated successfully, but these errors were encountered: