Add test for a rule that can be arrived at from multiple states

This commit is contained in:
Josh Holtrop 2021-09-21 21:40:11 -04:00
parent 997f34a1e4
commit 746ec89be8

View File

@ -77,6 +77,20 @@ R1: [a b] <<
>> >>
R2: [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 <<EOF
token a
token b
Start: [a R1] <<
>>
Start: [b R1] <<
>>
R1: [b] <<
>>
EOF EOF
build_parser build_parser
end end