Thrift compiler support for inline PHP client code

Summary: Option to generate inline PHP code, as well as support for the async modifier keyword and the abstraction of function calls into a send and recv component




git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664740 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/src/thrift.y b/compiler/src/thrift.y
index 269d163..d0882ff 100644
--- a/compiler/src/thrift.y
+++ b/compiler/src/thrift.y
@@ -20,6 +20,7 @@
 %union {
   char*       id;
   int         iconst;
+  bool        tbool;
   t_type*     ttype;
   t_typedef*  ttypedef;
   t_enum*     tenum;
@@ -82,10 +83,11 @@
 %type<tservice>  Service
 
 %type<tfunction> Function
-%type<id>        FunctionModifiers
 %type<ttype>     FunctionType
 %type<tservice>  FunctionList
 
+%type<tbool>     AsyncOptional
+
 %%
 
 /** Thrift Grammar */
@@ -210,17 +212,21 @@
     }
 
 Function:
-  FunctionType FunctionModifiers tok_identifier '(' FieldList ')'
+  FunctionType AsyncOptional tok_identifier '(' FieldList ')'
     {
       $5->set_name(std::string($3) + "_args");
-      $$ = new t_function($1, $3, $5);
+      $$ = new t_function($1, $3, $5, $2);
       y_field_val = 0;
     }
 
-FunctionModifiers:
+AsyncOptional:
+  tok_async
     {
-      /** TODO(mcslee): implement async modifier, etc. */
-      $$ = 0;
+      $$ = true;
+    }
+|
+    {
+      $$ = false;
     }
 
 FieldList: