| "float" { $$ = CYNew CYTypeFloating(0); }
| "double" { $$ = CYNew CYTypeFloating(1); }
| "long" "double" { $$ = CYNew CYTypeFloating(2); }
+ | "void" { $$ = CYNew CYTypeVoid(); }
;
PrimitiveReference
;
TypedIdentifierMaybe
- : TypeQualifierLeft[modifier] "void" TypeQualifierRight[typed] { $$ = $typed; $$->specifier_ = CYNew CYTypeVoid(); CYSetLast($modifier) = $$->modifier_; $$->modifier_ = $modifier; }
- | "void" TypeQualifierRight[typed] { $$ = $typed; $$->specifier_ = CYNew CYTypeVoid(); }
- | TypeQualifierLeftOpt[modifier] PrimitiveReference[specifier] TypeQualifierRightOpt[typed] { $$ = $typed; $$->specifier_ = $specifier; CYSetLast($modifier) = $$->modifier_; $$->modifier_ = $modifier; }
+ : TypeQualifierLeftOpt[modifier] PrimitiveReference[specifier] TypeQualifierRightOpt[typed] { $$ = $typed; $$->specifier_ = $specifier; CYSetLast($modifier) = $$->modifier_; $$->modifier_ = $modifier; }
;
TypedIdentifierYes
TypedIdentifierEncoding
: TypedIdentifierNo[pass] { $$ = $pass; }
| TypedIdentifierTagged[typed] { if ($typed->name_ != NULL) CYERR($typed->location_, "unexpected identifier"); $$ = $typed; }
- | "void" TypeSignifierNone[typed] { $$ = $typed; $$->specifier_ = CYNew CYTypeVoid(); }
;
TypedIdentifierDefinition
: TypedIdentifierYes[pass] { $$ = $pass; }
| TypeQualifierLeftOpt[modifier] "struct" IdentifierTypeOpt[name] "{" StructFieldListOpt[fields] "}" TypeQualifierRightOpt[typed] { if ($typed->name_ == NULL) CYERR($typed->location_, "expected identifier"); $$ = $typed; $$->specifier_ = CYNew CYTypeStruct($name, CYNew CYStructTail($fields)); CYSetLast($modifier) = $$->modifier_; $$->modifier_ = $modifier; }
- | "void" TypeSignifier[typed] { $$ = $typed; $$->specifier_ = CYNew CYTypeVoid(); }
;
PrimaryExpression
TypedParameterListOpt
: TypedParameterList[pass] { $$ = $pass; }
- | "void" { $$ = CYNew CYTypedFormal(false); }
| { $$ = CYNew CYTypedFormal(false); }
;