Earlier quoted context omitted.
What do you lose by sticking to context-free grammars?
Ability to prefix fields by size. Which in turn means you can't preallocate buffers because you don't know the sizes in advance.
Hammer: Parser Combinators for C
11–20 of 21 posts
Re: Hammer: Parser Combinators for C
#12Amusing name given the (coincidental?) existence of Nail [0][1] [0] [PDF] https://people.csail.mit.edu/nickolai/papers/bangert-nail-la... [1] https://github.com/jbangert/nail
I also made some different design decisions than Hammer, giving it a slightly different goal: code generation instead of runtime combinators, output generation, no semantic actions...
Re: Hammer: Parser Combinators for C
#13Also, the author closed the mailing list and packed up; presumably to work for a company who 'bought him out'. Closing the mailing list was a notch rude...
Hammer does look pretty nice, I'm definitely going to have a poke at it!
Re: Hammer: Parser Combinators for C
#14I've been using ragel for a few years, and really like it; but it does have the problem of not handling very well bit based structures (or, even, 8 bits based structures). Also, the author closed the mailing list and packed up; presumably to work for a company who 'bought him out'. Closing the mailing list was a notch rude... Hammer does look pretty nice, I'm definitely going to have a poke at it!
I'm still hopeful Ragel 7 will happen.
Re: Hammer: Parser Combinators for C
#15I think the biggest question I need answered is "why would I use this and not ANTLR"?
Re: Hammer: Parser Combinators for C
#16Amusing name given the (coincidental?) existence of Nail [0][1] [0] [PDF] https://people.csail.mit.edu/nickolai/papers/bangert-nail-la... [1] https://github.com/jbangert/nail
Grr, whatever happened to plain C with no dependencies?
Re: Hammer: Parser Combinators for C
#17TRX formally verified parser interpreter http://arxiv.org/pdf/1105.2576.pdf
Validating LR(1) Parsers http://gallium.inria.fr/~xleroy/publi/validated-parser.pdf
Verifying a parser for a C compiler http://gallium.inria.fr/~scherer/gagallium/verifying-a-parse...
Re: Hammer: Parser Combinators for C
#18Re: Hammer: Parser Combinators for C
#19Amusing name given the (coincidental?) existence of Nail [0][1] [0] [PDF] https://people.csail.mit.edu/nickolai/papers/bangert-nail-la... [1] https://github.com/jbangert/nail
Before I moved down to MIT, I studied with Sergey, so the name is not at all coincidental. Nail tries a slightly different agenda. Instead of trying to make people design their formats in a reasonable way (which is excellent in the long term), Nail tries to allow people to get some (maybe most) of the benefits of parser generators, but for arbitrary formats. I also made some different design decisions than Hammer, gi…
Re: Hammer: Parser Combinators for C
#20Great work by the LANGSEC crowd. My recent interest in parsers was those verified for correctness or security. So, they have security and a certain amount of correctness. A great next step would be combining it with work on formal verification of parsers or generators (see below). On top of that, ensure the subset could generate SPARK and/or CompCert-compatible C code to automate much of the rest of the problem. TRX…