Adding Cocoa generator to Thrift

Summary: Thanks to Andrew McGeachie for doing this

Reviewed By: dreiss

Test Plan: No merge/build issues. Will solicit McGeachie for additions to test/cocoa in the future


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665254 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/thrifty.yy b/compiler/cpp/src/thrifty.yy
index 8533805..a96bfc4 100644
--- a/compiler/cpp/src/thrifty.yy
+++ b/compiler/cpp/src/thrifty.yy
@@ -84,6 +84,7 @@
 %token tok_xsd_namespace
 %token tok_xsd_attrs
 %token tok_ruby_namespace
+%token tok_cocoa_prefix
 
 /**
  * Base datatype keywords
@@ -298,6 +299,13 @@
         g_program->set_java_package($2);
       }
     }
+| tok_cocoa_prefix tok_identifier
+    {
+      pdebug("Header -> tok_cocoa_prefix tok_identifier");
+      if (g_parse_mode == PROGRAM) {
+        g_program->set_cocoa_prefix($2);
+      }
+    }
 | tok_xsd_namespace tok_literal
     {
       pdebug("Header -> tok_xsd_namespace tok_literal");