www.digitalmars.com         C & C++   DMDScript  

D.gnu - Hi. I'd like to help.

reply "Eugene Melekhov" <eugene_melekhov mail.ru> writes:
Hi,

I like D language design ideas and I'd like to help making it OpenSource.
Currently I'm trying to write ANTLR grammar for the D. Is it interesting
for someone?

--
Eugene
Dec 04 2002
parent reply "Walter" <walter digitalmars.com> writes:
What's an ANTLR grammar?

"Eugene Melekhov" <eugene_melekhov mail.ru> wrote in message
news:askm47$21gs$1 digitaldaemon.com...
 Hi,

 I like D language design ideas and I'd like to help making it OpenSource.
 Currently I'm trying to write ANTLR grammar for the D. Is it interesting
 for someone?

 --
 Eugene

Dec 04 2002
next sibling parent "Eugene Melekhov" <eugene_melekhov mail.ru> writes:
 What's an ANTLR grammar?

 "Eugene Melekhov" <eugene_melekhov mail.ru> wrote in message
 news:askm47$21gs$1 digitaldaemon.com...
 Hi,

 I like D language design ideas and I'd like to help making it


 Currently I'm trying to write ANTLR grammar for the D. Is it interesting
 for someone?


The following is the quotation from the http://www.antlr.org: "The ANTLR Translator generator is a completely redesigned version of PCCTS that has been reimplemented in Java to generate Java, C++, and Sather."
Dec 04 2002
prev sibling parent reply "Robert M. Münch" <robert.muench robertmuench.de> writes:
"Walter" <walter digitalmars.com> schrieb im Newsbeitrag
news:asm3dr$ng8$1 digitaldaemon.com...
 What's an ANTLR grammar?

ANTL is a very nice parser creation framework. I have used it myself in a big project. It might not be the tool you want to use ;-)) but not everyone writes parsers, code generators etc. for every day business. Robert
Dec 05 2002
parent reply "Eugene Melekhov" <eugene_melekhov mail.ru> writes:
Robert M. Münch <robert.muench robertmuench.de> wrote:
 ANTL is a very nice parser creation framework. It might not be
the tool you want to use ;-))

ANTLR generated parser, but grammar is hardcoded in the sources and it is not easy to understand modify it. GCC is impemented using bizon,flex for example. So from my point of view using parser generator is very usefull especially in OpenSource project. -- Eugene
Dec 05 2002
next sibling parent reply Evan McClanahan <evan dontSPAMaltarinteractive.com> writes:
Eugene Melekhov wrote:
 Robert M. Münch <robert.muench robertmuench.de> wrote:
 
ANTL is a very nice parser creation framework. It might not be
the tool you want to use ;-))

Why not,BTW ? dmd implements the same recursive-descent algorithm as the ANTLR generated parser, but grammar is hardcoded in the sources and it is not easy to understand modify it. GCC is impemented using bizon,flex for example. So from my point of view using parser generator is very usefull especially in OpenSource project.

One interesting use of this would be to take the java and C++ grammars that are available, write one for D, and then generate a tool that does automatic translation from C++, C, or Java, to D. Evan
Dec 05 2002
parent "Eugene Melekhov" <eugene_melekhov mail.ru> writes:
Evan McClanahan <evan dontSPAMaltarinteractive.com> wrote:
 One interesting use of this would be to take the java and C++ grammars
 that are available, write one for D, and then generate a tool that does
 automatic translation from C++, C, or Java, to D.

There is no need for D grammar to translate to D. It's not easy to find comprehensive C++ grammar while Java grammar is available at the ANTL site. -- Eugene
Dec 05 2002
prev sibling parent "Walter" <walter digitalmars.com> writes:
"Eugene Melekhov" <eugene_melekhov mail.ru> wrote in message
news:asneoe$2m56$1 digitaldaemon.com...
 Robert M. Münch <robert.muench robertmuench.de> wrote:
 ANTL is a very nice parser creation framework. It might not be
the tool you want to use ;-))

ANTLR generated parser, but grammar is hardcoded in the sources and it is not easy to understand modify it. GCC is impemented using bizon,flex for example. So from my point of view using parser generator is very usefull especially in OpenSource project.

Good question. I don't use parser generators because of the lack of control I have over its output, coupled with the problems I've had getting the parser generator ported when moving the source to a different machine/OS. The latest trouble I had was in using Bison under linux, which worked fine. Until trying to move the source back to Win32. The Bison win32 executable is a poor port to Win32, suffering numerous bugs caused by things like not recognizing \ as a path separator. Ah, you say since Bison is open source I could fix it myself. True, but I'd rather spend the time fixing my own bugs <g>. D doesn't need a parser generator anyway, because the parser is pretty simple (on purpose!).
Dec 05 2002