Whiteknight / ParserObjects

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

Sequence to read from delegate #187

Closed Whiteknight closed 1 year ago

Whiteknight commented 1 year ago

We should be able to have a source that can read from a callback delegate, by passing in the current index. The delegate should return both the requested item AND a flag saying whether it's at the end.

Whiteknight commented 1 year ago

In v5 I have added DelegateSequence and DelegateCharSequence to implement ISequence<T> and ICharSequence respectively. While more testing and performance-tuning are necessary, I am happy with these so far. I am closing this issue.