Whiteknight / ParserObjects

C# library for parser combinators
https://whiteknight.github.io/ParserObjects
Apache License 2.0
6 stars 0 forks source link

PEG Parser #205

Open Whiteknight opened 7 months ago

Whiteknight commented 7 months ago

We should be able to take a string PEG grammar and produce an IParser for that grammar.

We'll need some kind of way to specify custom callback code for each rule. I don't want the PEG grammar string to contain arbitrary C# code that we need to parse and eval.

Also would like to try to do some intelligent packrat memoization where it makes sense. Some kind of heuristic for which rules are worth memoizing and then wrapping those in a Cache() parser would be helpful.