3 ms·
Seems like Lua would be a perfect target for Ragel. Do you know if anyone is working in this direction ? How does it compare with LPeg[1] ? This is what I curr
by fasteo 11y ago
Seems like Lua would be a perfect target for Ragel. Do you know if anyone is working in this direction ?
How does it compare with LPeg[1] ? This is what I currently use for all my parsing needs.
[1] http://www.inf.puc-rio.br/~roberto/lpeg/ http://www.inf.puc-rio.br/~roberto/lpeg/
- leafo 11y agoRagel doesn't support recursion (last I checked), so it's not suitable for many parsing jobs. I considered it for MoonScript's parser at one point but it didn't seem like it could do it. I've been experimenting with this project as a replacement for LPEG for the MoonScript parser: http://piumarta.com/software/peg/ http://piumarta.com/software/peg/ I've made an LPEG style syntax that compiles to the peg syntax for that tool, which is then compiled to c and linked into a Lua module, you can see how the parser is written here: https://github.com/leafo/moonparse/blob/master/parse.peg.moon#L115 https://github.com/leafo/moonparse/blob/master/parse.peg.moo...
- thurston 11y agoAt their core they target different language classes. Ragel deals with regular, whereas LPeg deals with context-free grammars.
- thurston 11y agoWRT Lua, not at this time, but it is one I would like to support. Won't be too much work to add it.