Update thrift compiler for new syntax, generate new form of C++ code

Reviewed By: wayne, he loves less warnings


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664840 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/main.h b/compiler/cpp/src/main.h
index 1281cc9..9a3a81e 100644
--- a/compiler/cpp/src/main.h
+++ b/compiler/cpp/src/main.h
@@ -1,22 +1,50 @@
 #ifndef T_MAIN_H
 #define T_MAIN_H
 
+#include <string>
+
 /**
  * Defined in the flex library
  */
 
-extern int yylex(void);
-extern int yyparse(void);
+int yylex(void);
+
+int yyparse(void);
 
 /**
  * Expected to be defined by Flex/Bison
  */
-extern void yyerror(char* fmt, ...);
+void yyerror(char* fmt, ...);
 
 /**
- * Parse debugging output, used to print warnings etc.
+ * Parse debugging output, used to print helpful info
  */
-extern void pdebug(char* fmt, ...);
+void pdebug(char* fmt, ...);
+
+/**
+ * Parser warning
+ */
+void pwarning(int level, char* fmt, ...);
+
+/**
+ * Failure!
+ */
+void failure(char* fmt, ...);
+
+/**
+ * Converts a string filename into a thrift program name
+ */
+std::string program_name(std::string filename);
+
+/**
+ * Gets the directory path of a filename
+ */
+std::string directory_name(std::string filename);
+
+/**
+ * Get the absolute path for an include file
+ */
+std::string include_file(std::string filename);
 
 /**
  * Flex utilities