intermediate-code

Which is a good and simple intermediate code?

Suppose that the purpose of an assignment is to write a compiler that works on a subset of C language (you can assume a subset of whatever language, just supporting basic scripting expressiveness without having complex things as objects). What kind of intermediate code could be used to verify the correctness of the compiler? I was talki...

Generating intermediate .i files (preprocessed files) when compiling Ubuntu-8.04

I'm building ubuntu-8.04 with gcc 3.4 and I need to generate the .i files, which are the output of the gcc preprocessor. I have tried adding the --save-temps flag but this only generates the .i files for the top level directory, i.e. source, and does not seem to get passed recursively to the child directories. I also tried the -E flag, w...

Using a pre-parsed protocol definition in a script and keeping it up-to-date

For my work, I sometimes have to deal with logfiles from a binary protocol (the logfiles contain hexdumps of the messages). I want to write a Perl script that can interpret the binary data for me and print the contents in a more friendly format. I have a (machine readable) description of the protocol messages in a proprietary format and...