Thread overview
{DMD-AST-Tool} For beginning DDMD hackers
Nov 12, 2016
Stefan Koch
Nov 13, 2016
Stefan Koch
Nov 15, 2016
Dicebot
Nov 19, 2016
Stefan Koch
Nov 23, 2016
ANtlord
Nov 23, 2016
Stefan Koch
November 12, 2016
Hi Guys,

I have written a small utility called dmd-ast-tool.
It can be used to quickly generate boilerplate code for dmd-ast-visitors.
Originally it was only written for my personal use, it used to work with a handwritten text-file representing dmds ast class hierarchy.

However I recently updated it construct the class hierarchy from ddmds source code.

It is pretty bare-boned, but maybe it can be useful to some of you :)

https://github.com/UplinkCoder/dmd-ast-tool.


November 13, 2016
On Saturday, 12 November 2016 at 10:26:53 UTC, Stefan Koch wrote:
> Hi Guys,
>
> I have written a small utility called dmd-ast-tool.
> It can be used to quickly generate boilerplate code for dmd-ast-visitors.
> Originally it was only written for my personal use, it used to work with a handwritten text-file representing dmds ast class hierarchy.
>
> However I recently updated it construct the class hierarchy from ddmds source code.
>
> It is pretty bare-boned, but maybe it can be useful to some of you :)
>
> https://github.com/UplinkCoder/dmd-ast-tool.

I have just added a bit of code to modify the ast-nodes.
It can also print a few stats about dmd.
For example the names of the visitors implemented in dmd.


November 15, 2016
On 11/13/2016 10:40 AM, Stefan Koch wrote:
> On Saturday, 12 November 2016 at 10:26:53 UTC, Stefan Koch wrote:
>> Hi Guys,
>>
>> I have written a small utility called dmd-ast-tool.
>> It can be used to quickly generate boilerplate code for dmd-ast-visitors.
>> Originally it was only written for my personal use, it used to work
>> with a handwritten text-file representing dmds ast class hierarchy.
>>
>> However I recently updated it construct the class hierarchy from ddmds source code.
>>
>> It is pretty bare-boned, but maybe it can be useful to some of you :)
>>
>> https://github.com/UplinkCoder/dmd-ast-tool.
> 
> I have just added a bit of code to modify the ast-nodes.
> It can also print a few stats about dmd.
> For example the names of the visitors implemented in dmd.

You may want to consider adding it to https://github.com/dlang/tools




November 19, 2016
On Tuesday, 15 November 2016 at 11:31:01 UTC, Dicebot wrote:
>
> You may want to consider adding it to https://github.com/dlang/tools

Yes, I will make it a little more user friendly, then I'll raise a PR.


November 23, 2016
On Saturday, 12 November 2016 at 10:26:53 UTC, Stefan Koch wrote:
> Hi Guys,
>
> I have written a small utility called dmd-ast-tool.
> It can be used to quickly generate boilerplate code for dmd-ast-visitors.
> Originally it was only written for my personal use, it used to work with a handwritten text-file representing dmds ast class hierarchy.
>
> However I recently updated it construct the class hierarchy from ddmds source code.
>
> It is pretty bare-boned, but maybe it can be useful to some of you :)
>
> https://github.com/UplinkCoder/dmd-ast-tool.

Hello! Can you clarify? Does this program use ddmd or ddmd is just used as code sample for parsing?
November 23, 2016
On Wednesday, 23 November 2016 at 07:11:56 UTC, ANtlord wrote:
> On Saturday, 12 November 2016 at 10:26:53 UTC, Stefan Koch wrote:
>> Hi Guys,
>>
>> I have written a small utility called dmd-ast-tool.
>> It can be used to quickly generate boilerplate code for dmd-ast-visitors.
>> Originally it was only written for my personal use, it used to work with a handwritten text-file representing dmds ast class hierarchy.
>>
>> However I recently updated it construct the class hierarchy from ddmds source code.
>>
>> It is pretty bare-boned, but maybe it can be useful to some of you :)
>>
>> https://github.com/UplinkCoder/dmd-ast-tool.
>
> Hello! Can you clarify? Does this program use ddmd or ddmd is just used as code sample for parsing?

It is a special purpose tool to get the AST-class-hierarchy of ddmd.
I would not even use the word parser, since it just matches a simple regex on ddmds source code.
It then does a correlation pass to determine parent-child relationships between the classes.
The resulting data-structure can then be used to display said hierarchy.