save kmax in HLLkTable

This commit is contained in:
Sven M. Hallberg 2015-09-06 14:48:41 +02:00
parent 8995097a1d
commit 73e92f04df

View file

@ -12,6 +12,7 @@ static const size_t DEFAULT_KMAX = 1;
* maps lookahead strings to productions (HCFSequence).
*/
typedef struct HLLkTable_ {
size_t kmax;
HHashTable *rows;
HCFChoice *start; // start symbol
HArena *arena;
@ -188,6 +189,7 @@ static int fill_table_row(size_t kmax, HCFGrammar *g, HStringMap *row,
*/
static int fill_table(size_t kmax, HCFGrammar *g, HLLkTable *table)
{
table->kmax = kmax;
table->start = g->start;
// iterate over g->nts