"Jonathan M Davis" wrote in message
news:mailman.2700.1300915109.4748.digitalmars-d-le...@puremagic.com...
>> On 3/23/11, Jonathan M Davis 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 i
"Nick Sabalausky" wrote in message
news:imivp7$2fu$1...@digitalmars.com...
> "Alexey Prokhin" wrote in message
> news:mailman.2713.1300954193.4748.digitalmars-d-le...@puremagic.com...
>>> Currently, as far as I know, there are only two lexers and two parsers
>>> for
>>> D: the C++ front end wh
"Andrej Mitrovic" wrote in message
news:mailman.2696.1300895928.4748.digitalmars-d-le...@puremagic.com...
> On 3/23/11, Jonathan M Davis 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 thou
"Alexey Prokhin" wrote in message
news:mailman.2713.1300954193.4748.digitalmars-d-le...@puremagic.com...
>> 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 ba
"Regan Heath" wrote in message
news:op.vswbv8qj54x...@puck.auriga.bhead.co.uk...
> On Wed, 23 Mar 2011 21:16:02 -, Jonathan M Davis
> wrote:
>> There are tasks for which you need to be able to lex and parse D code.
>> To 100% correctly remove unit tests would be one such task.
>
> Is that
spir wrote:
On 03/25/2011 12:08 PM, Regan Heath wrote:
On Wed, 23 Mar 2011 21:16:02 -, Jonathan M Davis
wrote:
There are tasks for which you need to be able to lex and parse D
code. To
100% correctly remove unit tests would be one such task.
Is that last bit true? You definitely need to
On 03/25/2011 12:08 PM, Regan Heath wrote:
On Wed, 23 Mar 2011 21:16:02 -, Jonathan M Davis
wrote:
There are tasks for which you need to be able to lex and parse D code. To
100% correctly remove unit tests would be one such task.
Is that last bit true? You definitely need to be able to l
On Wed, 23 Mar 2011 21:16:02 -, Jonathan M Davis
wrote:
There are tasks for which you need to be able to lex and parse D code.
To 100% correctly remove unit tests would be one such task.
Is that last bit true? You definitely need to be able to lex it, but
instead of actually parsing i
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/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 th
> 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
> 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 i
What about the artistic license, the front-end can be used with that
license. Is that less restrictive than GPL?
On 3/23/11, Jonathan M Davis wrote:
>> On 3/23/11, Jonathan M Davis 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
> On 3/23/11, Jonathan M Davis 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 some stuff bu
> On 03/23/2011 09:16 AM, Jonathan M Davis wrote:
> >> On Sun, 20 Mar 2011 07:50:10 -, 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 w
On 03/23/2011 09:16 AM, Jonathan M Davis wrote:
On Sun, 20 Mar 2011 07:50:10 -, 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, st
On 3/23/11, Jonathan M Davis 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.
On Wed, 23 Mar 2011 15:16:46 -, Jonathan M Davis
wrote:
I was just thinking .. if we get a list of the symbols the linker is
including, then write an app to take that list, and strip everything
else
out of the source .. would that work. The Q's are how hard is it to get
the symbols from
> On Sun, 20 Mar 2011 07:50:10 -, 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, s
On Sun, 20 Mar 2011 07:50:10 -, 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 {} bl
On Mon, 21 Mar 2011 01:52:45 +0100, Ary Manzana
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.
Motivation: Bug reports fre
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 loo
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 with
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 which
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 t
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 !=
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 s
> 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,
> >
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 all
> 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.
> >>>
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
On 2011-03-19 20:41:09 -0400, Jonathan M Davis 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 file.
Motivation: Bug
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.
> >> Prin
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 ve
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
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, http:
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 Phobos
38 matches
Mail list logo