Some parsers shouldn't have error messages, they always should produce success results. For such parsers caring about expectations is really expensive and unnecessary. Idea is to make some subclass or some flag to exclude everything unneeded. I've tested on my library (just copied and rewrote many, skipMany and choose methods) and parser started working 30% faster.
Some parsers shouldn't have error messages, they always should produce success results. For such parsers caring about expectations is really expensive and unnecessary. Idea is to make some subclass or some flag to exclude everything unneeded. I've tested on my library (just copied and rewrote many, skipMany and choose methods) and parser started working 30% faster.