From b5c8b1f97f447c43fb8b8bde087b4cdb67dd5842 Mon Sep 17 00:00:00 2001 From: hatsusato Date: Sun, 11 Sep 2016 15:14:42 +0900 Subject: [PATCH 1/2] Add typedef-specifier --- src/parser.y | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/parser.y b/src/parser.y index 52aae5b1..be07e494 100644 --- a/src/parser.y +++ b/src/parser.y @@ -139,6 +139,10 @@ linkage-specifier | STATIC ; +typedef-specifier +: TYPEDEF +; + type-specifier : fundamental-specifier /* | struct-or-union-specifier */ From 23b1a6aaa98db4530d9e240fccc9e3968a7aa8c1 Mon Sep 17 00:00:00 2001 From: hatsusato Date: Sun, 11 Sep 2016 14:59:42 +0900 Subject: [PATCH 2/2] Remove typedef-declaration --- src/parser.y | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/parser.y b/src/parser.y index be07e494..a655abc5 100644 --- a/src/parser.y +++ b/src/parser.y @@ -187,10 +187,6 @@ init-declarator /* | declarator '=' initializer */ ; -typedef-declaration -: TYPEDEF declaration -; - declarator : direct-declarator /* : pointer-list.opt direct-declarator */ @@ -252,7 +248,7 @@ declaration-statement-list declaration-statement : storage-class-specifier.opt init-declaration -| typedef-declaration +| typedef-specifier declaration ; jump-statement @@ -274,7 +270,7 @@ translation-unit external-declaration : linkage-specifier.opt function-definition | linkage-specifier.opt init-declaration -| typedef-declaration +| typedef-specifier declaration ; function-definition-declarator