From 1d239ab567f7ecbdec338563719ef19d9211a6e8 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Fri, 24 Feb 2012 13:52:21 +0000 Subject: [PATCH] libpgf: simple fix in the grammar printer and the reader --- src/runtime/c/pgf/printer.c | 2 +- src/runtime/c/pgf/reader.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime/c/pgf/printer.c b/src/runtime/c/pgf/printer.c index 3d13147b6..058375f33 100644 --- a/src/runtime/c/pgf/printer.c +++ b/src/runtime/c/pgf/printer.c @@ -123,7 +123,7 @@ pgf_print_productions(GuMapItor* fn, const void* key, void* value, } case PGF_PRODUCTION_COERCE: { PgfProductionCoerce* pcoerce = i.data; - gu_printf(wtr,err,"_[C%d]\n",pcoerce->coerce); + gu_printf(wtr,err,"_[C%d]\n",pcoerce->coerce->fid); break; } default: diff --git a/src/runtime/c/pgf/reader.c b/src/runtime/c/pgf/reader.c index bff700bd5..d09875dd0 100644 --- a/src/runtime/c/pgf/reader.c +++ b/src/runtime/c/pgf/reader.c @@ -434,6 +434,7 @@ pgf_read_to_PgfCCatId(GuType* type, PgfReader* rdr, void* to) ccat = gu_new(PgfCCat, rdr->opool); ccat->cnccat = NULL; ccat->lindefs = gu_map_get(rdr->curr_lindefs, &fid, PgfFunIds*); + ccat->n_synprods = 0; ccat->prods = gu_null_seq; ccat->fid = fid; @@ -780,6 +781,7 @@ pgf_read_new_PgfCncCat(GuType* type, PgfReader* rdr, GuPool* pool, ccat = gu_new(PgfCCat, rdr->opool); ccat->cnccat = NULL; ccat->lindefs = gu_map_get(rdr->curr_lindefs, &fid, PgfFunIds*); + ccat->n_synprods = 0; ccat->prods = gu_null_seq; ccat->fid = fid;