mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-08-19 10:46:22 -06:00
simplification
This commit is contained in:
@@ -1600,21 +1600,15 @@ void PgfParseTableMaker::symbol_bind(Item *item, State *state, PgfSymbol sym)
|
||||
|
||||
void PgfParseTableMaker::suspend(Cont *cont,Item *item,size_t n_suspended1,size_t n_suspended)
|
||||
{
|
||||
// collect the cats first, since calling combine in
|
||||
// the loop will change the search index
|
||||
std::vector<CCat*> ccats;
|
||||
for (auto it1 : cont->state->completed[cont]) {
|
||||
for (auto it2 : it1.second) {
|
||||
CCat *ccat = it2.second;
|
||||
if (ccat != NULL) {
|
||||
ccats.push_back(ccat);
|
||||
Item *new_item = new (item) Item;
|
||||
combine(cont->state,new_item,ccat);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (CCat *ccat : ccats) {
|
||||
Item *new_item = new (item) Item;
|
||||
combine(cont->state,new_item,ccat);
|
||||
}
|
||||
|
||||
auto pitem = clone_item(item);
|
||||
auto acat = ref<PgfSymbolACat>::from_ptr((PgfSymbolACat*) &cont->lincat->name);
|
||||
|
||||
Reference in New Issue
Block a user