mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -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];
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
@@ -30,7 +30,7 @@ pgf_lzr_add_overl_entry(PgfCncOverloadMap* overl_table,
|
||||
gu_buf_push(entries, void*, entry);
|
||||
}
|
||||
|
||||
PGF_INTERNAL void
|
||||
PGF_API void
|
||||
pgf_lzr_index(PgfConcr* concr,
|
||||
PgfCCat* ccat, PgfProduction prod,
|
||||
bool is_lexical,
|
||||
|
||||
@@ -2504,7 +2504,7 @@ pgf_lookup_word_prefix(PgfConcr *concr, GuString prefix,
|
||||
return &state->en;
|
||||
}
|
||||
|
||||
PGF_INTERNAL void
|
||||
PGF_API void
|
||||
pgf_parser_index(PgfConcr* concr,
|
||||
PgfCCat* ccat, PgfProduction prod,
|
||||
bool is_lexical,
|
||||
|
||||
@@ -936,18 +936,6 @@ pgf_read_pargs(PgfReader* rdr, PgfConcr* concr)
|
||||
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
|
||||
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;
|
||||
cnccat->cats = gu_new_seq(PgfCCat*, len, rdr->opool);
|
||||
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
int fid = first + i;
|
||||
PgfCCat* ccat = gu_map_get(concr->ccats, &fid, PgfCCat*);
|
||||
|
||||
Reference in New Issue
Block a user