diff options
Diffstat (limited to 'grammar/slr_test.go')
-rw-r--r-- | grammar/slr_test.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/grammar/slr_test.go b/grammar/slr_test.go index 1ebb02d..15f58c1 100644 --- a/grammar/slr_test.go +++ b/grammar/slr_test.go @@ -68,7 +68,15 @@ id: "[A-Za-z_][0-9A-Za-z_]*"; nonTermCount = len(nonTermTexts) termCount = len(termTexts) - ptab, err = genSLRParsingTable(automaton, gram.productionSet, follow, termCount, nonTermCount) + slr := &slrTableBuilder{ + automaton: automaton, + prods: gram.productionSet, + follow: follow, + termCount: termCount, + nonTermCount: nonTermCount, + symTab: gram.symbolTable, + } + ptab, err = slr.build() if err != nil { t.Fatalf("failed to create a SLR parsing table: %v", err) } |