Mathias

Results 205 comments of Mathias

What you want is this: ``` zeroOrMore(RuleN[T :: HNil]): RuleN[Seq[T] :: HNil] zeroOrMore(RuleN[T :: T :: HNil]): RuleN[Seq[T] :: HNil] zeroOrMore(RuleN[T :: T :: T :: HNil]): RuleN[Seq[T] :: HNil]...

If that's what you want you can simply group your values into a tuple, no?

Yes. We'll get this fixed with an entirely new parser and rule design.

The work-around of wrapping the argument with another application of the `rule` macro should work: ``` scala rule( "omg" ~ id(rule("wtf" ~ "bbq"))) ```

Ah, a hygiene issue. I see. I guess we'll have to wait for the "new design" with parser singletons and static rules to emerge before being able to solve higher-order...

The question is how we can distinguish between the in principle legal (#116): ``` scala def foo = rule(bar(baz)) def bar(r: => Rule0) = r def baz = rule(...) ```...

Yes, I remember something too. I added the ticket more as a reminder for an interesting application of pb2. No real pressure behind it for the time being.

There are likely several solutions to this context problem. The maybe fastest one would be to establish a side-channel for the context information with a mutable var on the Parser...

@lihaoyi You can indeed do this "special variant" of `&` in userland. You have full access to the (untyped) ValueStack through the `valueStack` member on the Parser. If you look...

Cool! Your parser is not as big as I would have imagined, nice work!