#Considering using TXR as a dependency. What alternatives exist?
1 messages · Page 1 of 1 (latest)
(for those unaware, TXR can be found here https://github.com/YAL-GameMaker/tiny-expression-runtime)
I don’t think I can think of too many from the top of my head, besides the obvious. (Catspeak, that one JSON-based runtime variant that was in Cookbook Jam… can’t remember it)
Or writing your own 🤔
honestly really depends on your use case, there is a bunch of alternatives which all favor differing things. like gmlc is unreleased as its waiting on wittle widgets to have a working code editor so i can release both at once. but that, and as tab said catspeak, are both more feature complete use cases. but if you're just trying to parse numbers and strings, then txr is probably best
i also know of someone who has added function support to txr, so you can define functions inside it
now that i'm thinking about it a bit more i don't think i need something as featureful as TXR even
probably better off writing my own thing
summons crafting interpreters
i've got an expression parser lying around somewhere
i mean you have one in your file parsing library no?
yeah but that one's crap
Do you need to only evaluate expressions, or also statements?
both
Yeah it gets more complicated then. Like Tab said, Crafting Interpeters is a great source.
thanks but that's not the question
i know how to write a parser etc. but it would be nice to use someone else's
Yeah, I don't know whether there are actually other ones freely available (outside what has already been mentioned)
i'll send you access to gmlc, its pretty feature complete feel free to rip anything out of the parser and it should still work pretty seemlessly
no need for credits
i would like to take a look if nothing else
was designed to be added to or removed from extremely easily