On Sat, Jun 16, 2012 at 4:16 PM, Adrian Thurston <[email protected]> wrote: > Next I want to add in some language constructs that support the common usage > patterns that have emerged for parsing binary protocols using ragel's > conditions. They shows up for me in my work, where I use Ragel for binary > protocols. > > There are different ways to approach value-specified repetition. Some ways > are more awkward than others. Some work well if there is at least one item. > Others work when you can have a zero-length list of items.
You should look at the file(1) UNIX utility. It tries to recognize file format based on rules involving magic constant (among other things). It has its own language for rule definitions. Language: http://pwet.fr/man/linux/formats/magic Real-world rules: http://www.garykessler.net/library/magic.html _______________________________________________ ragel-users mailing list [email protected] http://www.complang.org/mailman/listinfo/ragel-users
