4 ms·
Hi all, Nom's author here. I wrote this paper in January 2015, so some things changed in the meantime: - the benchmarks have been optimized a bit, and someone
by geal 11y ago
Hi all, Nom's author here.
I wrote this paper in January 2015, so some things changed in the meantime:
- the benchmarks have been optimized a bit, and someone contributed a cereal parser that beats nom ( https://github.com/Geal/nom_benchmarks https://github.com/Geal/nom_benchmarks ). It's alright, I just wanted to estimate where it stands
- there is better error management: https://github.com/Geal/nom/wiki/Error-management https://github.com/Geal/nom/wiki/Error-management
- the error management types give powerful debugging features: http://dev.unhandledexpression.com/slides/langsec-2015/img/colortest.png http://dev.unhandledexpression.com/slides/langsec-2015/img/c... (test code: https://github.com/Geal/nom_colored_hexdump https://github.com/Geal/nom_colored_hexdump )
- It is now easy to embed in C ( https://github.com/Geal/nom_in_c https://github.com/Geal/nom_in_c ). I plan to make API compatible versions of some C libs
- there are more example parsers now: https://github.com/Geal/nom/issues/14 https://github.com/Geal/nom/issues/14 feel free to pick one up!
Here are the slides for the conference at the IEEE Langsec workshop: http://dev.unhandledexpression.com/slides/langsec-2015/ http://dev.unhandledexpression.com/slides/langsec-2015/
Langsec is one of the most interesting approaches to follow in security, and the ideas presented this year were amazing (I'm especially fond of the heap exploitation algebra). I highly recommend watching the videos once they will be available.
Writing parsers with nom is easy and fun, please give it a try ;) https://github.com/Geal/nom https://github.com/Geal/nom
- dansimon 11y agoGreat work! I've been working on a Rust parser combinator library myself ( https://github.com/DanSimon/peruse https://github.com/DanSimon/peruse ), though I've been focusing more on parsing syntax trees than binary formats, and it's really cool to see the different approaches you've taken. I had been planning on working on stream parsers next, but I may just defer to nom since it basically looks like what I had wanted to do.
- geal 11y agoI really like your approach with trait objects. This is something I would have liked in nom when I started it, but macros proved more useful for my experimentations (less types to rewrite when I change something). For the streaming part, it is still a work in progress. I need a way to better represent input enabled state machines, otherwise we'll end up with streaming switch based state machines, and they are a security nigtmare.
- kmike84 11y agoNice! Any plans for fancier parsing algorithms (GLL? see e.g. http://www.cs.uwm.edu/~dspiewak/papers/generalized-parser-combinators.pdf http://www.cs.uwm.edu/~dspiewak/papers/generalized-parser-co...)
- geal 11y agoyes, that's the plan! I had to take care of the basic tools and the plumbing first, but I'll add better algorithms.
- pjmlp 11y ago> Langsec is one of the most interesting approaches to follow in security, and the ideas presented this year were amazing (I'm especially fond of the heap exploitation algebra). I highly recommend watching the videos once they will be available. Many thanks for the heads up!