Thread overview
Dfilter for Doxygen 1.4.2
Apr 12, 2005
Stewart Gordon
Apr 13, 2005
Stewart Gordon
Apr 13, 2005
Stewart Gordon
Apr 13, 2005
Stewart Gordon
Apr 21, 2005
Stewart Gordon
April 12, 2005
I've just done an updated version of Dfilter geared towards Doxygen 1.4.2.  It's actually turned out to be more lines of code than the previous version - as it happens, Doxygen is still even less capable of parsing D code than I thought it would be.

http://bugzilla.gnome.org/show_bug.cgi?id=173045

Main changes:
- merged in James Dunne's additions to convert versions to preprocessor
directives (pending a better solution)
- got rid of filtering details that aren't necessary anymore
- completely revamped support for attribute blocks - now works on all
attributes, not just access ones
- removes more things that Doxygen can't make any sense of (align and
pragma attributes, /+...+/ comments)

Stewart.

-- 
My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.


April 12, 2005
Stewart Gordon wrote:

> I've just done an updated version of Dfilter geared towards Doxygen 1.4.2.  It's actually turned out to be more lines of code than the previous version - as it happens, Doxygen is still even less capable of parsing D code than I thought it would be.

Nice, here is a patch to make it compile with GDC too...

Fixes:
	expression expected, not 'TOK36' (#36 is dollar, by the way)
	function std.c.stdio.fwrite conflicts with std.stdio.fwrite

--anders


April 13, 2005
Anders F Björklund wrote:
<snip>
> Nice, here is a patch to make it compile with GDC too...
> 
> Fixes:
>     expression expected, not 'TOK36' (#36 is dollar, by the way)

Looks like GDC has some catching up to do....

>     function std.c.stdio.fwrite conflicts with std.stdio.fwrite
<snip>

Why the two functions, I wonder?

Stewart.

-- 
My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.
April 13, 2005
Stewart Gordon wrote:

>> Nice, here is a patch to make it compile with GDC too...
>>
>> Fixes:
>>     expression expected, not 'TOK36' (#36 is dollar, by the way)
> 
> Looks like GDC has some catching up to do....

Indeed, but if you glance over at the D.gnu newsgroup,
you will see that David Friedman is doing a great job!

Besides, $ is an experimental feature of DMD anyway...
Simply using array.length, is less likely to go away ?

>>     function std.c.stdio.fwrite conflicts with std.stdio.fwrite
> 
> <snip>
> 
> Why the two functions, I wonder?

Phobos tends to run into a few conflicts with the standard headers.

In this case, it's because std.stdio imports std.c.stdio always ?

--anders
April 13, 2005
Anders F Björklund wrote:
> Stewart Gordon wrote:
> 
>>> Nice, here is a patch to make it compile with GDC too...
>>>
>>> Fixes:
>>>     expression expected, not 'TOK36' (#36 is dollar, by the way)
>>
>> Looks like GDC has some catching up to do....
> 
> Indeed, but if you glance over at the D.gnu newsgroup,
> you will see that David Friedman is doing a great job!
> 
> Besides, $ is an experimental feature of DMD anyway...
> Simply using array.length, is less likely to go away ?

Guess you're right....

>>>     function std.c.stdio.fwrite conflicts with std.stdio.fwrite
>>
>> <snip>
>>
>> Why the two functions, I wonder?
> 
> Phobos tends to run into a few conflicts with the standard headers.
> 
> In this case, it's because std.stdio imports std.c.stdio always ?

That shouldn't have anything to do with it.  If std.stdio imports std.c.stdio, which declares fwrite, then it's still std.c.stdio.fwrite, not std.stdio.fwrite, isn't it?

Stewart.

-- 
My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.
April 13, 2005
Stewart Gordon wrote:

>> Phobos tends to run into a few conflicts with the standard headers.
>> In this case, it's because std.stdio imports std.c.stdio always ?
> 
> That shouldn't have anything to do with it.  If std.stdio imports std.c.stdio, which declares fwrite, then it's still std.c.stdio.fwrite, not std.stdio.fwrite, isn't it?

To be honest, I am not sure. I just know that those two are
always getting mixed up, in GDC. Maybe I should ask David...

Hey, wait a second. Your dfilter program did import both:
import std.file, std.ctype, std.string, std.c.stdio, std.stdio;

Wonder why it works on DMD ?

--anders
April 13, 2005
Anders F Björklund wrote:
> Stewart Gordon wrote:
<snip>
>> That shouldn't have anything to do with it.  If std.stdio imports std.c.stdio, which declares fwrite, then it's still std.c.stdio.fwrite, not std.stdio.fwrite, isn't it?
> 
> To be honest, I am not sure. I just know that those two are
> always getting mixed up, in GDC. Maybe I should ask David...
> 
> Hey, wait a second. Your dfilter program did import both:
> import std.file, std.ctype, std.string, std.c.stdio, std.stdio;

As I said, that shouldn't have anything to do with it.

> Wonder why it works on DMD ?

Because the bug is in the GDC-specific parts, I guess.

Stewart.

-- 
My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.
April 21, 2005
Anders F Björklund wrote:
<snip>
> Nice, here is a patch to make it compile with GDC too...
> 
> Fixes:
>     expression expected, not 'TOK36' (#36 is dollar, by the way)
>     function std.c.stdio.fwrite conflicts with std.stdio.fwrite
<snip>

I've put this in and also fixed a few more bugs:

- removal of /+...+/ comments (had forgotten to update the end pointer)
- tokenising '\'' (I should've tried running dfilter on its own code
sooner!)

Attached is a combined patch.

I've also put the whole program here....

http://smjg.port5.com/pr/d/

(Maybe the version on Dsource could be updated...?)

Stewart.

-- 
My e-mail is valid but not my primary mailbox.  Please keep replies on the 'group where everyone may benefit.