From aa489359655148ea37a432ec43f8bde854da6847 Mon Sep 17 00:00:00 2001 From: François Pottier Date: Tue, 24 Nov 2015 09:00:39 +0100 Subject: A simplification in the grammar, leading to fewer states in the automaton and merging two error states into one. There should be no observable change. --- cparser/pre_parser.mly | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'cparser/pre_parser.mly') diff --git a/cparser/pre_parser.mly b/cparser/pre_parser.mly index d217a7a4..d6a4a21c 100644 --- a/cparser/pre_parser.mly +++ b/cparser/pre_parser.mly @@ -873,18 +873,15 @@ asm_flags: {} translation_unit_file: -| translation_unit EOF -| EOF +| translation_item* EOF {} -translation_unit: +translation_item: | external_declaration -| translation_unit external_declaration -| translation_unit SEMICOLON | SEMICOLON {} -external_declaration: +%inline external_declaration: | function_definition | declaration(external_declaration) | PRAGMA -- cgit