aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/pre_parser.mly
diff options
context:
space:
mode:
authorFrançois Pottier <francois.pottier@inria.fr>2015-10-08 01:11:42 +0200
committerFrançois Pottier <francois.pottier@inria.fr>2015-10-08 01:11:42 +0200
commit7d68132721bb4c12de8b846717972a25899ecc3f (patch)
treed62bb82b3e51cb2ba8ad4699633ac7cba66c0783 /cparser/pre_parser.mly
parent7f952a804eda8bac8d812800741b047550b1194b (diff)
downloadcompcert-kvx-7d68132721bb4c12de8b846717972a25899ecc3f.tar.gz
compcert-kvx-7d68132721bb4c12de8b846717972a25899ecc3f.zip
Replaced 4 uses of [ioption(declaration_specifiers_no_type)] with [declaration_specifiers_no_type?].
Inlining these options was not necessary. This reduces the number of states in the automaton.
Diffstat (limited to 'cparser/pre_parser.mly')
-rw-r--r--cparser/pre_parser.mly8
1 files changed, 4 insertions, 4 deletions
diff --git a/cparser/pre_parser.mly b/cparser/pre_parser.mly
index 6a2ae411..52a94078 100644
--- a/cparser/pre_parser.mly
+++ b/cparser/pre_parser.mly
@@ -392,17 +392,17 @@ declaration_specifiers_no_typedef_name:
*)
declaration_specifiers:
| ioption(declaration_specifiers_no_type) TYPEDEF_NAME declaration_specifiers_no_type?
-| ioption(declaration_specifiers_no_type) type_specifier_no_typedef_name declaration_specifiers_no_typedef_name?
+| declaration_specifiers_no_type? type_specifier_no_typedef_name declaration_specifiers_no_typedef_name?
{}
(* This matches declaration_specifiers that do contains once the
"typedef" keyword. To avoid conflicts, we also encode the
constraint described in the comment for [declaration_specifiers]. *)
declaration_specifiers_typedef:
-| ioption(declaration_specifiers_no_type) TYPEDEF declaration_specifiers_no_type? TYPEDEF_NAME declaration_specifiers_no_type?
+| declaration_specifiers_no_type? TYPEDEF declaration_specifiers_no_type? TYPEDEF_NAME declaration_specifiers_no_type?
| ioption(declaration_specifiers_no_type) TYPEDEF_NAME declaration_specifiers_no_type? TYPEDEF declaration_specifiers_no_type?
-| ioption(declaration_specifiers_no_type) TYPEDEF declaration_specifiers_no_type? type_specifier_no_typedef_name declaration_specifiers_no_typedef_name?
-| ioption(declaration_specifiers_no_type) type_specifier_no_typedef_name declaration_specifiers_no_typedef_name? TYPEDEF declaration_specifiers_no_typedef_name?
+| declaration_specifiers_no_type? TYPEDEF declaration_specifiers_no_type? type_specifier_no_typedef_name declaration_specifiers_no_typedef_name?
+| declaration_specifiers_no_type? type_specifier_no_typedef_name declaration_specifiers_no_typedef_name? TYPEDEF declaration_specifiers_no_typedef_name?
{}
(* A type specifier which is not a typedef name. *)