During the computer architecture class I took at Rose-Hulman, we were working with a simple assembly language that we had to compile by hand down to MIPS bytecode and that’s no fun (also there’s nothing not worth over doing 😄). So I decided to write a program that would allow for modular XML definitions of a language or translation and run it on pretty much any given code.
Back in the first quarter of my Freshman year at Rose-Hulman, we wrote a small Java program called BallWorlds. The idea was to teach us about objects and inheritance by asking us to make a 2d simulation of balls of various types bouncing around in an enclosed environment. There could be balls that bounced off each other, sticky balls that clumped together, balls that grew when they hit something, and really any combination there of. The sky was the limit. The idea so intrigued me that when I was playing with OpenGL (and specifically PyOpenGL), I decided to rewrite the same thing in Python.
Another project we had during my first Winter quarter at Rose-Hulman was to use a finite state machine to colorize / perform syntax highlighting on Java source code. It’s easy enough as there are really 3 special cases that we are looking for (strings, comments, and keywords) and we only need 9 states to recognize them all (at least in my implementation).