Add test for a rule that can be arrived at from multiple states
This commit is contained in:
parent
997f34a1e4
commit
746ec89be8
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user