Lex and Yacc
Lex is a tool used for lexical analysis and building lexical scanners. Yacc is a tool for specifying the grammar of a language and processing parts of the language so recoginized using a syntax tree. These tools provide a convenient way of building source code analyzers, debuggers, compilers, interpreters, code converters, etc. The best part is that these tools generate C code and can also incorporate user-defined C code within the code so generated. Flex is an improved version of Lex that also supports C++ and Bison is an improved version of yacc.