[Issue 2680] New: Declarator rule is broken

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 20 18:04:04 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2680

           Summary: Declarator rule is broken
           Product: D
           Version: 2.025
          Platform: PC
               URL: http://www.digitalmars.com/d/2.0/declaration.html
        OS/Version: Linux
            Status: NEW
          Severity: regression
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: jlquinn at optonline.net


This is a regression from http://www.digitalmars.com/d/1.0/declaration.html
The definition of Declarator prevents parsing the following declaration:

int x = 3;

Declaration -> Decl
Decl -> BasicType Declarators
BasicType -> "int"
Declarators -> DeclaratorInitializer
DeclaratorInitializer -> Declarator "=" Initializer

Declarator can't parse the Identifier 'x', though.  It must start with a
BasicType2, which cannot begin with Identifier as specified.

See the following thread as well:

http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=84691


-- 



More information about the Digitalmars-d-bugs mailing list