Regan Heath re...@netmail.co.nz wrote in message
news:op.vswbv8qj54x...@puck.auriga.bhead.co.uk...
On Wed, 23 Mar 2011 21:16:02 -, Jonathan M Davis jmdavisp...@gmx.com
wrote:
There are tasks for which you need to be able to lex and parse D code.
To 100% correctly remove unit tests would
Jonathan M Davis jmdavisp...@gmx.com wrote in message
news:mailman.2700.1300915109.4748.digitalmars-d-le...@puremagic.com...
On 3/23/11, Jonathan M Davis jmdavisp...@gmx.com wrote:
That would require a full-blown D lexer and parser.
- Jonathan M Davis
Isn't DDMD written in D? I'm not
Currently, as far as I know, there are only two lexers and two parsers for
D: the C++ front end which dmd, gdc, and ldc use and the D front end which
ddmd uses and which is based on the C++ front end. Both of those are under
the GPL (which makes them useless for a lot of stuff) and both of
On 03/24/2011 08:53 AM, Alexey Prokhin wrote:
Currently, as far as I know, there are only two lexers and two parsers for
D: the C++ front end which dmd, gdc, and ldc use and the D front end which
ddmd uses and which is based on the C++ front end. Both of those are under
the GPL (which makes
Is there a copy of the official D grammar somewhere online? I wrote a
lexer for my Compiler class and would love to try and apply it to
another grammar.
The official D grammar is spread among the specification.
But I recall that someone compiled a complete grammar for D1 some time ago.
On 03/23/2011 09:16 AM, Jonathan M Davis wrote:
On Sun, 20 Mar 2011 07:50:10 -, Jonathan M
Davisjmdavisp...@gmx.com
wrote:
Jonathan M Davis wrote:
On Saturday 19 March 2011 18:04:57 Don wrote:
Jonathan M Davis wrote:
On Saturday 19 March 2011 17:11:56 Don wrote:
Here's the
On 3/23/11, Jonathan M Davis jmdavisp...@gmx.com wrote:
That would require a full-blown D lexer and parser.
- Jonathan M Davis
Isn't DDMD written in D? I'm not sure about how finished it is though.
Yes, but the lexer and parser in ddmd are not only GPL (which would be a
problem for
On 3/23/11, Jonathan M Davis jmdavisp...@gmx.com wrote:
On 3/23/11, Jonathan M Davis jmdavisp...@gmx.com wrote:
That would require a full-blown D lexer and parser.
- Jonathan M Davis
Isn't DDMD written in D? I'm not sure about how finished it is though.
Yes, but the lexer and parser in
What about the artistic license, the front-end can be used with that
license. Is that less restrictive than GPL?
What about the artistic license, the front-end can be used with that
license. Is that less restrictive than GPL?
I don't know what the exact licensing situation is. However, as I understand
it, the C++ front-end is under the GPL, and therefore because ddmd is based on
the C++ front-end, it is
On Mon, 21 Mar 2011 01:52:45 +0100, Ary Manzana a...@esperanto.org.ar
wrote:
On 3/19/11 9:11 PM, Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Strip out all comments as well.
Print out the resulting file.
Jonathan M Davis wrote:
On Saturday 19 March 2011 18:04:57 Don wrote:
Jonathan M Davis wrote:
On Saturday 19 March 2011 17:11:56 Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Strip out all comments as well.
Print
Jonathan M Davis wrote:
On Saturday 19 March 2011 18:04:57 Don wrote:
Jonathan M Davis wrote:
On Saturday 19 March 2011 17:11:56 Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Strip out all comments as
Jonathan M Davis wrote:
Jonathan M Davis wrote:
On Saturday 19 March 2011 18:04:57 Don wrote:
Jonathan M Davis wrote:
On Saturday 19 March 2011 17:11:56 Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Strip out
Jonathan M Davis wrote:
Jonathan M Davis wrote:
On Saturday 19 March 2011 18:04:57 Don wrote:
Jonathan M Davis wrote:
On Saturday 19 March 2011 17:11:56 Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Not very elegant but this should get the job done:
000 module strip;
001 import std.algoritm : countUntil;
002 import std.array: strip;
003 import std.file : read;
004 import std.string : splitlines;
005 import std.stdio: writeln;
006
007 void main(string[] args)
008 {
009 bool
The following patch addresses the following issues:
1) fixed improper handling of nested and multiline comments that
do not take up a complete line.
2) eliminate extra blank lines where unit tests and comments are
removed.
Replace lines 31 32 with:
# auto n = countUntil(line, +/);
# if(n !=
Messed that up again: see embeded change. Wish I could just copy
and pase but that's not possible with my current setup.
== Quote from Tyro[a.c.edwards] (nos...@home.com)'s article
The following patch addresses the following issues:
1) fixed improper handling of nested and multiline comments
On 03/19/2011 06:11 PM, Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Strip out all comments as well.
Print out the resulting file.
Motivation: Bug reports frequently come with very large test cases.
Even ones
On 20/03/2011 19:55, Kai Meyer wrote:
On 03/19/2011 06:11 PM, Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Strip out all comments as well.
Print out the resulting file.
Motivation: Bug reports frequently come
On 3/19/11 9:11 PM, Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Strip out all comments as well.
Print out the resulting file.
Motivation: Bug reports frequently come with very large test cases.
Even ones which
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Strip out all comments as well.
Print out the resulting file.
Motivation: Bug reports frequently come with very large test cases.
Even ones which look small often import from
On 3/20/11 1:11 AM, Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Strip out all comments as well.
Print out the resulting file.
I realize that you asked for a very specific utility, but in several
instances,
On Saturday 19 March 2011 17:11:56 Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Strip out all comments as well.
Print out the resulting file.
Motivation: Bug reports frequently come with very large test
Jonathan M Davis wrote:
On Saturday 19 March 2011 17:11:56 Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Strip out all comments as well.
Print out the resulting file.
Motivation: Bug reports frequently come with
On Saturday 19 March 2011 18:04:57 Don wrote:
Jonathan M Davis wrote:
On Saturday 19 March 2011 17:11:56 Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Strip out all comments as well.
Print out the
On 2011-03-19 20:41:09 -0400, Jonathan M Davis jmdavisp...@gmx.com said:
On Saturday 19 March 2011 17:11:56 Don wrote:
Here's the task:
Given a .d source file, strip out all of the unittest {} blocks,
including everything inside them.
Strip out all comments as well.
Print out the resulting
27 matches
Mail list logo