3 ms·
> Can we stop hand-writing parsing code in C please? I think that tweet is more about using Lex or Yacc instead of hand-coding logic to parse strings.
by TYPE_FASTER 11y ago
> Can we stop hand-writing parsing code in C please?
I think that tweet is more about using Lex or Yacc instead of hand-coding logic to parse strings.
- xamuel 11y agoLex/Yacc are great for parsing things like your own internal files that the end-user never directly touches. But if you really care about your users, there are certain times when you've just gotta bite the bullet and hand-roll a parser. Because when the user mis-places a punctuation mark, it's much better to give them a humanly-thought-out human-readable error message rather than a generic blob of unreadable gibberish.