-ModifiedType
- : QualifiedType { $$ = $1; }
- | QualifiedType "*" { $$ = CYNew CYTypePointerTo($1); }
- | QualifiedType "const" { $$ = CYNew CYTypeConstant($1); }
+IntegerType
+ : "int" { $$ = CYNew CYTypeVariable("int"); }
+ | "unsigned" IntegerTypeOpt { $$ = CYNew CYTypeUnsigned($2); }
+ | "signed" IntegerTypeOpt { $$ = CYNew CYTypeSigned($2); }
+ | "long" IntegerTypeOpt { $$ = CYNew CYTypeLong($2); }
+ | "short" IntegerTypeOpt { $$ = CYNew CYTypeShort($2); }
+ ;
+
+IntegerTypeOpt
+ : IntegerType { $$ = $1; }
+ | { $$ = CYNew CYTypeVariable("int"); }
+ ;
+
+PrimitiveType
+ : IdentifierType { $$ = CYNew CYTypeVariable($1); }
+ | IntegerType { $$ = $1; }
+ | "void" { $$ = CYNew CYTypeVoid(); }
+ | "char" { $$ = CYNew CYTypeVariable("char"); }
+ | "signed" "char" { $$ = CYNew CYTypeSigned(CYNew CYTypeVariable("char")); }
+ | "unsigned" "char" { $$ = CYNew CYTypeUnsigned(CYNew CYTypeVariable("char")); }