Parboiled (1.0.0) + IKVM (0.47.0.1)

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

Parboiled (1.0.0) + IKVM (0.47.0.1)

Jacinicus
Hi,

I have a problem while converting my java code using IKVM 0.47.0.1.

My codes work fine in Java.  However, after I have converted it to DLL.  It gives the following result:

"org.parboiled.errors.GrammarException: Illegal rule definition: Unwrapped action expression! "

Here is an abstract of my code:

XXParser parser = Parboiled.createParser(XXParser.class);
ParsingResult<?> result = new RecoveringParseRunner(parser.inputLine()).run(value);
if (!result.hasErrors()) {
        StringExpression expression = (StringExpression) result.resultValue;
        mpExpression = expression.getTokens();
        Collections.reverse(mpExpression);
} else {
        System.err.println("Error: " + ErrorUtils.printParseErrors(result));
        throw new ModelParsingException(ErrorUtils.printParseErrors(result));
}

The following is the arguments I used for IKVM.

ikvmc with  -debug -srcpath:'<srcpath>' -target:library -removeassertions -compressresources -classloader:ikvm.runtime.AppDomainAssemblyClassLoader -version:"1.2.0.0" -fileversion:1.2.0.0 "xxxx.jar"


I suspend it is a classloader problem, since I get the same error if I use the code:

XXParser parser = new XXParser();  // Instead of Parboiled.createParser(XXParser.class);

Does anyone can provide some advise about this problem?

Thank you very much in advance
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Parboiled (1.0.0) + IKVM (0.47.0.1)

mathias
Administrator
parboiled dynamically creates the byte code of an artificial class (derived from you parser class) at runtime.
This class is then loaded and instantiated.

I don't know enough about IKVM to be of help as to its limitations.
Maybe you'd like to pose your question on the IKVM mailing list?

Cheers,
Mathias

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

On 05.12.2011, at 08:15, Jacinicus [via parboiled users] wrote:

> Hi,
>
> I have a problem while converting my java code using IKVM 0.47.0.1.
>
> My codes work fine in Java.  However, after I have converted it to DLL.  It gives the following result:
>
> "org.parboiled.errors.GrammarException: Illegal rule definition: Unwrapped action expression! "
>
> Here is an abstract of my code:
>
> XXParser parser = Parboiled.createParser(XXParser.class);
> ParsingResult<?> result = new RecoveringParseRunner(parser.inputLine()).run(value);
> if (!result.hasErrors()) {
>         StringExpression expression = (StringExpression) result.resultValue;
>         mpExpression = expression.getTokens();
>         Collections.reverse(mpExpression);
> } else {
>         System.err.println("Error: " + ErrorUtils.printParseErrors(result));
>         throw new ModelParsingException(ErrorUtils.printParseErrors(result));
> }
>
> The following is the arguments I used for IKVM.
>
> ikvmc with  -debug -srcpath:'<srcpath>' -target:library -removeassertions -compressresources -classloader:ikvm.runtime.AppDomainAssemblyClassLoader -version:"1.2.0.0" -fileversion:1.2.0.0 "xxxx.jar"
>
>
> I suspend it is a classloader problem, since I get the same error if I use the code:
>
> XXParser parser = new XXParser();  // Instead of Parboiled.createParser(XXParser.class);
>
> Does anyone can provide some advise about this problem?
>
> Thank you very much in advance
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://users.parboiled.org/Parboiled-1-0-0-IKVM-0-47-0-1-tp3560647p3560647.html
> To start a new topic under parboiled users, email [hidden email]
> To unsubscribe from parboiled users, click here.
> NAML

Loading...