I did my Master’s degree from a lab that focused on compilers and virtual machines. Surely enough, we were sometimes expected to write a compiler for unfamiliar languages in cooperative projects.
Tedious but unavoidable work in writing compiler is making a parser, and I really hated using ‘lex’ and ‘yacc’ for the job; I always found LALR parser generators distasteful, and it was immoderate to write prototypes in C.
I attribute the following for this success: 1) PEG is much intuitive than CFG; 2) dynamic language wins in prototyping; 3) plain lists & dictionaries are useful than structured data; 4) JS comes with some meta-programming facilities.
Because of the confidentialiy issue, I cannot disclose the code I wrote; instead, I am enclosing another parser I wrote in Ometa-JS.
For more information,