From 7271e46bbcb11acf860c91eddfe12dd7eed5ccad Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Thu, 26 Aug 2021 23:16:09 +0900 Subject: Add error symbol and #recover directive to recover from an error state --- grammar/lalr1_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'grammar/lalr1_test.go') diff --git a/grammar/lalr1_test.go b/grammar/lalr1_test.go index 7d8e48d..1cf8762 100644 --- a/grammar/lalr1_test.go +++ b/grammar/lalr1_test.go @@ -34,7 +34,7 @@ id: "[A-Za-z0-9_]+"; t.Fatal(err) } - lr0, err := genLR0Automaton(gram.productionSet, gram.augmentedStartSymbol) + lr0, err := genLR0Automaton(gram.productionSet, gram.augmentedStartSymbol, gram.errorSymbol) if err != nil { t.Fatalf("failed to create a LR0 automaton: %v", err) } -- cgit v1.2.3