I am intending to define a protocol similar to Open Sound Control, but a bit different.
The idea is quite complex, and I won't try to describe it here.
Suppose I was to implement an OSC library using libev and one of the tools in the subject line.
What would one recommend, and why?
Ragel seems quite tempting, though ANTLR may be the right thing too. However sticking to traditional UNIX things is also a good idea (i.e. lex/yacc).
Also I am mostly interested in what would be most suitable for an embedded platform (say 200MHz ARM chip running Linux).
Bison is the GNU implementation/extension of Yacc, Flex is the successor of Lex. In either case, it's fine (and recommended) to use bison / flex. Additionally, byacc, the Berkeley implementation of yacc, is widely available (I see it in my Debian repository list).
Lex and Yacc were the first popular and efficient lexers and parsers generators, flex and Bison were the first widespread open-source versions compatible with the original software. Each of these software has more than 30 years of history, which is an achievement in itself.
Bison originated as a workalike of a program called Yacc — Yet Another Compiler Compiler. 9. Yacc was written at Bell Labs as part of the very early development of Unix; one of its first uses was to develop the original Portable C Compiler, pcc. The same person, Steven C. Johnson, wrote Yacc and the original pcc.
Wikipedia has a list that includes ANTLR, Lemon, Flex, Bison, Ragel, etc.
http://en.wikipedia.org/wiki/Comparison_of_parser_generators.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With