%token ___proto___ "__proto__"
%token _prototype_ "prototype"
%token _public_ "public"
-%token ___restrict_ "__restrict"
-%token _restrict_ "restrict"
%token _set_ "set"
%token _short_ "short"
%token _static_ "static"
| "int" { $$ = CYNew CYIdentifier("int"); }
| "__int128" { $$ = CYNew CYIdentifier("__int128"); }
| "long" { $$ = CYNew CYIdentifier("long"); }
- | "__restrict" { $$ = CYNew CYIdentifier("__restrict"); }
- | "restrict" { $$ = CYNew CYIdentifier("restrict"); }
| "short" { $$ = CYNew CYIdentifier("short"); }
| "static" { $$ = CYNew CYIdentifier("static"); }
| "volatile" { $$ = CYNew CYIdentifier("volatile"); }
| TypeSignifierNone[pass] { $$ = $pass; }
;
-Restrict
- : "__restrict"
- | "restrict"
- ;
-
-RestrictOpt
- : Restrict
- |
- ;
-
-ParameterModifier
- : "throw" "(" ")"
- ;
-
-ParameterModifierOpt
- : ParameterModifier
- |
- ;
-
ParameterTail
- : TypedParameterListOpt[formal] ")" ParameterModifierOpt { $$ = CYNew CYTypeFunctionWith($formal->variadic_, $formal->parameters_); }
+ : TypedParameterListOpt[formal] ")" { $$ = CYNew CYTypeFunctionWith($formal->variadic_, $formal->parameters_); }
;
SuffixedType
- : SuffixedTypeOpt[typed] "[" RestrictOpt NumericLiteral[size] "]" { $$ = $typed; $$->modifier_ = CYNew CYTypeArrayOf($size, $$->modifier_); }
+ : SuffixedTypeOpt[typed] "[" NumericLiteral[size] "]" { $$ = $typed; $$->modifier_ = CYNew CYTypeArrayOf($size, $$->modifier_); }
| "(" "^" TypeQualifierRightOpt[typed] ")" "(" TypedParameters[parameters] ")" { $$ = $typed; $$->modifier_ = CYNew CYTypeBlockWith($parameters, $$->modifier_); }
| TypeSignifier[typed] "(" ParameterTail[modifier] { $$ = $typed; CYSetLast($modifier) = $$->modifier_; $$->modifier_ = $modifier; }
| "("[parenthesis] ParameterTail[modifier] { $$ = CYNew CYTypedName(@parenthesis); CYSetLast($modifier) = $$->modifier_; $$->modifier_ = $modifier; }
| PrefixedType[pass] { $$ = $pass; }
| "const" TypeQualifierRightOpt[typed] { $$ = $typed; $$->modifier_ = CYNew CYTypeConstant($$->modifier_); }
| "volatile" TypeQualifierRightOpt[typed] { $$ = $typed; $$->modifier_ = CYNew CYTypeVolatile($$->modifier_); }
- | Restrict TypeQualifierRightOpt[typed] { $$ = $typed; }
;
TypeQualifierRightOpt
"__proto__" L /*III*/ F(tk::___proto___, hi::Special);
"prototype" L /*III*/ F(tk::_prototype_, hi::Special);
"public" L /*FSS*/ F(tk::_public_, hi::Meta);
-"__restrict" L /*III*/ F(tk::___restrict_, hi::Meta);
-"restrict" L /*III*/ F(tk::_restrict_, hi::Meta);
"return" L /*KKK*/ F(tk::_return_, hi::Control);
"set" L /*III*/ F(tk::_set_, hi::Meta);
"short" L /*FII*/ F(tk::_short_, hi::Type);