2 ms·
* Easy: Python, Java. Python generates a top-down parser from Grammar/Grammar using its own pgen.c system, and the Java spec has a grammr. This doesn't mean
by chubot 10y ago
* Easy:
Python, Java. Python generates a top-down parser from Grammar/Grammar using its own pgen.c system, and the Java spec has a grammr. This doesn't mean there's no ambiguity, but they are easier.
* Pretty easy:
JavaScript, Go. I think the semi-colon insertion rule kind of breaks the lexer/grammar model, but they are still easy to parse.
* Hard:
- C (http://eli.thegreenplace.net/2007/11/24/the-context-sensitivity-of-cs-grammar)
- Ruby (related thread: https://news.ycombinator.com/item?id=13825975)
- OCaml -- AFAIK, a naive yacc-style grammar will generate tons of shift-reduce conflicts
- Haskell -- based on hearsay, I think this is hard
* Insane:
C++, Perl, to some extent bash. See the end of my post "Parsing Bash is Undecidable" for links: http://www.oilshell.org/blog/2016/10/20.html http://www.oilshell.org/blog/2016/10/20.html
I'm not as familiar with languages like PHP and C#, but they're somewhere between the easy and hard categories.