+/* Cycript (Objective-C): Type Encoding {{{ */
+TypeParenthetical
+ : "(" PrefixedType ")" { $$ = $2; }
+ ;
+
+TypeSignifier
+ : Identifier { $$ = CYNew CYTypedIdentifier($1); }
+ | TypeParenthetical
+ ;
+
+ArrayedType
+ : ArrayedType "[" NumericLiteral "]" { $$ = $1; CYSetLast($$->type_) = CYNew CYTypeArrayOf($3); }
+ | TypeSignifier { $$ = $1; }
+ | { $$ = CYNew CYTypedIdentifier(NULL); }
+ ;
+
+SuffixedType
+ : ArrayedType { $$ = $1; }
+ | TypeParenthetical "(" LexPushInOff TypedParameterListOpt ")" LexPopIn { $$ = $1; CYSetLast($$->type_) = CYNew CYTypeFunctionWith($4); }
+ ;
+
+PrefixedType
+ : "*" TypeQualifierRight PrefixedType { $$ = $3; CYSetLast($$->type_) = $2; CYSetLast($$->type_) = CYNew CYTypePointerTo(); }
+ | SuffixedType { $$ = $1; }
+ ;
+
+TypeQualifierLeft
+ : "const" TypeQualifierLeft { $$ = CYNew CYTypeConstant(); CYSetLast($$) = $2; }
+ | { $$ = NULL; }
+ ;
+
+TypeQualifierRight
+ : TypeQualifierRight "const" { $$ = CYNew CYTypeConstant($1); }
+ | { $$ = NULL; }
+ ;
+
+ConcreteType
+ : TypeQualifierLeft PrimitiveType TypeQualifierRight { $$ = $3; CYSetLast($$) = $1; CYSetLast($$) = CYNew CYTypeVariable($2); }
+ ;
+
+PrimitiveType
+ : Variable { $$ = $1; }
+ | "void" { $$ = CYNew cy::Syntax::New(CYNew CYVariable(CYNew CYIdentifier("Type")), CYNew CYArgument(CYNew CYString("v"))); }
+ ;
+
+TypedIdentifier
+ : ConcreteType PrefixedType { $$ = $2; CYSetLast($$->type_) = $1; }
+ ;
+
+EncodedType
+ : TypedIdentifier { $$ = CYNew CYEncodedType($1->type_); }
+ ;
+
+ModifiedType_
+ : TypeQualifierLeft PrimitiveType { $$ = $1; CYSetLast($$) = CYNew CYTypeVariable($2); }
+ | ModifiedType "*" { $$ = CYNew CYTypePointerTo($1); }
+ ;
+
+ModifiedType
+ : ModifiedType_ TypeQualifierRight { $$ = $2; CYSetLast($$) = $1; }
+ ;
+
+PrimaryExpression
+ : AtEncode "(" EncodedType ")" { $$ = $3; }
+ ;
+/* }}} */