Can Coco / R turn a parsed file into bytecode?

I want to write a simple compiler for educational purposes in Delphi. I read about Coco / R and found this implementation for Delphi: http://code.google.com/p/dcocor/ . From what I read, this is Delphi 2009 syntax parser.

What do I need to do to turn the analyzed file into bytecode? Can Coco / R do this?

I know about scripting languages ​​like FastScript or DWS, but I would like to try writing my own for my own purposes.

Please give me some advice or clarify the situation a bit.

+7
source share
1 answer

What do I need to do to turn the analyzed file into bytecode?

First determine what type of bytecode you would like to have: a JVM? LLVM? Msil? Invent your own?

Can Coco / R do this?

Coco / R is the basis of the parser generator, it only generates lexer-parser for the language that you define and pass to the generator. The steps after this are your responsibility. Although there may be projects that can help generate goal / goal code (but I have not found for Coco / R).

+7
source

All Articles