Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I’m an implementation I made ages ago, I created a different operator, the “naughty or”, which defines “invalid” syntax paths (for example, if the entire parse fails, allow going into the branch that does match identifiers that start with a number). This adds a language-level facility for a strategy I see most hand-rolled parsers end up in, which is to start parsing common mistakes to be able to provide better errors. It’s basically “free” because those paths are only explored if the parse is known to fail, so performance of successful parses isn’t affected, and allows the same level of “craft” in error messages as a hand-rolled one. It also allows people to easily submit patches to improve confusing errors they’ve gotten.
https://github.com/tolmasky/language