tla-transmutation
tla-transmutation copied to clipboard
full TLA+ parsing
Just an FYI (from your talk here: https://www.youtube.com/watch?v=trm9Lp0yt6Y), you can parse TLA+ with either Apalache (it outputs JSON which you can then walk in whatever language you want), or there's a Python project here (based on an Ocaml project): https://github.com/tlaplus/tla_python
Either way, you don't have to build the TLA+ parsing from scratch.
Another alternative is the tree-sitter grammar: https://github.com/tlaplus-community/tree-sitter-tlaplus
It isn't really made to be the backbone of an interpreter/compiler/transpiler, but it is complete and has minimal runtime requirements. See the dev examples here: https://github.com/tlaplus-community/tlaplus-tool-dev-examples/tree/main/tree-sitter
Will Schultz has used it to make a web interpreter for TLA+: https://github.com/will62794/tla-web
Thanks for the tips! I've actually been postponing taking care of this (terrible) parser of mine for a while now, but this week I've started a converter from Apalache's internal representation (from the produced JSON) to mine. I believe it's the best alternative right now since it's the most used tool from all these.