I’m making an LR(1) parser generator, and want to validate it. My parser generator sorts the stuff differently so some states are identical to the reference output, but some are assigned to different states, so state 7 in reference would be like state 9 in my implementation due to how the terminals and non-terminals are ordered. I want to know how to check if two different parsing tables are identical in how they work.
Also on a side note, are there any resources to testing LR(1) parser generators, like complex grammars (preferably without epsilons as mine doesn’t support epsilons yet) and their respective outputs?
I don’t know how to approach this so any help would be greatly appreciated. But perhaps I can do something like test every possible input and store the states and maybe check that but I don’t know how to approach that and solve it without infinite loops (in cases for lists)
Chris Geo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.