How is this different from Lex, written in 1975? Even the syntax looks fairly similar. https://en.wikipedia.org/wiki/Lex_(software)
Note also that Ragel isn't some new-fangled thing. It was first released in January of 2002, and is very mature.
11–20 of 22 posts
How is this different from Lex, written in 1975? Even the syntax looks fairly similar. https://en.wikipedia.org/wiki/Lex_(software)
Note also that Ragel isn't some new-fangled thing. It was first released in January of 2002, and is very mature.
Are you aware of anyone working to add Python as a target language? Will Ragel 7's intermediate codegen language make that easier?
I've used Ragel extensively with both C and Go; I can't recommend it more highly enough! Thanks Adrian for your efforts.
How is this different from Lex, written in 1975? Even the syntax looks fairly similar. https://en.wikipedia.org/wiki/Lex_(software)
I'd rather use Lex where Lex is good enough.
How does it compare with LPeg[1] ? This is what I currently use for all my parsing needs.
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/
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.moo...
Earlier quoted context omitted.
Why would you want to do that?
There are a lot of advantages to a declarative approach, and a lot of risks and problems with hand written parsers and state machines. A good example is the http code Zed wrote with ragel. From what I remember it was contracted by verisign because they wanted an implementation that actually followed the spec in detail, unlike all other code available at the time. That ragel code has been reused by a lot of embedded h…
So they don't last. They're not all that maintainable in real teams. My experiences are mostly with ANTLR code (which has a debugger and lots of tooling and isn't that hard at all).
I'm at a loss for how to overcome this.
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/
Earlier quoted context omitted.
There are a lot of advantages to a declarative approach, and a lot of risks and problems with hand written parsers and state machines. A good example is the http code Zed wrote with ragel. From what I remember it was contracted by verisign because they wanted an implementation that actually followed the spec in detail, unlike all other code available at the time. That ragel code has been reused by a lot of embedded h…
The thing I keep finding problematic about declarative approaches is that nobody knows them. That means if you're not a lone wolf on a project, the people editing your declarative state machine are going to be unfamiliar with it. Aside from the complaints that gives (and the "look I rewrote it" issues), that means they make mistakes and don't understand what happens. So they don't last. They're not all that maintaina…