Hacker News new | ask | show | jobs
by nostroso 3222 days ago
I find the remarks a bit discouraging. It is not a bad exercise. It is quite creative as well. I had a look at nymph_compiler.c. Without using a lexer/parser generator, it is a bit hard to guarantee much about what it will be doing, or even to produce BNF specifications. But then again, I think they also abandoned bison for gcc, and started hand-coding the parser. Maybe the bison approach is also naive in its own way:

https://softwareengineering.stackexchange.com/questions/2546...

"A hand-written recursive-descent C++ parser has replaced the YACC-derived C++ parser from previous GCC releases."

"GCC switched to hand-written parsing because error messages are more meaningful when using recursive descent techniques. Also, C++ is becoming such a (syntactically) complex language to parse that using parser generators is not worthwhile for it."

It is strange, because the more complex the language, the more I would expect that they would move to lexer/parser generator tools, while it seems to be exactly the other way around.