www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - Java to D

reply "blls" <lietz wanadoo.fr> writes:
Hi,
due to the fact that this is my first message here : Why D is for me !
Comming from Modula2 and 3 (unfortunately both quit dead) D is absolutely
what I need. Thanks Walter.

Just an idea. Wh not choose ANTLR parser/lexer to translate Java into D. A
1.3 Java grammar is available. To give you an idea wehat I am talking about
:
http://www.codegeneration.net/tiki-read_article.php?articleId=77

The ANTLR Homepage :
http://www.antlr.org/
The grammalist
http://www.antlr.org/grammar/list

ANTLR is written in Java.So porting this tool to D is at least possible
I hope this will help to port Jface and Draw2D....
HTH Bjoern Lietz-Spendig France
Feb 12 2006
next sibling parent reply "Charles" <noone nowhere.com> writes:
 Just an idea. Wh not choose ANTLR parser/lexer to translate Java into D. A
"blls" <lietz wanadoo.fr> wrote in message news:dsnfik$1hog$1 digitaldaemon.com...
 Hi,
 due to the fact that this is my first message here : Why D is for me !
 Comming from Modula2 and 3 (unfortunately both quit dead) D is absolutely
 what I need. Thanks Walter.

 Just an idea. Wh not choose ANTLR parser/lexer to translate Java into D. A
 1.3 Java grammar is available. To give you an idea wehat I am talking
about
 :
 http://www.codegeneration.net/tiki-read_article.php?articleId=77

 The ANTLR Homepage :
 http://www.antlr.org/
 The grammalist
 http://www.antlr.org/grammar/list

 ANTLR is written in Java.So porting this tool to D is at least possible
 I hope this will help to port Jface and Draw2D....
 HTH Bjoern Lietz-Spendig France
Feb 12 2006
next sibling parent "Charles" <noone nowhere.com> writes:
Damn that alt-enter.

Java Antlr gramar is a great idea.

 I hope this will help to port Jface and Draw2D....
While Im not a fan of JFace we defintely need Draw2D. "Charles" <noone nowhere.com> wrote in message news:dsnkov$1nbe$1 digitaldaemon.com...
 Just an idea. Wh not choose ANTLR parser/lexer to translate Java into D.
A
 "blls" <lietz wanadoo.fr> wrote in message
 news:dsnfik$1hog$1 digitaldaemon.com...
 Hi,
 due to the fact that this is my first message here : Why D is for me !
 Comming from Modula2 and 3 (unfortunately both quit dead) D is
absolutely
 what I need. Thanks Walter.

 Just an idea. Wh not choose ANTLR parser/lexer to translate Java into D.
A
 1.3 Java grammar is available. To give you an idea wehat I am talking
about
 :
 http://www.codegeneration.net/tiki-read_article.php?articleId=77

 The ANTLR Homepage :
 http://www.antlr.org/
 The grammalist
 http://www.antlr.org/grammar/list

 ANTLR is written in Java.So porting this tool to D is at least possible
 I hope this will help to port Jface and Draw2D....
 HTH Bjoern Lietz-Spendig France
Feb 12 2006
prev sibling parent "blls" <lietz wanadoo.fr> writes:
Comming from Germany, living in France, and actually working with an os in
dutch. Aargh.
Additional info:
The complete Java 1.5 grammar is also available.
A complete GNU C Translater seems to be available (could be used for .h to d
translations)

I will spend some time to browse through the documents. But it seems that
ANTLR is an excellent tool to write a translater. ( a how to write an
translater using ANTLR manual is also available)However, I am a D newbie so
I guess I will run into trouble.. maybe someone more experienced will pick
up the ball.
Bjoern

"Charles" <noone nowhere.com> schreef in bericht
news:dsnkov$1nbe$1 digitaldaemon.com...
 Just an idea. Wh not choose ANTLR parser/lexer to translate Java into D.
A
 "blls" <lietz wanadoo.fr> wrote in message
 news:dsnfik$1hog$1 digitaldaemon.com...
 Hi,
 due to the fact that this is my first message here : Why D is for me !
 Comming from Modula2 and 3 (unfortunately both quit dead) D is
absolutely
 what I need. Thanks Walter.

 Just an idea. Wh not choose ANTLR parser/lexer to translate Java into D.
A
 1.3 Java grammar is available. To give you an idea wehat I am talking
