ext_232732 ([identity profile] eichin.livejournal.com) wrote in [personal profile] dmaze 2004-11-27 09:18 pm (UTC)

"This parser can be expressed in yacc" does say *something* (albeit probably not as much as people think it does) about the grammar itself - sort of a static-check on the possible ambiguity. Similarly, it reduces certain kinds of mistake (though it trades them for others at a higher level, mostly.)

On the other hand, the BSD ftpd used yacc for the protocol parser - which seems to have been a mistake of near-sendmail proportions. And the one major change I made to the GNU C++ grammar (nested types) couldn't be done in yacc, and involved C code between the tokenizer and the parser. I haven't had much excuse for writing parsers, in general - there's almost always a "simplify this to something I can throw at some pre-existing parser" path that makes things easier for the end-user too.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org