Skip to content
Snippets Groups Projects
Commit f70128f7 authored by benjamin.franksen's avatar benjamin.franksen
Browse files

snc: made parsing of foreign declarations more precise

parent e632939c
No related branches found
No related tags found
No related merge requests found
...@@ -193,11 +193,10 @@ declarator(p) ::= LPAREN declarator(x) RPAREN. [PRE] { p = x; } ...@@ -193,11 +193,10 @@ declarator(p) ::= LPAREN declarator(x) RPAREN. [PRE] { p = x; }
declarator(p) ::= ASTERISK declarator(x). [PRE] { p = decl_prefix_pointer(x); } declarator(p) ::= ASTERISK declarator(x). [PRE] { p = decl_prefix_pointer(x); }
// deprecated // deprecated
declaration(p) ::= FOREIGN declarators(ds) SEMICOLON. { p = decl_add_base_type(ds, mk_no_type()); } declaration(p) ::= FOREIGN variables(ds) SEMICOLON. { p = decl_add_base_type(ds, mk_no_type()); }
declarators(p) ::= declarator(x). { p = x; }
declarators(p) ::= declarators(xs) COMMA declarator(x). { p = link_expr(xs, x); }
variables(p) ::= variable(x). { p = decl_create(x); }
variables(p) ::= variables(xs) COMMA variable(x). { p = link_expr(xs, decl_create(x)); }
// Initializer // Initializer
// Note: comma operator not allowed in 'expr'. // Note: comma operator not allowed in 'expr'.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment