Quantcast

Dynamically generate rules

classic Classic list List threaded Threaded
2 messages Options
gkr
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Dynamically generate rules

gkr
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Dynamically generate rules

mathias
Administrator
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.

Cheers,
Mathias

---
Mathias Doenitz
+491605336259
[hidden email]

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.
> NAML

Loading...