Friday, February 22, 2013

I am compiling a compiler.

I started my first large-scale programming project today. The problem I am solving was made by Dr. Bazzi for his Computer Science class 340. It is essentially a simplified version of a compiler. If you don't know, a compiler is the program that turns a source code, written by a programmer, into something that the computer can execute. What this program has to be able to do is input a file of source code, and output a file of compiled code. An additional task that Dr. Bazzi has issued to his student was that the program must also be able to execute that file of compiled code.

The only difference between the assigned compiler and a real compiler is simplified programming languages. The input file is written in a very bare-bones and basic language, and the compiled code does not have to be machine code, but rather an intermediate type of code that the program can execute at a later date.

So in conclusion I am writing a compiler that compiles a simplified programming language into another language, and then executes it. The compiler that I am writing, as with all programs, must be compiled, which leads me to the statement: I am compiling a compiler.

Thanks for reading,
- Jeff

1 comment:

  1. sounds like that's the combination of compiler and interpreter?

    depends on whether the output is bytecode or not.

    Hopefully it is platform independent compiler.

    ReplyDelete