diff options
author | François Pottier <francois.pottier@inria.fr> | 2015-10-07 10:37:06 +0200 |
---|---|---|
committer | François Pottier <francois.pottier@inria.fr> | 2015-10-07 10:37:06 +0200 |
commit | e9ba1d3276b0b2fbc37ecb8bd7e4955fd8ec030b (patch) | |
tree | 65df85d8d7df47cafeb3b142d54d4fa18767cca9 /cparser/pre_parser.mly | |
parent | df2ba9189d479efce7f37c61ed1b15d93767145e (diff) | |
download | compcert-e9ba1d3276b0b2fbc37ecb8bd7e4955fd8ec030b.tar.gz compcert-e9ba1d3276b0b2fbc37ecb8bd7e4955fd8ec030b.zip |
Factorized two productions (and two error productions) in [enum_specifier].
This is analogous to the previous commit.
Diffstat (limited to 'cparser/pre_parser.mly')
-rw-r--r-- | cparser/pre_parser.mly | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/cparser/pre_parser.mly b/cparser/pre_parser.mly index 8cc92581..7567b372 100644 --- a/cparser/pre_parser.mly +++ b/cparser/pre_parser.mly @@ -451,13 +451,10 @@ struct_declarator: {} enum_specifier: -| ENUM attribute_specifier_list LBRACE enumerator_list COMMA? RBRACE -| ENUM attribute_specifier_list other_identifier LBRACE enumerator_list COMMA? RBRACE +| ENUM attribute_specifier_list other_identifier? LBRACE enumerator_list COMMA? RBRACE | ENUM attribute_specifier_list other_identifier {} -| ENUM attribute_specifier_list LBRACE enumerator_list COMMA? error - { unclosed "{" "}" $startpos($3) $endpos } -| ENUM attribute_specifier_list general_identifier LBRACE enumerator_list COMMA? error +| ENUM attribute_specifier_list other_identifier? LBRACE enumerator_list COMMA? error { unclosed "{" "}" $startpos($4) $endpos } enumerator_list: |