Hacker News new | ask | show | jobs
by awestroke 1108 days ago
Ambigious does not mean invalid
2 comments

For people who see parsing as model checking, ambiguity means something vastly different (inferior) to leniency.

Fast parsers that use a schema are also doing model checking.

Yes, technically it means "there's more than one derivation"

But Python's pgen rejects such grammars as invalid ... The other strategy is just to pick an arbitrary interpretation