Are there any python modules available for parsing and manipulating symbolic expressions in Python similar to how Lisp expressions are evaluated?
Asked
Active
Viewed 9,099 times
12
-
2Do you want an s-expression parser that produces Python data structures or an eval facility that evaluates s-expressions as code? – Marcelo Cantos Jul 05 '10 at 23:14
-
Sorry for not clarifying- I need to evaluate the s-expressions as code. – adinsa Jul 05 '10 at 23:17
-
1@adinsa When you say "evaluate the s-expressions as code", how do you expect them to be run? As if they were lisp expressions? If so, then that would require embedding a lisp interpreter. – Edward Loper Dec 27 '12 at 18:13
-
this also exists: https://github.com/jd-boyd/sexpdata/ – Charlie Parker Apr 22 '19 at 22:02
-
https://gist.github.com/pib/240957 – ferdymercury Mar 30 '22 at 17:56
2 Answers
0
Also, depending on how much work with sexpressions you are doing you might want to check out python hy: https://github.com/hylang/hy

joefromct
- 1,506
- 13
- 33