djspiewak / parseback

A Scala implementation of parsing with derivatives
http://parseback.io
Apache License 2.0
197 stars 22 forks source link

Implement disambiguation filters #6

Closed djspiewak closed 7 years ago

djspiewak commented 7 years ago

This is a mostly syntactic enhancement, but some algorithmic work is required. The goal is to port over some variant of the gll-combinators AST disambiguation filters (test examples here).

djspiewak commented 7 years ago

We're now using lazy Catenable rather than List for results, so in theory this should be doable in the same way that it is in gll-combinators. Some careful reasoning about asymptotic implications is required.

djspiewak commented 7 years ago

Implemented in master. Catenable was basically completely broken (not anymore!). Copied over precedence/associativity stuff basically straight up from gll-combinators.