THRIFT-2320 Program level doctext does not get attached by parser

Patch: Craig Peterson & Jens Geyer
diff --git a/compiler/cpp/src/globals.h b/compiler/cpp/src/globals.h
index 2b1865b..957e5d1 100644
--- a/compiler/cpp/src/globals.h
+++ b/compiler/cpp/src/globals.h
@@ -115,6 +115,24 @@
 extern int g_doctext_lineno;
 
 /**
+ * Status of program level doctext candidate
+ */
+enum PROGDOCTEXT_STATUS {
+  INVALID = 0,
+  STILL_CANDIDATE = 1,      // the text may or may not be the program doctext
+  ALREADY_PROCESSED = 2,    // doctext has been used and is no longer available
+  ABSOLUTELY_SURE = 3       // this is the program doctext
+};
+
+
+/**
+ * The program level doctext. Stored seperately to make parsing easier.
+ */
+extern char* g_program_doctext_candidate;
+extern int   g_program_doctext_lineno;
+extern PROGDOCTEXT_STATUS  g_program_doctext_status;
+
+/**
  * Whether or not negative field keys are accepted.
  *
  * When a field does not have a user-specified key, thrift automatically