Re:Write a parser with JavaScript
by jedimastert on Thursday December 12, 2019 @11:32AM
(#21773309)
One of my interview questions was to write a toy lisp interpreter (only needs to do addition and multiplication, that kinda thing). Not nearly this crazy, only took like 20 lines of Python, but I could see why it would be helpful.
But an entire JSON parser? That's nuts!
I develop a parsing library for fun and I don't think
that would be an easy or useful interview question.
Maybe it makes sense if you assume the input has already been tokenized so you are not expected to deal with the minutiae of string literal escape sequences and such and can focus on the high level design/flow...
I get the purpose, of course, but geez.