gkappler / CombinedParsers.jl

Compiled parser combinators and regular expressions in pure julia
MIT License
77 stars 10 forks source link

Parsing algorithms for ambiguities #24

Open jtrakk opened 3 years ago

jtrakk commented 3 years ago

There are various parsing algorithms that have different properties. Earley parsers can see if a string matches the grammar in multiple different ways and return all of the options. That's mentioned briefly in the ParserCombinator.jl docs and is supported by Python's Lark.

jtrakk commented 3 years ago

I wonder if CombinedParsers.jl and Lerche.jl could share some algorithms.

gkappler commented 3 years ago

CombinedParsers can also iterate all matches of a grammar, just iterate over parse_all.

I am checking out Lerche, plugging in more efficient parsing algorithms would surely be good. I need to see if/how that is possible with the functional parser combinator paradigm.