Thread overview
[Issue 2653] New: ConditionalStatement not referenced in rest of grammar
Feb 09, 2009
d-bugmail
Feb 09, 2009
d-bugmail
Jan 23, 2012
Walter Bright
February 09, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2653

           Summary: ConditionalStatement not referenced in rest of grammar
           Product: D
           Version: 2.023
          Platform: PC
               URL: http://www.digitalmars.com/d/2.0/version.html
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: jlquinn@optonline.net


Reading the text, I think the intent was to have the following

ConditionalDeclaration:
    Condition CCDeclarationBlock
    Condition CCDeclarationBlock else CCDeclarationBlock
    Condition : Declarations
    ConditionalStatement


-- 

February 09, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2653





------- Comment #1 from jlquinn@optonline.net  2009-02-09 08:48 -------
Looking into this further, dmd doesn't seem to distinguish between using CCDeclarationBlock or NoScopeNonEmptyStatement.  The compiler's approach seems reasonable to me. In that case, the grammar here should just be:

ConditionalDeclaration:
    Condition NoScopeNonEmptyStatement
    Condition NoScopeNonEmptyStatement else NoScopeNonEmptyStatement
    Condition : Declarations


-- 

January 23, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=2653


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |INVALID


--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2012-01-23 00:17:50 PST ---
If a conditional is used in module scope, it cannot contain statements. Hence, the existing grammar is correct.

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