These are chat archives for pest-parser/pest

5th
Feb 2018
jpathy
@jpathy
Feb 05 08:04
Is it possible to do incremental parsing with pest?
Dragoș Tiselice
@dragostis
Feb 05 09:54
@cgm616 It's on the top of the README.
@jpathy Not yet. I've been considering multiple approaches, but it's hard to retain the nice performance while exploring this area. What I'm considering right now is having a way to push input chunks down the pipeline with a buffered steam of sort, but I haven't put down a plan yet. Any ideas/PRs are welcome, though!
James Harton
@jamesotron
Feb 05 21:33
One nice thing about pest is that it’s easy to reuse parts of the parser because you get to choose the entry rule. This means that while incremental parsing isn’t supported out of the box you can sort of do it as long as you can do it one entire production at a time.
Especially if you can make a reasonable guess about the input from context
For example there are probably entire branches of the parser that are not valid in the context of a REPL depending on the language semantics of course.
One thing I’d like to see more than incremental parsing is parser composition. Ie being able to combine multiple smaller parsers together into my language.