问题
Are there any python modules available for parsing and manipulating symbolic expressions in Python similar to how Lisp expressions are evaluated?
回答1:
pyparsing (dead link - but see github: pyparsing) comes with an S-expression parser as an example, see here.
回答2:
Also, depending on how much work with sexpressions you are doing you might want to check out python hy: https://github.com/hylang/hy
来源:https://stackoverflow.com/questions/3182594/parsing-s-expressions-in-python