aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/pre_parser.mly
diff options
context:
space:
mode:
authorFrançois Pottier <francois.pottier@inria.fr>2015-11-24 09:00:39 +0100
committerFrançois Pottier <francois.pottier@inria.fr>2015-11-24 09:00:39 +0100
commitaa489359655148ea37a432ec43f8bde854da6847 (patch)
treec312844f5391f539516ce8ff166b045cda5b02f4 /cparser/pre_parser.mly
parente20490e57b6098c330187e51908b8e1b9975e72e (diff)
downloadcompcert-kvx-aa489359655148ea37a432ec43f8bde854da6847.tar.gz
compcert-kvx-aa489359655148ea37a432ec43f8bde854da6847.zip
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.
Diffstat (limited to 'cparser/pre_parser.mly')
-rw-r--r--cparser/pre_parser.mly9
1 files changed, 3 insertions, 6 deletions
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