Want to help DMD bugfixing? Write a simple utility.

Zirneklis zerneklis.web at gmail.com
Sun Mar 20 13:29:08 PDT 2011


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 very large test cases.
>> Even ones which look small often import from Phobos.
>> Reducing the test case is the first step in fixing the bug, and it's
>> frequently ~30% of the total time required. Stripping out the unit tests
>> is the most time-consuming and error-prone part of reducing the test
>> case.
>>
>> This should be a good task if you're relatively new to D but would like
>> to do something really useful.
>> -Don
>
> 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.
>
> -Kai Meyer

As far as I know the documentation /is/ the official grammar
http://digitalmars.com/d/2.0/lex.html


More information about the Digitalmars-d-learn mailing list