Quantcast

Parboiled 1 and ASM 5

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

Parboiled 1 and ASM 5

Gunnar
Hi,

I'm trying to use Parboiled 1 (for Java) within an application which happens to use ASM 5.

Unfortunately this results gives me an exception when initializing the parser. More specifically, org.parboiled.transform.ParserClassNode (implicitly) invokes the default constructor of its super-class org.objectweb.asm.tree.ClassNode which causes a runtime exception on ASM 5 (as per the docs, another constructor is to be used by sub-classes).

Are there any plans to make Parboiled 1 compatible with ASM 5?

Many thanks,

--Gunnar
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Parboiled 1 and ASM 5

mathias
Administrator
Gunnar,

see this ticket:
https://github.com/sirthias/parboiled/issues/76

Cheers,
Mathias

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

On 27 May 2014, at 21:29, Gunnar [via parboiled users] <[hidden email]> wrote:

> Hi,
>
> I'm trying to use Parboiled 1 (for Java) within an application which happens to use ASM 5.
>
> Unfortunately this results gives me an exception when initializing the parser. More specifically, org.parboiled.transform.ParserClassNode (implicitly) invokes the default constructor of its super-class org.objectweb.asm.tree.ClassNode which causes a runtime exception on ASM 5 (as per the docs, another constructor is to be used by sub-classes).
>
> Are there any plans to make Parboiled 1 compatible with ASM 5?
>
> Many thanks,
>
> --Gunnar
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://users.parboiled.org/Parboiled-1-and-ASM-5-tp4024338.html
> To start a new topic under parboiled users, email [hidden email]
> To unsubscribe from parboiled users, click here.
> NAML

fge
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Parboiled 1 and ASM 5

fge
In reply to this post by Gunnar
On Tue, May 27, 2014 at 9:29 PM, Gunnar [via parboiled users]
<[hidden email]> wrote:

> Hi,
>
> I'm trying to use Parboiled 1 (for Java) within an application which happens
> to use ASM 5.
>
> Unfortunately this results gives me an exception when initializing the
> parser. More specifically, org.parboiled.transform.ParserClassNode
> (implicitly) invokes the default constructor of its super-class
> org.objectweb.asm.tree.ClassNode which causes a runtime exception on ASM 5
> (as per the docs, another constructor is to be used by sub-classes).
>
> Are there any plans to make Parboiled 1 compatible with ASM 5?
>

Hello,

FWIW, grappa has ASM5/Java 8 runtime support, so you can use that.

Mathias, if you are interested, I can cook a pull request over parboiled.

--
Francis Galiegue, [hidden email], https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/parboiled1/grappa (redde
Caesaris: https://github.com/sirthias)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Parboiled 1 and ASM 5

Gunnar
Thanks for your replies! Good to know that it works with Grappa, I guess I'll give this a try then.

You said that you could provide a PR for applying the change to the "original" Parboiled 1. Is this to say that both versions, Parboiled 1 and Grappa, are maintained?

Out of interest, why did you create a fork under a new name instead of "just" maintaining Parboiled 1? I think the name is much more established and many people would benefit if that well-known project itself continues to live on instead of this fork.

But either way, many thanks for stepping up and doing this work, that's much appreciated!

--Gunnar
fge
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Parboiled 1 and ASM 5

fge
Hello,

On Fri, May 30, 2014 at 8:40 PM, Gunnar [via parboiled users]
<[hidden email]> wrote:

> Thanks for your replies! Good to know that it works with Grappa, I guess
> I'll give this a try then.
>
> You said that you could provide a PR for applying the change to the
> "original" Parboiled 1. Is this to say that both versions, Parboiled 1 and
> Grappa, are maintained?
>
> Out of interest, why did you create a fork under a new name instead of
> "just" maintaining Parboiled 1? I think the name is much more established
> and many people would benefit if that well-known project itself continues to
> live on instead of this fork.
>

Parboiled is Mathias' brainchild, that is why! What is more, for one,
grappa has dropped Scala support entirely, and the API, while
parboiled1-compatible for the upcoming 1.0.0 version, will change
significantly from parboiled1.

And since parboiled1 is basically unmaintained (Mathias is on
parboiled2), I decided to "take over" parboiled1 and making it follow
a different route. Part of the reasons are:

* some people don't like Scala and I am one of them; parboiled2 is not
a solution for me (one of the reasons I dislike Scala: no backwards
compatibility between versions); in fact, grappa has no Scala support
at all;
* I want to add some fundamental pieces to the API that the parboiled1
API just cannot support easily, or not at all (for instance, custom
error messages; they will be in 1.0.0 but in a limited fashion).


> But either way, many thanks for stepping up and doing this work, that's much
> appreciated!
>

Thanks for the kind words, and please do contribute! Issues, rants or
whatever, I am open. But parboiled (as in parboiled1) deserves to
live; and I don't want to scavenge the name, this would be too
confusing with parboiled2.

--
Francis Galiegue, [hidden email], https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/parboiled1/grappa (redde
Caesaris: https://github.com/sirthias)
Loading...