One of the courses at the senior level at Angelo State University is notorious for being difficult: Algorithmic Languages and Compilers.

During the latter eight weeks (or so) of the course, you're given pseudo-code for major portions of a compiler (to be written in C++) to process text files containing a simplified version of Pascal (referred to as Pascallite). The expected output are Listing files (showing code line numbers alongside the processed code and an error message if an error occurs) and compilable Assembly code files.

Grading is done by comparing your output files with the professor's expected output files. He provides all input files, and some of the expected output files.

By the end of the multi-week project, there are over 120 files to compare against, and over 175 Pascallite files to be processed.

And if you fix a bug in file #130, it might break something in file #077. Which means you have to constantly be checking old files repeatedly, or miss when you (re)introduce a bug to the compiler.

There was no way I wasn't automating that. So I did.

A Bash script for the automation of checking many files through the compiler in question.

Featuring:

  • Instructional comments and explanations
  • Configuration variables
  • Fancy text output (with colors!)