Skip to content
Snippets Groups Projects
Commit 73e92f04 authored by Sven M. Hallberg's avatar Sven M. Hallberg
Browse files

save kmax in HLLkTable

parent 8995097a
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ static const size_t DEFAULT_KMAX = 1; ...@@ -12,6 +12,7 @@ static const size_t DEFAULT_KMAX = 1;
* maps lookahead strings to productions (HCFSequence). * maps lookahead strings to productions (HCFSequence).
*/ */
typedef struct HLLkTable_ { typedef struct HLLkTable_ {
size_t kmax;
HHashTable *rows; HHashTable *rows;
HCFChoice *start; // start symbol HCFChoice *start; // start symbol
HArena *arena; HArena *arena;
...@@ -188,6 +189,7 @@ static int fill_table_row(size_t kmax, HCFGrammar *g, HStringMap *row, ...@@ -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) static int fill_table(size_t kmax, HCFGrammar *g, HLLkTable *table)
{ {
table->kmax = kmax;
table->start = g->start; table->start = g->start;
// iterate over g->nts // iterate over g->nts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment