diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-08-26 23:16:09 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-08-26 23:18:49 +0900 |
commit | 7271e46bbcb11acf860c91eddfe12dd7eed5ccad (patch) | |
tree | fafbf797ca806ff1e4cc68acaaaa6db66aec632d /grammar/lr0_test.go | |
parent | Update CHANGELOG (diff) | |
download | urubu-7271e46bbcb11acf860c91eddfe12dd7eed5ccad.tar.gz urubu-7271e46bbcb11acf860c91eddfe12dd7eed5ccad.tar.xz |
Add error symbol and #recover directive to recover from an error state
Diffstat (limited to 'grammar/lr0_test.go')
-rw-r--r-- | grammar/lr0_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/grammar/lr0_test.go b/grammar/lr0_test.go index 36c0957..4a613dd 100644 --- a/grammar/lr0_test.go +++ b/grammar/lr0_test.go @@ -52,7 +52,7 @@ id: "[A-Za-z_][0-9A-Za-z_]*"; t.Fatal(err) } - automaton, err = genLR0Automaton(gram.productionSet, gram.augmentedStartSymbol) + automaton, err = genLR0Automaton(gram.productionSet, gram.augmentedStartSymbol, gram.errorSymbol) if err != nil { t.Fatalf("failed to create a LR0 automaton: %v", err) } @@ -254,7 +254,7 @@ BAR: "bar"; t.Fatal(err) } - automaton, err = genLR0Automaton(gram.productionSet, gram.augmentedStartSymbol) + automaton, err = genLR0Automaton(gram.productionSet, gram.augmentedStartSymbol, gram.errorSymbol) if err != nil { t.Fatalf("failed to create a LR0 automaton: %v", err) } |