Thread overview
[Issue 601] New: statement.html - Formatting/markup errors in BNF
Nov 26, 2006
d-bugmail
Apr 21, 2007
d-bugmail
Jul 16, 2009
Stewart Gordon
Jul 16, 2009
Walter Bright
Sep 03, 2009
Walter Bright
November 26, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=601

           Summary: statement.html - Formatting/markup errors in BNF
           Product: D
           Version: 0.175
          Platform: All
               URL: http://www.digitalmars.com/d/statement.html
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: smjg@iname.com


There are a few errors and inconsistencies in how the BNF in the spec is formatted, which are noticeable on the Statements page.

1. British and American spellings are mixed, even in multiple occurrences of the same syntactic element.  This instance should suffice to illustrate:

NonEmptyStatement:
    LabeledStatement
    [...]

LabelledStatement:
    Identifier ':' NoScopeStatement


2. While still on the subject of Label(l)edStatement, no other bit of BNF in
the D spec (that I've found) has a token delimited by single quotes.  They
shouldn't be here either.


3.
DefaultStatement:
    default: Statement

There should be a space between "default" and ":" to reflect that they are two separate tokens.  More trivial are instances in ForStatement, where the omitted spaces separate a token from a nonterminal:

ForStatement:
    for (Initialize Test; Increment) ScopeStatement

versus

    for ( Initialize Test ; Increment ) ScopeStatement


4.
ForeachStatement:
    Foreach (ForeachTypeList; Aggregate) NoScopeNonEmptyStatement

has, in addition to the same imperfection as the above, the open parenthesis in italics instead of bold.


5. Many of the link targets are malformed, for example:

<pre class="bnf"><a name=#Statement><i>Statement</i></a>:

Firstly, this is syntactically invalid HTML - '#' isn't one of the characters that may be included in an attribute value without quotes.  But that's an aside - target names shouldn't have the '#' at all.  The '#' comes into play only in URLs and hrefs.  Consequently, several of the links between parts of the page don't work.


-- 

April 21, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=601





------- Comment #1 from smjg@iname.com  2007-04-20 20:47 -------
Created an attachment (id=141)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=141&action=view)
Patch to fix points 1-4

Point 5 has been fixed (either that or gone away by itself).  This patch fixes
what remains.

(There may be a discrepancy in the file sizes - this is because TextPad removed whitespace from blank lines, which hasn't been included in the patch.)


-- 

July 16, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=601





--- Comment #2 from Stewart Gordon <smjg@iname.com>  2009-07-16 08:23:20 PDT ---
Why is it taking forever to fold in this fix???

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 16, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=601





--- Comment #3 from Walter Bright <bugzilla@digitalmars.com>  2009-07-16 15:18:12 PDT ---
Because it was overlooked. Sorry about that.

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


Walter Bright <bugzilla@digitalmars.com> changed:

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




--- Comment #4 from Walter Bright <bugzilla@digitalmars.com>  2009-09-03 13:22:10 PDT ---
Fixed dmd 1.047 and 2.032

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