Thrift: Smalltalk prefix support.

Reviewed By: mcslee

Test Plan: Built the compiler.

Revert Plan: ok

Other Notes:
Contributed by Ben Matasar.
Signed off by Patrick Collison.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665391 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/thrifty.yy b/compiler/cpp/src/thrifty.yy
index 21828ff..e46d0ef 100644
--- a/compiler/cpp/src/thrifty.yy
+++ b/compiler/cpp/src/thrifty.yy
@@ -87,6 +87,7 @@
 %token tok_xsd_attrs
 %token tok_ruby_namespace
 %token tok_smalltalk_category
+%token tok_smalltalk_prefix
 %token tok_cocoa_prefix
 
 /**
@@ -302,6 +303,13 @@
         g_program->set_smalltalk_category($2);
       }
     }
+| tok_smalltalk_prefix tok_identifier
+    {
+      pdebug("Header -> tok_smalltalk_prefix tok_identifier");
+      if (g_parse_mode == PROGRAM) {
+        g_program->set_smalltalk_prefix($2);
+      }
+    }
 | tok_java_package tok_identifier
     {
       pdebug("Header -> tok_java_package tok_identifier");