4 ms·
My FastParse (https://www.lihaoyi.com/fastparse/ https://www.lihaoyi.com/fastparse/) parser combinator library does this; by default it runs without error loggi
by lihaoyi 8y ago
My FastParse (https://www.lihaoyi.com/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