mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
make the API for indexing in the parser and the linearizer public since it will be needed in the Haskell binding
This commit is contained in:
@@ -351,4 +351,16 @@ struct PgfCCat {
|
|||||||
GuFinalizer fin[0];
|
GuFinalizer fin[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
PGF_API_DECL void
|
||||||
|
pgf_parser_index(PgfConcr* concr,
|
||||||
|
PgfCCat* ccat, PgfProduction prod,
|
||||||
|
bool is_lexical,
|
||||||
|
GuPool *pool);
|
||||||
|
|
||||||
|
PGF_API_DECL void
|
||||||
|
pgf_lzr_index(PgfConcr* concr,
|
||||||
|
PgfCCat* ccat, PgfProduction prod,
|
||||||
|
bool is_lexical,
|
||||||
|
GuPool *pool);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ pgf_lzr_add_overl_entry(PgfCncOverloadMap* overl_table,
|
|||||||
gu_buf_push(entries, void*, entry);
|
gu_buf_push(entries, void*, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
PGF_INTERNAL void
|
PGF_API void
|
||||||
pgf_lzr_index(PgfConcr* concr,
|
pgf_lzr_index(PgfConcr* concr,
|
||||||
PgfCCat* ccat, PgfProduction prod,
|
PgfCCat* ccat, PgfProduction prod,
|
||||||
bool is_lexical,
|
bool is_lexical,
|
||||||
|
|||||||
@@ -2504,7 +2504,7 @@ pgf_lookup_word_prefix(PgfConcr *concr, GuString prefix,
|
|||||||
return &state->en;
|
return &state->en;
|
||||||
}
|
}
|
||||||
|
|
||||||
PGF_INTERNAL void
|
PGF_API void
|
||||||
pgf_parser_index(PgfConcr* concr,
|
pgf_parser_index(PgfConcr* concr,
|
||||||
PgfCCat* ccat, PgfProduction prod,
|
PgfCCat* ccat, PgfProduction prod,
|
||||||
bool is_lexical,
|
bool is_lexical,
|
||||||
|
|||||||
@@ -936,18 +936,6 @@ pgf_read_pargs(PgfReader* rdr, PgfConcr* concr)
|
|||||||
return pargs;
|
return pargs;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void
|
|
||||||
pgf_parser_index(PgfConcr* concr,
|
|
||||||
PgfCCat* ccat, PgfProduction prod,
|
|
||||||
bool is_lexical,
|
|
||||||
GuPool *pool);
|
|
||||||
|
|
||||||
extern void
|
|
||||||
pgf_lzr_index(PgfConcr* concr,
|
|
||||||
PgfCCat* ccat, PgfProduction prod,
|
|
||||||
bool is_lexical,
|
|
||||||
GuPool *pool);
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
pgf_production_is_lexical(PgfReader* rdr, PgfProductionApply *papp)
|
pgf_production_is_lexical(PgfReader* rdr, PgfProductionApply *papp)
|
||||||
{
|
{
|
||||||
@@ -1075,7 +1063,7 @@ pgf_read_cnccat(PgfReader* rdr, PgfAbstr* abstr, PgfConcr* concr, PgfCId name)
|
|||||||
|
|
||||||
int len = last + 1 - first;
|
int len = last + 1 - first;
|
||||||
cnccat->cats = gu_new_seq(PgfCCat*, len, rdr->opool);
|
cnccat->cats = gu_new_seq(PgfCCat*, len, rdr->opool);
|
||||||
|
|
||||||
for (int i = 0; i < len; i++) {
|
for (int i = 0; i < len; i++) {
|
||||||
int fid = first + i;
|
int fid = first + i;
|
||||||
PgfCCat* ccat = gu_map_get(concr->ccats, &fid, PgfCCat*);
|
PgfCCat* ccat = gu_map_get(concr->ccats, &fid, PgfCCat*);
|
||||||
|
|||||||
Reference in New Issue
Block a user