Ragel generates very fast code, is modular by design and has good error handling. It supports both compiled and scripted languages (e.g. can generate both Ruby and C) which is useful if you need a fallback.
I've really enjoyed using it to implement the following:
- A template language for Ruby: https://github.com/ioquatix/trenni/blob/master/parsers/trenn...
- A SGML parser for Ruby: https://github.com/ioquatix/trenni/blob/master/parsers/trenn...
- A HTTP V1 protocol parser: https://github.com/kurocha/async-http/blob/master/source/Asy...
- A URI parser: https://github.com/kurocha/uri/blob/master/source/URI/RFC398...
I'll admit, it does take a while to understand how to correctly handle ambiguity when dealing with callbacks/events during parsing, but generally speaking, once you get a bit of experience with how things work, it becomes a very powerful tool in your toolbox.