www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3670] New: Declarator grammar rule is broken

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3670

           Summary: Declarator grammar rule is broken
           Product: D
           Version: 2.038
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: nobody puremagic.com
        ReportedBy: jlquinn optonline.net


--- Comment #0 from Jerry Quinn <jlquinn optonline.net> 2010-01-03 22:41:38 PST
---
http://digitalmars.com/d/2.0/declaration.html

As defined, the Declarator rule prevents parsing a simple function such as

void foo() {}

The problem is that BasicType2 cannot be optional in Declarator

Parsing gives

Declaration
Decl
BasicType Declarator FunctionBody
void Declarator FunctionBody
void BasicType2 Identifier DeclaratorSuffixes FunctionBody
void BasicType2 foo DeclaratorSuffixes FunctionBody
void BasicType2 foo DeclaratorSuffix FunctionBody
void BasicType2 foo Parameters FunctionBody
void BasicType2 foo () FunctionBody
void BasicType2 foo () {}

There is no valid expansion for BasicType2

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 03 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3670


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com


--- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2010-02-12
16:22:06 PST ---
Changeset 1420

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 12 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3670


Walter Bright <bugzilla digitalmars.com> changed:

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


--- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2010-03-08
22:21:46 PST ---
Fixed dmd 1.057 and 2.041

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