Parboiled Inside a Web Application

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

Parboiled Inside a Web Application

Dirk Bennigton
Hello,

I have fully working unit tests for a grammar, but when I run the same code inside a servlet container I get:

org.parboiled.errors.GrammarException: Illegal rule definition: Unwrapped action expression!
        at org.parboiled.support.Checks.ensure(Checks.java:49)
        at org.parboiled.BaseActions.check(BaseActions.java:435)
        at org.parboiled.BaseActions.match(BaseActions.java:71)

I'm assuming this is something to do with the dynamic class generation for the parser.

Is there any way to get this working inside a servlet container?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Parboiled Inside a Web Application

Dirk Bennigton
Ah forget it, this was a schoolboy error... My web service was directly instantiating the parser class, not using Parboiled.createParser().

It works just fine in my web application now.

PS
Thanks for making this great project available.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Parboiled Inside a Web Application

mathias
Administrator
Dirk,

great you sorted it out.

Cheers,
Mathias

---
[hidden email]
http://www.parboiled.org

On 17.10.2013, at 10:08, Dirk Bennigton [via parboiled users] <[hidden email]> wrote:

>
>
> Ah forget it, this was a schoolboy error... My web service was directly
> instantiating the parser class, not using Parboiled.createParser().
>
> It works just fine in my web application now.
>
> PS
> Thanks for making this great project available.
>
>
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://users.parboiled.org/Parboiled-Inside-a-Web-Application-tp4024246p4024247.html
> To start a new topic under parboiled users, email [hidden email]
> To unsubscribe from parboiled users, visit class="small">
signature.asc (858 bytes)
Download Attachment
Loading...