Re:Owl: Parser generator for visibly pushdown languages
by lihaoyi on Wednesday November 07, 2018 @02:59PM
(#18401878)
My FastParse (https://www.lihaoyi.com/fastparse/) parser combinator library does this; by default it runs without error logging, just giving you an error position, but if something fails you can ask it to re-do the parse keeping track of additional metadata to give you a nice error message with what tokens could have succeeded and a stack trace telling you why wants those tokens.
Tracing errors
slows things down about 2x, which is why it isnt on by default, on the assumption that most parses are successful
Tracing errors slows things down about 2x, which is why it isnt on by default, on the assumption that most parses are successful