From ca5594ace000eebab2e89791aa42cb849fad1a16 Mon Sep 17 00:00:00 2001 From: François Pottier Date: Thu, 8 Oct 2015 10:09:20 +0200 Subject: Factorized [declaration_specifier_no_typedef_name]. This results in slightly fewer states. --- cparser/pre_parser.mly | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'cparser/pre_parser.mly') 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 -- cgit