From 7d68132721bb4c12de8b846717972a25899ecc3f Mon Sep 17 00:00:00 2001 From: François Pottier Date: Thu, 8 Oct 2015 01:11:42 +0200 Subject: 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. --- cparser/pre_parser.mly | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cparser/pre_parser.mly') 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. *) -- cgit