Sunday, 15 June 2014

java - Unable to create parboiled parser -



java - Unable to create parboiled parser -

i have created parser class parboiled framework according this simple example:

package my.package; import org.parboiled.baseparser; import org.parboiled.annotations.buildparsetree; @buildparsetree public class queryparser extends baseparser<object> { //some rules }

if seek create parser shown in example

queryparser parser = parboiled.createparser(queryparser.class);

i exception @ line:

java.lang.classcastexception: my.package.queryparser$$parboiled cannot cast org.parboiled.baseparser @ org.parboiled.parboiled.createparser(parboiled.java:56) ...

i'm not doing special not done in example. difference parser , and class calling in different projects can't imagine why should matter. dependencies between projects (which eclipse plugin projects) should alright.

can tell i'm doing wrong or error be?

it seems have run configurations. moved parboiled relevant code 1 project , works. think i'll maintain way because improve encapsulation anyway.

java parboiled

No comments:

Post a Comment