Test Generator

If you want to torture-test your parser, download this Test Generator written in Python.

While the code is a little complicated by the need to keep track of declared variables and indentation, really all it does is use the grammar the way Chomsky intended, in “reverse”, to generate new programs.

Note too that while the programs are syntactically correct and obey the rules that I set down in the assignment for the use of identifiers, they’re completely meaningless.

Comments are closed.