Sorry for the late reply.
Since pb2 is a macro-based parser generator you cannot easily create rules at runtime.
You’d have to have the full scala-compiler in your class path and invoke it at runtime, which is probably not something you’d like to do.
If you really need full-scale runtime rule generation then something like parboiled 1 might be the better choice.
On 16.9.2015, at 19:49, gkr [via parboiled users] <[hidden email]> wrote:
> Can I generate rules dynamically in parboiled2 parser? The use case is that I have a bunch of rules already defined, but want to add more and not compile every time I add a rule.
> If you reply to this email, your message will be added to the discussion below:
> http://users.parboiled.org/Dynamically-generate-rules-tp4024412.html > To start a new topic under parboiled users, email [hidden email] > To unsubscribe from parboiled users, click here.