mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-10 13:29:32 -06:00
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");
|
||||
jmethodID constrId = (*env)->GetMethodID(env, expiter_class, "<init>", "(JJJ)V");
|
||||
jobject jexpiter = (*env)->NewObject(env, expiter_class, constrId, (jlong) pool, (jlong) out_pool, (jlong) res);
|
||||
jmethodID constrId = (*env)->GetMethodID(env, expiter_class, "<init>", "(Lorg/grammaticalframework/pgf/Concr;JJJ)V");
|
||||
jobject jexpiter = (*env)->NewObject(env, expiter_class, constrId, concr, (jlong) pool, (jlong) out_pool, (jlong) res);
|
||||
|
||||
return jexpiter;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.*;
|
||||
public class Concr {
|
||||
|
||||
public native String getName();
|
||||
|
||||
|
||||
public Iterable<ExprProb> parse(String startCat, String s) {
|
||||
return new Parser(this, startCat, s);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class ExprIterator implements Iterator<ExprProb> {
|
||||
|
||||
private void fetch() {
|
||||
if (!fetched) {
|
||||
ep = fetchExprProb(enumRef, out_pool);
|
||||
ep = fetchExprProb(ref, out_pool);
|
||||
fetched = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,5 +21,5 @@ class Parser implements Iterable<ExprProb> {
|
||||
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