Test SLR grammar

This commit is contained in:
Josh Holtrop 2022-06-27 21:06:03 -04:00
parent 30f4cfcc99
commit 382e17804c

View File

@ -58,6 +58,16 @@ EOF
build_parser
end
it "generates an SLR parser" do
write_grammar <<EOF
token one 1
Start -> E;
E -> one E;
E -> one;
EOF
build_parser
end
it "distinguishes between multiple identical rules with lookahead symbol" do
write_grammar <<EOF
token a