loading...

re: Arrow functions break JavaScript parsers VIEW POST

TOP OF THREAD FULL DISCUSSION
re: JS is parsed with a TDOP (Top Down Order Precedence) parser. This may explain why it's hard to cover all edge cases using an alternative (ex EBNF)...
 

I took a look at Crockford's post on this. It seems like he thinks TDOP is a good fit for "Simplified JavaScript", which wouldn't have these ambiguities in the language.

My post is more about simple L-to-R parsers, and maybe a better title would be on "breaking tokenizers". Unfortunately tokenizers technically can't be as simple as we expect because of the ambiguities I outline. This is why breaking most syntax highlighters is trivial ;)

code of conduct - report abuse