craff / pacomb

A parsing library that compiles grammars to combinators using elimination of left recursion
MIT License
18 stars 2 forks source link

Should we have the buffer and column number as a pair everywhere? #8

Closed rlepigre closed 5 years ago

rlepigre commented 5 years ago

I is very annoying to work with buf and pos all the time. Do we actually gain anything on the side of efficiency with that?

craff commented 5 years ago

Yes, the gain is wors it, ocaml using register as parameters. Moreover, the type comb being private, this is not really a problem.

rlepigre commented 5 years ago

Frankly, I'm not sure that uncurrying a function makes such a big difference. And the problem is not limited to combinators: the user still sees that when writing a blank function or a lexeme.