forked from GitHub/gf-core
bugfix in the java binding
This commit is contained in:
@@ -220,8 +220,8 @@ Java_org_grammaticalframework_pgf_Parser_parse
|
|||||||
}
|
}
|
||||||
|
|
||||||
jclass expiter_class = (*env)->FindClass(env, "org/grammaticalframework/pgf/ExprIterator");
|
jclass expiter_class = (*env)->FindClass(env, "org/grammaticalframework/pgf/ExprIterator");
|
||||||
jmethodID constrId = (*env)->GetMethodID(env, expiter_class, "<init>", "(JJJ)V");
|
jmethodID constrId = (*env)->GetMethodID(env, expiter_class, "<init>", "(Lorg/grammaticalframework/pgf/Concr;JJJ)V");
|
||||||
jobject jexpiter = (*env)->NewObject(env, expiter_class, constrId, (jlong) pool, (jlong) out_pool, (jlong) res);
|
jobject jexpiter = (*env)->NewObject(env, expiter_class, constrId, concr, (jlong) pool, (jlong) out_pool, (jlong) res);
|
||||||
|
|
||||||
return jexpiter;
|
return jexpiter;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import java.util.*;
|
|||||||
public class Concr {
|
public class Concr {
|
||||||
|
|
||||||
public native String getName();
|
public native String getName();
|
||||||
|
|
||||||
public Iterable<ExprProb> parse(String startCat, String s) {
|
public Iterable<ExprProb> parse(String startCat, String s) {
|
||||||
return new Parser(this, startCat, s);
|
return new Parser(this, startCat, s);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class ExprIterator implements Iterator<ExprProb> {
|
|||||||
|
|
||||||
private void fetch() {
|
private void fetch() {
|
||||||
if (!fetched) {
|
if (!fetched) {
|
||||||
ep = fetchExprProb(enumRef, out_pool);
|
ep = fetchExprProb(ref, out_pool);
|
||||||
fetched = true;
|
fetched = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,5 +21,5 @@ class Parser implements Iterable<ExprProb> {
|
|||||||
return iter;
|
return iter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static native ExprIterator parse(Concr concr, String startCat, String s);
|
static native ExprIterator parse(Concr concr, String startCat, String s);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user