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: nob...@puremagic.com
        ReportedBy: jlqu...@optonline.net


--- Comment #0 from Jerry Quinn <jlqu...@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: -------

Reply via email to