about
 :
 http://www.codegeneration.net/tiki-read_article.php?articleId=77

 The ANTLR Homepage :
 http://www.antlr.org/
 The grammalist
 http://www.antlr.org/grammar/list

 ANTLR is written in Java.So porting this tool to D is at least possible
 I hope this will help to port Jface and Draw2D....
 HTH Bjoern Lietz-Spendig France
Feb 12 2006
prev sibling next sibling parent reply bobef <bobef lessequal.com> writes:
What about "Ragel State Machine Compiler"? I read a post sometime ago it 
was translated to D or something...

blls wrote:
 Hi,
 due to the fact that this is my first message here : Why D is for me !
 Comming from Modula2 and 3 (unfortunately both quit dead) D is absolutely
 what I need. Thanks Walter.
 
 Just an idea. Wh not choose ANTLR parser/lexer to translate Java into D. A
 1.3 Java grammar is available. To give you an idea wehat I am talking about
 :
 http://www.codegeneration.net/tiki-read_article.php?articleId=77
 
 The ANTLR Homepage :
 http://www.antlr.org/
 The grammalist
 http://www.antlr.org/grammar/list
 
 ANTLR is written in Java.So porting this tool to D is at least possible
 I hope this will help to port Jface and Draw2D....
 HTH Bjoern Lietz-Spendig France
 
 
Feb 12 2006
parent "blls" <lietz wanadoo.fr> writes:
"bobef" <bobef lessequal.com> schreef in bericht
news:dsnp4e$1sks$1 digitaldaemon.com...
 What about "Ragel State Machine Compiler"? I read a post sometime ago it
 was translated to D or something...
sorry, no idea. but to make it clear. it is not nessesary to translate antlr into D in oder to use this tool to translate java into d code. bjoern
 blls wrote:
 Hi,
 due to the fact that this is my first message here : Why D is for me !
 Comming from Modula2 and 3 (unfortunately both quit dead) D is
absolutely
 what I need. Thanks Walter.

 Just an idea. Wh not choose ANTLR parser/lexer to translate Java into D.
A
 1.3 Java grammar is available. To give you an idea wehat I am talking
about
 :
 http://www.codegeneration.net/tiki-read_article.php?articleId=77

 The ANTLR Homepage :
 http://www.antlr.org/
 The grammalist
 http://www.antlr.org/grammar/list

 ANTLR is written in Java.So porting this tool to D is at least possible
 I hope this will help to port Jface and Draw2D....
 HTH Bjoern Lietz-Spendig France
Feb 12 2006
prev sibling parent reply Brad Anderson <brad dsource.dot.org> writes:
blls wrote:
 Hi,
 due to the fact that this is my first message here : Why D is for me !
 Comming from Modula2 and 3 (unfortunately both quit dead) D is absolutely
 what I need. Thanks Walter.
 
 Just an idea. Wh not choose ANTLR parser/lexer to translate Java into D. A
 1.3 Java grammar is available. To give you an idea wehat I am talking about
 :
 http://www.codegeneration.net/tiki-read_article.php?articleId=77
 
 The ANTLR Homepage :
 http://www.antlr.org/
 The grammalist
 http://www.antlr.org/grammar/list
 
 ANTLR is written in Java.So porting this tool to D is at least possible
 I hope this will help to port Jface and Draw2D....
 HTH Bjoern Lietz-Spendig France
 
 
I would like to see someone pick up the Molt project on dsource.org - IIRC, Scott Sanders had modified the Jikes compiler to output the Java source files into XML, and then use XSLT to convert the XML to D source. http://www.dsource.org/forums/viewtopic.php?t=529 BA
Feb 13 2006
parent reply pragma <pragma_member pathlink.com> writes:
In article <dsqac5$2bj9$1 digitaldaemon.com>, Brad Anderson says...
blls wrote:
 Hi,
 due to the fact that this is my first message here : Why D is for me !
 Comming from Modula2 and 3 (unfortunately both quit dead) D is absolutely
 what I need. Thanks Walter.
 
 Just an idea. Wh not choose ANTLR parser/lexer to translate Java into D. A
 1.3 Java grammar is available. To give you an idea wehat I am talking about
 :
 http://www.codegeneration.net/tiki-read_article.php?articleId=77
 
 The ANTLR Homepage :
 http://www.antlr.org/
 The grammalist
 http://www.antlr.org/grammar/list
 
 ANTLR is written in Java.So porting this tool to D is at least possible
 I hope this will help to port Jface and Draw2D....
 HTH Bjoern Lietz-Spendig France
 
 
