1

I've been working on a compiler for an object oriented language called Cool (Classroom Object Oriented Language).

  • I need to choose an intermediate code representation now. I was thinking maybe p-code or three address-code.

  • For code generation, as I do not have much time, I have thought of using existing (Open Source) code that converts an intermediate code to a target machine code, like MIPS or x86.

Please suggest if there are any existing converters (or emulators) that do what I above described. And based on the availability of such a program I will choose the apt intermediate representation.

  • If is are no such existing Open Source code, suggest any such short way or arriving at the target code from intermediate code without having to write a code generator the conventional way.

Thanks.

isle_of_gods
  • 670
  • 1
  • 5
  • 10
  • 1
    This is not a good question for SO, I think (too broad, opinion-based, and so on), but if it were me I would probably go with either MSIL (.NET back-end) or an LLVM-based approach, depending on what the focus is. – 500 - Internal Server Error Jan 20 '15 at 19:56

0 Answers0