Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-09 Thread Dmitry Olshansky
On 09.03.2012 11:58, Jonathan M Davis wrote: On Friday, March 09, 2012 11:53:51 Dmitry Olshansky wrote: The goal is to make std.algorithm general when it comes to UTF-x ranges, VLE range seems a best suited abstraction level so far. Other things like base64 encoded stuff could be there, though

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-09 Thread Martin Nowak
Now, there is interest in having a D parser and lexer in Phobos. I don't know if your version will fit the bill (e.g. it must have a range-based API), but we need one at some point. The original idea was to more or less directly port dmd's lexer and parser with some adjustments to the API

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Jacob Carlborg
On 2012-03-07 21:02, Zach the Mystic wrote: Check it out: https://github.com/zachthemystic/ddmd-clean/ This program is an adaptation of the work done by the ddmd team: http://www.dsource.org/projects/ddmd I described most of it in the README. I hope it runs smoothly for you. I only ran it on

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Jacob Carlborg
On 2012-03-08 05:54, Jonathan M Davis wrote: On Thursday, March 08, 2012 03:12:48 Zach the Mystic wrote: On Thursday, 8 March 2012 at 01:43:26 UTC, Daniel Murphy wrote: Zach the Mysticreachminusthiszachgm...@dot.com wrote in message news:afqmbmvuvizvgfooe...@forum.dlang.org... I'll gladly

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Jonathan M Davis
On Thursday, March 08, 2012 09:11:03 Jacob Carlborg wrote: On 2012-03-08 05:54, Jonathan M Davis wrote: On Thursday, March 08, 2012 03:12:48 Zach the Mystic wrote: On Thursday, 8 March 2012 at 01:43:26 UTC, Daniel Murphy wrote: Zach the Mysticreachminusthiszachgm...@dot.com wrote in

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread David Nadlinger
On Wednesday, 7 March 2012 at 20:02:57 UTC, Zach the Mystic wrote: https://github.com/zachthemystic/ddmd-clean/ By the way, in compilers, »code generation« is commonly used to refer to the generation of machine code; so using the term to refer to .di file generation/pretty-printing could be

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread James Miller
On 8 March 2012 22:05, David Nadlinger s...@klickverbot.at wrote: On Wednesday, 7 March 2012 at 20:02:57 UTC, Zach the Mystic wrote: https://github.com/zachthemystic/ddmd-clean/ I would like to see the parser output an AST for use in other situations. It would be nice to have a tool that can

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Zach the Mystic
On Thursday, 8 March 2012 at 09:05:05 UTC, David Nadlinger wrote: On Wednesday, 7 March 2012 at 20:02:57 UTC, Zach the Mystic wrote: https://github.com/zachthemystic/ddmd-clean/ By the way, in compilers, »code generation« is commonly used to refer to the generation of machine code; so using

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Zach the Mystic
On Thursday, 8 March 2012 at 04:53:20 UTC, Zach the Mystic wrote: Anyway, the first thing I need is a gui, and a code generator capable of coloring its output appropriately, so I'm working on that, but it's not (even close to) ready for show yet! By Code Generator I actually mean

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Zach the Mystic
On Thursday, 8 March 2012 at 07:49:57 UTC, Jonathan M Davis wrote: The lexer is going to need to take a range of dchar (which may or may not be an array), And while the lexer would need to operate on generic ranges of dchar, it would probably have to be special-cased for strings in a number of

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Zach the Mystic
I hit send before I was done writing! On Thursday, 8 March 2012 at 07:49:57 UTC, Jonathan M Davis wrote: Fortunately however, in a book that Ali Çehreli is writing on D, he has a chapter on ranges that should help get you started: http://ddili.org/ders/d.en/ranges.html Thanks. This is a

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Dmitry Olshansky
On 08.03.2012 11:48, Jonathan M Davis wrote: On Thursday, March 08, 2012 08:21:17 Zach the Mystic wrote: On Thursday, 8 March 2012 at 04:56:07 UTC, Jonathan M Davis wrote: If you took it from ddmd, then it's definitely going to have to be GPL. Now, there is interest in having a D parser and

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Jonathan M Davis
On Thursday, March 08, 2012 22:03:12 Dmitry Olshansky wrote: On 08.03.2012 11:48, Jonathan M Davis wrote: A range is not necessarily a dynamic array, though a dynamic array is a range. The lexer is going to need to take a range of dchar (which may or may not be an array), and it's probably

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Jacob Carlborg
On 2012-03-08 08:21, Zach the Mystic wrote: On Thursday, 8 March 2012 at 04:56:07 UTC, Jonathan M Davis wrote: If you took it from ddmd, then it's definitely going to have to be GPL. Now, there is interest in having a D parser and lexer in Phobos. I don't know if your version will fit the bill

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Jacob Carlborg
On 2012-03-08 09:20, Jonathan M Davis wrote: On Thursday, March 08, 2012 09:11:03 Jacob Carlborg wrote: On 2012-03-08 05:54, Jonathan M Davis wrote: On Thursday, March 08, 2012 03:12:48 Zach the Mystic wrote: On Thursday, 8 March 2012 at 01:43:26 UTC, Daniel Murphy wrote: Zach the

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Dmitry Olshansky
On 08.03.2012 22:46, Jonathan M Davis wrote: On Thursday, March 08, 2012 22:03:12 Dmitry Olshansky wrote: On 08.03.2012 11:48, Jonathan M Davis wrote: A range is not necessarily a dynamic array, though a dynamic array is a range. The lexer is going to need to take a range of dchar (which may

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Jonathan M Davis
On Friday, March 09, 2012 00:54:48 Dmitry Olshansky wrote: On 08.03.2012 22:46, Jonathan M Davis wrote: On Thursday, March 08, 2012 22:03:12 Dmitry Olshansky wrote: On 08.03.2012 11:48, Jonathan M Davis wrote: A range is not necessarily a dynamic array, though a dynamic array is a range.

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Zach the Mystic
On Thursday, 8 March 2012 at 19:36:32 UTC, Jacob Carlborg wrote: This is great news. I was really worried that the license was etched in stone. I'll need help finding out who owns the code, plus legal advice if the process is more than just getting a simple confirmation email from each of the

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Zach the Mystic
On Thursday, 8 March 2012 at 07:49:57 UTC, Jonathan M Davis wrote: Regardless, you need to familiarize yourself with ranges if you want to get the lexer and parser ready for inclusion in Phobos. I have to admit that I don't currently feel competent to do this work. I'm too green. But I do

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-08 Thread Dmitry Olshansky
On 09.03.2012 1:12, Jonathan M Davis wrote: On Friday, March 09, 2012 00:54:48 Dmitry Olshansky wrote: On 08.03.2012 22:46, Jonathan M Davis wrote: On Thursday, March 08, 2012 22:03:12 Dmitry Olshansky wrote: On 08.03.2012 11:48, Jonathan M Davis wrote: A range is not necessarily a dynamic

D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Zach the Mystic
Check it out: https://github.com/zachthemystic/ddmd-clean/ This program is an adaptation of the work done by the ddmd team: http://www.dsource.org/projects/ddmd I described most of it in the README. I hope it runs smoothly for you. I only ran it on MAC OSX, and I don't know much about github

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Andrej Mitrovic
Hi, which version of the compiler can this be built with? I get this with 2.058: dmd\binExp.d(324): Error: function dmd.binExp.EqualExp.isBit of type bool() overrides but is not covariant with dmd.expression.Expression.isBit of type int() dmd\binExp.d(324): Error: function

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Zach the Mystic
On Wednesday, 7 March 2012 at 20:46:40 UTC, Andrej Mitrovic wrote: Hi, which version of the compiler can this be built with? I get this with 2.058: dmd\binExp.d(324): Error: function dmd.binExp.EqualExp.isBit of type bool() overrides but is not covariant with dmd.expression.Expression.isBit

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Zach the Mystic
On Wednesday, 7 March 2012 at 21:06:25 UTC, Zach the Mystic wrote: On Wednesday, 7 March 2012 at 20:46:40 UTC, Andrej Mitrovic wrote: Hi, which version of the compiler can this be built with? I get this with 2.058: dmd\binExp.d(324): Error: function dmd.binExp.EqualExp.isBit of type bool()

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread dnewbie
Zach the Mystic - I can't compile it. dmd\binExp.d(115): Error: function dmd.binExp.AndAndExp.isBit of type bool() overrides but is no t covariant with dmd.expression.Expression.isBit of type int() dmd\binExp.d(115): Error: function dmd.binExp.AndAndExp.isBit does not override any function On

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Robert Clipsham
On 07/03/2012 20:02, Zach the Mystic wrote: Check it out: https://github.com/zachthemystic/ddmd-clean/ This program is an adaptation of the work done by the ddmd team: http://www.dsource.org/projects/ddmd I described most of it in the README. I hope it runs smoothly for you. I only ran it on

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Andrej Mitrovic
You have a duplicate definition of: static int isTPL(Parameter[] arguments) in dmd.parameters.d

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Andrej Mitrovic
After fixing that dup definition the project compiles and runs on Win7 x64. Nice! :)

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Zach the Mystic
On Wednesday, 7 March 2012 at 21:15:46 UTC, dnewbie wrote: Zach the Mystic - I can't compile it. Still not working?

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread dnewbie
It's working.. Pretty cool :) On Thu, Mar 8, 2012, at 12:07 AM, Zach the Mystic wrote: On Wednesday, 7 March 2012 at 21:15:46 UTC, dnewbie wrote: Zach the Mystic - I can't compile it. Still not working?

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Manfred Nowak
Zach the Mystic wrote: Check it out: Done. Congrats! -manfred

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Daniel Murphy
Zach the Mystic reachminusthiszachgm...@dot.com wrote in message news:cibxxwrywnorlxwth...@forum.dlang.org... On Wednesday, 7 March 2012 at 20:46:40 UTC, Andrej Mitrovic wrote: Hi, which version of the compiler can this be built with? I get this with 2.058: dmd\binExp.d(324): Error:

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Daniel Murphy
Zach the Mystic reachminusthiszachgm...@dot.com wrote in message news:afqmbmvuvizvgfooe...@forum.dlang.org... I'll gladly put a license on it if the leaders of the community tell me which one to use ( Artistic, libpng, Boost ). Zach It will need to be the same license as the frontend

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Zach the Mystic
On Thursday, 8 March 2012 at 01:38:43 UTC, Daniel Murphy wrote: You should check, but I think isBit is dead code anyway. I think it is. I've left a number of dead codes because it helped me understand the whole system better. There's a lot of isXXX() functions which come in handy, so maybe

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Zach the Mystic
On Thursday, 8 March 2012 at 01:43:26 UTC, Daniel Murphy wrote: Zach the Mystic reachminusthiszachgm...@dot.com wrote in message news:afqmbmvuvizvgfooe...@forum.dlang.org... I'll gladly put a license on it if the leaders of the community tell me which one to use ( Artistic, libpng, Boost ).

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Daniel Murphy
Zach the Mystic reachminusthiszachgm...@dot.com wrote in message news:duefgfqidzxwcfvge...@forum.dlang.org... On Thursday, 8 March 2012 at 01:38:43 UTC, Daniel Murphy wrote: You should check, but I think isBit is dead code anyway. I think it is. I've left a number of dead codes because it

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread dolive
Zach the Mystic Wrote: Check it out: https://github.com/zachthemystic/ddmd-clean/ This program is an adaptation of the work done by the ddmd team: http://www.dsource.org/projects/ddmd I described most of it in the README. I hope it runs smoothly for you. I only ran it on MAC OSX, and I

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Zach the Mystic
On Thursday, 8 March 2012 at 05:05:46 UTC, Daniel Murphy wrote: Zach the Mystic reachminusthiszachgm...@dot.com wrote in message news:duefgfqidzxwcfvge...@forum.dlang.org... On Thursday, 8 March 2012 at 01:38:43 UTC, Daniel Murphy wrote: You should check, but I think isBit is dead code

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Zach the Mystic
On Thursday, 8 March 2012 at 04:56:07 UTC, Jonathan M Davis wrote: If you took it from ddmd, then it's definitely going to have to be GPL. Now, there is interest in having a D parser and lexer in Phobos. I don't know if your version will fit the bill (e.g. it must have a range-based API),

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Zach the Mystic
On Thursday, 8 March 2012 at 05:41:46 UTC, dolive wrote: Great work ! Ask a few questions : Is there documentation? can it parse dmd c source file ? ( Auto- complete feature of the ide will involve dmd c source file ? ) thank's Dolive No documentation. Even the API is inconsistent

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Jonathan M Davis
On Thursday, March 08, 2012 08:21:17 Zach the Mystic wrote: On Thursday, 8 March 2012 at 04:56:07 UTC, Jonathan M Davis wrote: If you took it from ddmd, then it's definitely going to have to be GPL. Now, there is interest in having a D parser and lexer in Phobos. I don't know if your

Re: D port of dmd: Lexer, Parser, AND CodeGenerator fully operational

2012-03-07 Thread Jonathan M Davis
On Thursday, March 08, 2012 08:45:13 Zach the Mystic wrote: On Thursday, 8 March 2012 at 07:21:19 UTC, Zach the Mystic wrote: On Thursday, 8 March 2012 at 04:56:07 UTC, Jonathan M Davis wrote: If you took it from ddmd, then it's definitely going to have to be GPL. Now, there is