This is a yet-to-be-polished collection of testcases for compiler classes based on "Modern Compiler Implementation in Java" by Prof. Andrew Appel and Prof. Jens Palsberg. (One such class given by Prof. Jens Palsberg himself can be found online at http://web.cs.ucla.edu/~palsberg/course/cs132/project.html).
I started this repo to collect testcases together with fellow students of the class "Compiler Construction" given by Prof. Peter Thiemann - and it saved us many a point. In the hope that others could profit from this too, I keep this repo up. You should still try to come up with your own testcases! If you come up with new testcases, pull requests are more than welcome :)
To do:
-
Name testcases systematically
-
Erase redundant testcases
Open question:
Should testcases contain comments within their sourcecode? Pro: Testcases become more understandable. Contra: Otherwise viable testcases might fail if the parser can't handle comments properly.
Happy hacking!