Re:Don't Panic! Better, Fewer, Syntax Errors for LR Parsers
by userbinator on Wednesday July 15, 2020 @08:15PM
(#23854150)
In theory it's "the solved problem that isn't", in practice it is --- there's a reason the compilers for the most popular programming languages either moved to or have always been recursive-descent with perhaps a bit of operator-precedence/precedence-climbing to handle the repetitive cases of binary operators. GCC, Clang/LLVM, Java, and C# are the ones that immediately come to mind; and no doubt there are plenty of others.
Re:Don't Panic! Better, Fewer, Syntax Errors for LR Parsers
by choeger on Thursday July 16, 2020 @03:55AM
(#23856802)
There are way more parsers out there in production than the top-ten programming language implementations. Just think about serialization formats (json, bson, protobuff, et.al.): There are maybe 10 or so widely used. Then think about message formats (http, xml, yaml, ...): Maybe another 10 or so? Then think about configuration languages (.ini, .toml, ...), let's call that 5?. On top of that we have a bunch of widely used scripting languages (Make, sh, various lisps), I would say again 5 or so.
So for any new language, say rust, you want (ideally) parsers for about 30 or more languages in real-world use cases. And that does not include language prototyping or consider the fact that recursive-descent parsers are usually not available as libraries (say for use in an editor).
In conclusion: Having good automatic parser generators readily available is very relevant. And "good" can obviosly include usability, IMO.
I hope to study this paper well (which is by the author of the above post) and understand what their algorithm is. I feel that good error messages make or break a language.
Here is the arxiv link of the same paper: https://arxiv.org/pdf/1804.07133.pdf