json and ddoc

Adam D. Ruppe destructionator at gmail.com
Wed Aug 1 07:07:03 PDT 2012


I'm (finally) updating my dpldocs.info website again, and
before I just pulled names from the generated Phobos html.

This time, I want to use dmd's json output to avoid dependency
on the specific html layout of std.ddoc.


Anyway I hit dmd -c -X -D *.d in the phobos dir. Boom, I got
one big .json file with all the info.

But, the comments aren't parsed at all.



So, my question is: do we have a ddoc parser that stands alone?


BTW: this is the complete listing from json so far:
http://dpldocs.info/search/awesome

I'm actually impressed with the speed, considering it is 
re-parsing
3 MB of generated json per load. std.variant and std.json might 
not
be speed demons, but they are plenty good enough for me.

The ultimate goal here is to revitalize my D search engine and to
make it as a nice index for all functions, with brief 
descriptions,
etc., hopefully for all D libs everywhere.

With the html, dealing with different people's macros to parse it
is a pain. But with the json, dmd always does it the same way, so
with some luck, I can just add a box "upload your project's json
file" and allow easy instant submissions for other libs.


More information about the Digitalmars-d mailing list