1
0
forked from GitHub/gf-core

bugfix in the java binding

This commit is contained in:
krasimir
2015-04-16 13:53:03 +00:00
parent 3ddbc44789
commit 5754848626

View File

@@ -41,11 +41,13 @@ class Parser implements Iterable<ExprProb> {
{
Pool pool = new Pool();
long callbacksRef = newCallbacksMap(concr, pool);
for (Map.Entry<String, LiteralCallback> entry : callbacks.entrySet()) {
addLiteralCallback(concr, callbacksRef,
entry.getKey(), entry.getValue(),
pool);
}
if (callbacks != null) {
for (Map.Entry<String, LiteralCallback> entry : callbacks.entrySet()) {
addLiteralCallback(concr, callbacksRef,
entry.getKey(), entry.getValue(),
pool);
}
}
return parseWithHeuristics(concr, startCat, s, heuristics, callbacksRef, pool);
}