September 20, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3554



--- Comment #10 from bearophile_hugs@eml.cc 2010-09-20 12:45:52 PDT ---
I may open a different bug report that asks for LPAREN and RPAREN macros to be defined in dmd, to be sure this problem doesn't get lost.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 20, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3554


Jonathan M Davis <jmdavisProg@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg@gmx.com


--- Comment #11 from Jonathan M Davis <jmdavisProg@gmx.com> 2010-09-20 16:28:48 PDT ---
They _are_ defined. They're $(LPAREN) and $(RPAREN).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 20, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3554



--- Comment #12 from bearophile_hugs@eml.cc 2010-09-20 16:35:12 PDT ---
(In reply to comment #11)
> They _are_ defined. They're $(LPAREN) and $(RPAREN).

Then where is the bug? Because there is a problem still.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 20, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3554



--- Comment #13 from Jonathan M Davis <jmdavisProg@gmx.com> 2010-09-20 16:45:48 PDT ---
Sorry, I didn't read the bug report all the way through. A new warning relating to unmatched parens in ddoc popped up with 2.049, and it specifically mentions $(LPAREN) and $(RPAREN), indicating that they are defined (hence why I told you that they are). But if they aren't working, then that would indicate that they're supposed to be defined but aren't, and then a bug report should indeed be filed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 21, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3554


bearophile_hugs@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


--- Comment #14 from bearophile_hugs@eml.cc 2010-09-21 04:28:18 PDT ---
Reopened because the problem isn't solved yet. See Comment 8.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 22, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3554



--- Comment #15 from Witold Baryluk <baryluk@smp.if.uj.edu.pl> 2010-11-21 16:50:01 PST ---
Thanks for your hard work, but I just tested initial bugreport in DMD 2.050, and it still do not work as expected.

  /** Produces something in (a;b] */
  float f(float a, float b) { return (a+b)/2.0; }
  /** Produces something in [a;b) */
  float h(float a, float b) { return (a+b)/2.0; }

  void main() { }


<br><br>
<dl><dt><big>float <u>f</u>(float <i>a</i>, float <i>b</i>);
</big></dt>
<dd>Produces something in <i>a</i>;<i>b</i>] <br><br>

</dd>
<dt><big>float <u>h</u>(float <i>a</i>, float <i>b</i>);
</big></dt>
<dd>Produces something in [<i>a</i>;<i>b</i> <br><br>

</dd>
</dl>


No ( or ).   :(

When compiling with -wi, i got

ttt.d(2): Warning: Ddoc: Stray '('. This may cause incorrect Ddoc output. Use
$(LPAREN) instead for unpaired left parentheses.
ttt.d(4): Warning: Ddoc: Stray ')'. This may cause incorrect Ddoc output. Use
$(RPAREN) instead for unpaired right parentheses.

Why it is hard to detect non-macro usage of parantheses? I was thinking macros need have $ before opening (.


After creating ddoc file:
RPAREN = )
LPAREN = (

And compiling again, i had now:

<br><br>
<dl><dt><big>float <u>f</u>(float <i>a</i>, float <i>b</i>);
</big></dt>
<dd>Produces something in (<i>a</i>;<i>b</i>] <br><br>

</dd>
<dt><big>float <u>h</u>(float <i>a</i>, float <i>b</i>);
</big></dt>
<dd>Produces something in [<i>a</i>;<i>b</i>) <br><br>

</dd>
</dl>


Which is exactly what was expected! (Warning are still there). But it works.

So just resolving problem with macro definition in compiler is needed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 06, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3554


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED
            Summary|Ddoc generats invalid       |Ddoc generates invalid
                   |output for documentation    |output for documentation
                   |comments with non paired    |comments with non paired
                   |paranthasis                 |parantheses


--- Comment #16 from Walter Bright <bugzilla@digitalmars.com> 2010-12-06 11:29:44 PST ---
http://www.dsource.org/projects/dmd/changeset/788

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 21, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3554



--- Comment #17 from bearophile_hugs@eml.cc 2010-12-21 01:35:46 PST ---
Just a note. This program, compiled with -w:


/// Return a random number in [0, 10)
void foo() {}
void main() {}


Prints:
test3.d(2): Warning: Ddoc: Stray ')'. This may cause incorrect Ddoc output. Use
$(RPAREN) instead for unpaired right parentheses.

But the generated HTML is correct.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 21, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3554


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug@yahoo.com.au


--- Comment #18 from Don <clugdbug@yahoo.com.au> 2010-12-21 02:06:39 PST ---
(In reply to comment #17)
> Just a note. This program, compiled with -w:
> 
> 
> /// Return a random number in [0, 10)
> void foo() {}
> void main() {}
> 
> 
> Prints:
> test3.d(2): Warning: Ddoc: Stray ')'. This may cause incorrect Ddoc output. Use
> $(RPAREN) instead for unpaired right parentheses.
> 
> But the generated HTML is correct.

This behaviour is intentional. DDoc now inserts a $(RPAREN) for you, that's why it's a warning, not an error.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 21, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3554



--- Comment #19 from Johannes Pfau <johannespfau@gmail.com> 2010-12-21 02:22:10 PST ---
Short explanation of the warning:

Consider this comment:
/// Return a random number in $(BOLD [0, 10))

DMD cannot know if you mean:
/// Return a random number in $(BOLD [0, 10$(RPAREN))
(right parenthesis is bold)

or
/// Return a random number in $(BOLD [0, 10)$(RPAREN)
(right parenthesis isn't bold)

So in some cases it could cause wrong output and therefore the warning is needed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------