Parsing text using a formal grammar: SWIPL Example

As I see it, in the pre-ISO days Prolog systems tried to be as tolerant as they could be and some projects used this enthusiastically to define DSLs (Domain Specific Languages). Prolog systems did resolve ambiguities in different ways though. ISO tried to resolve this mess. As a result though we ended up with something that is rather restrictive. Even the standard-aware SICStus Prolog decided not to follow. They use Prolog non-determinism. I’ve tried to build something fully compatible, but failed and dropped that project.

I don’t know where we should move. We could all cleanly implement the ISO rules. That breaks many of these fancy DSLs (forcing additional parenthesis), but would work pretty much ok for arithmetic, etc. Ideally we’d get to something that is well defined and flexible. For now I just leave things alone. If anyone wants to pick it up, please do so.