From 746ec89be8c8819fd121c0ea2adce6743d190bb3 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 21 Sep 2021 21:40:11 -0400 Subject: [PATCH] Add test for a rule that can be arrived at from multiple states --- spec/imbecile_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spec/imbecile_spec.rb b/spec/imbecile_spec.rb index c661a71..2a6b519 100644 --- a/spec/imbecile_spec.rb +++ b/spec/imbecile_spec.rb @@ -77,6 +77,20 @@ R1: [a b] << >> R2: [a b] << >> +EOF + build_parser + end + + it "handles reducing a rule that could be arrived at from multiple states" do + write_grammar <> +Start: [b R1] << +>> +R1: [b] << +>> EOF build_parser end