Commit 181c762d authored by POTTIER Francois's avatar POTTIER Francois

Parameterize [specifier_qualifier_list] with a phantom context.

parent fca164a9
......@@ -339,10 +339,15 @@ struct_declaration_list:
{}
struct_declaration:
| specifier_qualifier_list struct_declarator_list? SEMICOLON
| specifier_qualifier_list(struct_declaration) struct_declarator_list? SEMICOLON
{}
specifier_qualifier_list:
(* The [context] parameter is unused. It does not influence the language
that is accepted. It records the identity of the caller (here, either
[struct_declaration] or [type_name]). This forces a distinction between
certain states in the automaton, and allows us to give more precise
syntax error messages. -fpottier *)
specifier_qualifier_list(context):
| type_qualifier_list? i = TYPEDEF_NAME type_qualifier_list?
{ set_id_type i TypedefId }
| type_qualifier_list? type_specifier_no_typedef_name specifier_qualifier_list_no_typedef_name?
......@@ -474,7 +479,7 @@ parameter_declaration:
{ None }
type_name:
| specifier_qualifier_list abstract_declarator?
| specifier_qualifier_list(type_name) abstract_declarator?
{}
abstract_declarator:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment