bugfix in the automaton generation

This commit is contained in:
Krasimir Angelov
2023-09-17 14:06:31 +02:00
parent b3968d95b9
commit f0c5299839

View File

@@ -5,9 +5,9 @@
//#define DEBUG_STATE_CREATION //#define DEBUG_STATE_CREATION
//#define DEBUG_EPSILON_CREATION //#define DEBUG_EPSILON_CREATION
#define DEBUG_AUTOMATON //#define DEBUG_AUTOMATON
#define DEBUG_PARSER //#define DEBUG_PARSER
#define DEBUG_GENERATOR //#define DEBUG_GENERATOR
struct PgfLRTableMaker::CCat { struct PgfLRTableMaker::CCat {
CCat *parent; CCat *parent;
@@ -773,7 +773,7 @@ ref<PgfLRTable> PgfLRTableMaker::make()
// delete item; // delete item;
} }
for (auto i : state->ccats1) { for (auto &i : state->ccats1) {
MD5Context ctxt; MD5Context ctxt;
auto begin = i.second->items.begin(); auto begin = i.second->items.begin();
auto end = i.second->items.end(); auto end = i.second->items.end();
@@ -798,7 +798,7 @@ ref<PgfLRTable> PgfLRTableMaker::make()
next_state->id = ++state_id; next_state->id = ++state_id;
todo.push(next_state); todo.push(next_state);
} else { } else {
//delete i.second; delete i.second;
i.second = next_state; i.second = next_state;
} }