1
0
forked from GitHub/gf-core

bug fix in the management of memory pools in the statistical parser

This commit is contained in:
kr.angelov
2013-05-07 08:30:32 +00:00
parent 7ba27229b3
commit 687b326ed0
5 changed files with 23 additions and 26 deletions

View File

@@ -212,7 +212,7 @@ pgf_parse(PgfConcr* concr, PgfCId cat, PgfLexer *lexer,
{
// Begin parsing a sentence of the specified category
PgfParseState* state =
pgf_parser_init_state(concr, cat, 0, pool);
pgf_parser_init_state(concr, cat, 0, pool, out_pool);
if (state == NULL) {
return NULL;
}
@@ -234,7 +234,7 @@ pgf_parse(PgfConcr* concr, PgfCId cat, PgfLexer *lexer,
return NULL;
// Now begin enumerating the resulting syntax trees
return pgf_parse_result(state, out_pool);
return pgf_parse_result(state);
}
GuEnum*
@@ -243,7 +243,7 @@ pgf_get_completions(PgfConcr* concr, PgfCId cat, PgfLexer *lexer,
{
// Begin parsing a sentence of the specified category
PgfParseState* state =
pgf_parser_init_state(concr, cat, 0, pool);
pgf_parser_init_state(concr, cat, 0, pool, pool);
if (state == NULL) {
return NULL;
}
@@ -265,7 +265,7 @@ pgf_get_completions(PgfConcr* concr, PgfCId cat, PgfLexer *lexer,
return NULL;
// Now begin enumerating the resulting syntax trees
return pgf_parser_completions(state, prefix, pool);
return pgf_parser_completions(state, prefix);
}
void
@@ -273,7 +273,7 @@ pgf_print_chunks(PgfConcr* concr, PgfCId cat, PgfLexer *lexer, GuPool* pool)
{
// Begin parsing a sentence of the specified category
PgfParseState* state =
pgf_parser_init_state(concr, cat, 0, pool);
pgf_parser_init_state(concr, cat, 0, pool, pool);
if (state == NULL) {
printf("\n");
return;