On Wed, Aug 1, 2012 at 8:07 AM, Adam D. Ruppe <span dir="ltr"><<a href="mailto:destructionator@gmail.com" target="_blank">destructionator@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm (finally) updating my <a href="http://dpldocs.info" target="_blank">dpldocs.info</a> website again, and<br>
before I just pulled names from the generated Phobos html.<br>
<br>
This time, I want to use dmd's json output to avoid dependency<br>
on the specific html layout of std.ddoc.<br>
<br>
<br>
Anyway I hit dmd -c -X -D *.d in the phobos dir. Boom, I got<br>
one big .json file with all the info.<br>
<br>
But, the comments aren't parsed at all.<br>
<br>
<br>
<br>
So, my question is: do we have a ddoc parser that stands alone?<br>
<br>
<br>
BTW: this is the complete listing from json so far:<br>
<a href="http://dpldocs.info/search/awesome" target="_blank">http://dpldocs.info/search/<u></u>awesome</a><br>
<br>
I'm actually impressed with the speed, considering it is re-parsing<br>
3 MB of generated json per load. std.variant and std.json might not<br>
be speed demons, but they are plenty good enough for me.<br>
<br>
The ultimate goal here is to revitalize my D search engine and to<br>
make it as a nice index for all functions, with brief descriptions,<br>
etc., hopefully for all D libs everywhere.<br>
<br>
With the html, dealing with different people's macros to parse it<br>
is a pain. But with the json, dmd always does it the same way, so<br>
with some luck, I can just add a box "upload your project's json<br>
file" and allow easy instant submissions for other libs.<br>
</blockquote></div><div><br></div>There is already a pull request to add (at least some) ddoc to json:<div><br><div><a href="http://forum.dlang.org/post/ycfyhcsbciguzaxwuppv@forum.dlang.org">http://forum.dlang.org/post/ycfyhcsbciguzaxwuppv@forum.dlang.org</a>
</div></div>