diff options
author | François Pottier <francois.pottier@inria.fr> | 2015-10-08 10:09:20 +0200 |
---|---|---|
committer | François Pottier <francois.pottier@inria.fr> | 2015-10-23 12:51:37 +0200 |
commit | ca5594ace000eebab2e89791aa42cb849fad1a16 (patch) | |
tree | 56407209121ce6f9f73ea4507ad426de573c60d0 | |
parent | 1c6d12874f0737d07acbda6b56e43053ca159c36 (diff) | |
download | compcert-ca5594ace000eebab2e89791aa42cb849fad1a16.tar.gz compcert-ca5594ace000eebab2e89791aa42cb849fad1a16.zip |
Factorized [declaration_specifier_no_typedef_name].
This results in slightly fewer states.
-rw-r--r-- | cparser/pre_parser.mly | 14 |
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 |