473,385 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Delphi to bytecode compiler

Hi all!

I'm wondering what would be involved in making a Delphi to bytecode
compiler... Does anyone have any experience writing compilers, that
could give me some advice?

The reason I think this would be useful, is that it would broaden the
scope of the Java platform, enabling many languages to be used (just
like .NET). There are already several langages (e.g. Java, Jython,
Groovy, and perhaps others), but it would be nice to have a language as
close as possible to Delphi syntax that could likewise compile into
bytecode. This would greatly facilitate converting projects from Delphi
to Java.

Any ideas?

Thanks!
Joanthan Neve.
Jul 17 '05 #1
3 3018
Jonathan Neve wrote:
I'm wondering what would be involved in making a Delphi to bytecode
compiler... Does anyone have any experience writing compilers, that
could give me some advice?


An ambitious project.

You might want to look for the book:

Programming for the Java Virtual Machine
Joshua Engel

which talks quite a lot about compiling non-Java to run on the JVM.

It might be that the book

Compiling for the .NET Common Language Runtime (CLR)
John Gough

would be even better in some ways. It largely focuses on running Component
Pascal on the CLR, and although the CRL is not the same as the JVM, there are
many similarities. The same implementation (gpcp) is also able to generate
Java bytecodes, so the author is JVM-aware and occasionally mentions JVM issues
in the book. The implementation is on the Web somewhere (you can Google for
"Component Pascal" and "gpcp" as easily as I) so you may be able to find
material about the JVM implementation if you look around a bit.

-- chris
Jul 17 '05 #2
Hi,
I wanted to do the same for my own language and wrote a library (still
working on it)
in C that allows to read/write Java bytecode
You can find out more at
http://sourceforge.net/projects/myfriend/
You could also check out the whole project
cvs -z3 -d:pserver:an*******@cvs.sourceforge.net:/cvsroot/myfriend co
myfriend/friend2java

"Jonathan Neve" <jo******@microtec.fr> wrote in message
news:bd**************************@posting.google.c om...
Hi all!

I'm wondering what would be involved in making a Delphi to bytecode
compiler... Does anyone have any experience writing compilers, that
could give me some advice?

The reason I think this would be useful, is that it would broaden the
scope of the Java platform, enabling many languages to be used (just
like .NET). There are already several langages (e.g. Java, Jython,
Groovy, and perhaps others), but it would be nice to have a language as
close as possible to Delphi syntax that could likewise compile into
bytecode. This would greatly facilitate converting projects from Delphi
to Java.

Any ideas?

Thanks!
Joanthan Neve.

Jul 17 '05 #3
A couple of years ago Borland actually developed a prototype of a
Delphi->Java Bytecode compiler. But as far as I remember they never got
beyond console applications and considered the effort of translating VCL
code to Swing as too much. You could google the Borland newsgroups for
information about this project.

Kai

Jonathan Neve wrote:
Hi all!

I'm wondering what would be involved in making a Delphi to bytecode
compiler... Does anyone have any experience writing compilers, that
could give me some advice?

The reason I think this would be useful, is that it would broaden the
scope of the Java platform, enabling many languages to be used (just
like .NET). There are already several langages (e.g. Java, Jython,
Groovy, and perhaps others), but it would be nice to have a language as
close as possible to Delphi syntax that could likewise compile into
bytecode. This would greatly facilitate converting projects from Delphi
to Java.

Any ideas?

Thanks!
Joanthan Neve.


Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: zku | last post by:
how to create java bytecode without using javac?
46
by: Jon Perez | last post by:
Can one run a 1.5 .pyc file with the 2.x version interpreters and vice versa? How about running a 2.x .pyc using a 2.y interpreter?
33
by: Maurice LING | last post by:
Hi, I've been using Python for about 2 years now, for my honours project and now my postgrad project. I must say that I am loving it more and more now. From my knowledge, Python bytecodes are...
11
by: M1st0 | last post by:
where I can find the grammar of python bytecode ? ( better if is in BCF ).
0
by: Andrew Lambert | last post by:
Hi, I've been trying to compile perl scripts into bytecode. Now, from what I understand I can use either perlcc -B script.pl or perl -MO=bytecode script.pl to do this (whats the difference...
0
by: sxanth | last post by:
>What puzzles me, though, are bytecodes 17, 39 and 42 - surely these aren't >reachable? Does the compiler just throw in a default 'return None' >epilogue, with routes there from every code path,...
4
by: Fabiano Sidler | last post by:
Hi folks! I'm looking for a way to compile python source to bytecode instead of code-objects. Is there a possibility to do that? The reason is: I want to store pure bytecode with no additional...
3
by: Rob De Almeida | last post by:
Hi, I would like to compile an AST to bytecode, so I can eval it later. I tried using parse.compileast, but it fails: Traceback (most recent call last): File "<stdin>", line 1, in ?...
11
by: Michael Spencer | last post by:
Announcing: compiler2 --------------------- For all you bytecode enthusiasts: 'compiler2' is an alternative to the standard library 'compiler' package, with several advantages. Improved...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.