I would like to see someone pick up the Molt project on dsource.org - IIRC, Scott Sanders had modified the Jikes compiler to output the Java source files into XML, and then use XSLT to convert the XML to D source. http://www.dsource.org/forums/viewtopic.php?t=529 BA
Not to mention that dsource also hosts *two* lexer/parser generator frameworks: http://www.dsource.org/projects/languagemachine/ http://www.dsource.org/projects/dgrammar/ Granted, they're not exactly ready for prime-time, but it might help with weening the community off of Java bit more. - Eric Anderton at yahoo
Feb 13 2006
next sibling parent reply Klaus Oberhofer <oberhofer users.sourceforge.net> writes:
pragma <pragma_member pathlink.com> wrote in
news:dsqe2q$2fsk$1 digitaldaemon.com: 

 
 Not to mention that dsource also hosts *two* lexer/parser generator
 frameworks: 
 
 http://www.dsource.org/projects/languagemachine/
 http://www.dsource.org/projects/dgrammar/
 
 Granted, they're not exactly ready for prime-time, but it might help
 with weening the community off of Java bit more.
 
 - Eric Anderton at yahoo
Yeah, and one of them (the languagemachine) even has a working D frontend /backend and seems to be very suitable for source-to-source translation. Although, I have to admit that I tried to grasp the idea behind the languagemachine during almost four evenings with little success. I managed to get a feeling for rule selection in the frontend phase. But when it comes to the connection between frontend/backend it took me down :- (. So I put it aside, maybe my next try will have more success.
Feb 13 2006
next sibling parent "Charles" <noone nowhere.com> writes:
 (. So I put it aside, maybe my next try will have more success.
"Klaus Oberhofer" <oberhofer users.sourceforge.net> wrote in message news:Xns9769C63332E02C3DEE85C66A248c79606 63.105.9.61...
 pragma <pragma_member pathlink.com> wrote in
 news:dsqe2q$2fsk$1 digitaldaemon.com:

 Not to mention that dsource also hosts *two* lexer/parser generator
 frameworks:

 http://www.dsource.org/projects/languagemachine/
 http://www.dsource.org/projects/dgrammar/

 Granted, they're not exactly ready for prime-time, but it might help
 with weening the community off of Java bit more.

 - Eric Anderton at yahoo
Yeah, and one of them (the languagemachine) even has a working D frontend /backend and seems to be very suitable for source-to-source translation. Although, I have to admit that I tried to grasp the idea behind the languagemachine during almost four evenings with little success. I managed to get a feeling for rule selection in the frontend phase. But when it comes to the connection between frontend/backend it took me down
:-
 (. So I put it aside, maybe my next try will have more success.
Feb 13 2006
prev sibling parent "Charles" <noone nowhere.com> writes:
 (. So I put it aside, maybe my next try will have more success.
I hope you do , Ive tried on several different occasions and using different 'compiler compilers' , I could never quite get it. Charlie "Klaus Oberhofer" <oberhofer users.sourceforge.net> wrote in message news:Xns9769C63332E02C3DEE85C66A248c79606 63.105.9.61...
 pragma <pragma_member pathlink.com> wrote in
 news:dsqe2q$2fsk$1 digitaldaemon.com:

 Not to mention that dsource also hosts *two* lexer/parser generator
 frameworks:

 http://www.dsource.org/projects/languagemachine/
 http://www.dsource.org/projects/dgrammar/

 Granted, they're not exactly ready for prime-time, but it might help
 with weening the community off of Java bit more.

 - Eric Anderton at yahoo
Yeah, and one of them (the languagemachine) even has a working D frontend /backend and seems to be very suitable for source-to-source translation. Although, I have to admit that I tried to grasp the idea behind the languagemachine during almost four evenings with little success. I managed to get a feeling for rule selection in the frontend phase. But when it comes to the connection between frontend/backend it took me down
:-
 (. So I put it aside, maybe my next try will have more success.
Feb 13 2006
prev sibling parent "Walter Bright" <newshound digitalmars.com> writes:
I've written a lexer for Java that I gave to Kris as the foundation for a 
j2d tool. It doesn't parse, it just lexes. I'll be happy to supply it to 
anyone else who wants to work on a j2d tool.

For anyone curious about how compilers work, building a j2d tool would be a 
great way to learn, while at the same time producing a tool that could be 
very valuable. 
Feb 13 2006