Re:LL and LR in Context: Why Parsing Tools Are Hard (2013)
by qznc on Wednesday February 24, 2016 @07:18AM
(#11166144)
"Error messages" is the usual argument I hear. The article does not address this. I would appreciate an article, why parser generators can or cannot provide error messages on par with handwritten parsers.
[ Parent
| on HN ]
Re:LL and LR in Context: Why Parsing Tools Are Hard (2013)
by haberman on Wednesday February 24, 2016 @10:00AM
(#11167186)
Good point. I have heard this too and I don't have a deep answer to this question. Maybe someday I'll get to the bottom of it and write a follow-up article. (Article author here).
Re:LL and LR in Context: Why Parsing Tools Are Hard (2013)
by user51442 on Wednesday February 24, 2016 @11:08AM
(#11167756)
Years ago I worked on an SML parser that used LR tables, on errors (ie. with no valid transition) it would try to find a symbol to insert/delete/modify that would allow parsing to continue. It dealt reasonably well with simple errors, though ML syntax is a bit flexible - function application is juxtaposition and it has user-defined infix operators (to deal with them, the parser would resolve reduce-reduce and reduce-shift conflicts dynamically by calling a function at runtime).
Code is here, in fact:
https://github.com/Ravenbrook/mlworks/blob/master/src/parser...
Re:LL and LR in Context: Why Parsing Tools Are Hard (2013)
by ericbb on Wednesday February 24, 2016 @10:37AM
(#11167483)
Here's one that might interest you.
Generating Good Syntax Errors http://research.swtch.com/yyerror