aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/pre_parser.mly
diff options
context:
space:
mode:
authorFrançois Pottier <francois.pottier@inria.fr>2015-10-08 10:09:20 +0200
committerFrançois Pottier <francois.pottier@inria.fr>2015-10-23 12:51:37 +0200
commitca5594ace000eebab2e89791aa42cb849fad1a16 (patch)
tree56407209121ce6f9f73ea4507ad426de573c60d0 /cparser/pre_parser.mly
parent1c6d12874f0737d07acbda6b56e43053ca159c36 (diff)
downloadcompcert-kvx-ca5594ace000eebab2e89791aa42cb849fad1a16.tar.gz
compcert-kvx-ca5594ace000eebab2e89791aa42cb849fad1a16.zip
Factorized [declaration_specifier_no_typedef_name].
This results in slightly fewer states.
Diffstat (limited to 'cparser/pre_parser.mly')
-rw-r--r--cparser/pre_parser.mly14
1 files changed, 9 insertions, 5 deletions
diff --git a/cparser/pre_parser.mly b/cparser/pre_parser.mly
index 6627568d..f25dde4f 100644
--- a/cparser/pre_parser.mly
+++ b/cparser/pre_parser.mly
@@ -377,15 +377,19 @@ declaration_specifier_no_type:
| function_specifier
{}
-(* [declaration_specifiers_no_typedef_name] matches declaration
+(* [declaration_specifier_no_typedef_name] matches declaration
specifiers that contain neither "typedef" nor a typedef name
(i.e. type specifier declared using a previous "typedef
keyword"). *)
+declaration_specifier_no_typedef_name:
+| storage_class_specifier_no_typedef
+| type_qualifier
+| function_specifier
+| type_specifier_no_typedef_name
+ {}
+
declaration_specifiers_no_typedef_name:
-| storage_class_specifier_no_typedef declaration_specifiers_no_typedef_name?
-| type_qualifier declaration_specifiers_no_typedef_name?
-| function_specifier declaration_specifiers_no_typedef_name?
-| type_specifier_no_typedef_name declaration_specifiers_no_typedef_name?
+ declaration_specifier_no_typedef_name declaration_specifiers_no_typedef_name?
{}
(* [declaration_specifiers_no_type] matches declaration_specifiers