3 ms·
Thanks :) The reason it looks like that is because I need a way to distinguish binary calls from unary calls: `a b` would call the combinator `a` with the parse
by gosukiwi 6y ago
Thanks :) The reason it looks like that is because I need a way to distinguish binary calls from unary calls: `a b` would call the combinator `a` with the parser `b` as input. `a b c` will call the combinator b with a and c as input.
I certainly could have chosen another syntax, but I settled for that one. Because the user can define their own combinators I can't just hard-code all combinators into the syntax.
For example `*:A` is alias for `(many0 (token A))` but if the user defines his/her own unary combinator, I need a way to let him/her call it without changing the syntax.