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/parsing_table_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'grammar/parsing_table_test.go') diff --git a/grammar/parsing_table_test.go b/grammar/parsing_table_test.go index 95bc543..feec74a 100644 --- a/grammar/parsing_table_test.go +++ b/grammar/parsing_table_test.go @@ -45,7 +45,7 @@ id: "[A-Za-z0-9_]+"; if err != nil { t.Fatal(err) } - lr0, err := genLR0Automaton(gram.productionSet, gram.augmentedStartSymbol) + lr0, err := genLR0Automaton(gram.productionSet, gram.augmentedStartSymbol, gram.errorSymbol) if err != nil { t.Fatal(err) } @@ -330,7 +330,7 @@ id: "[A-Za-z_][0-9A-Za-z_]*"; if err != nil { t.Fatal(err) } - lr0, err := genLR0Automaton(gram.productionSet, gram.augmentedStartSymbol) + lr0, err := genLR0Automaton(gram.productionSet, gram.augmentedStartSymbol, gram.errorSymbol) if err != nil { t.Fatal(err) } -- cgit v1.2.3