THRIFT-667 Period should not be allowed in identifier names

Patch: Jens Geyer
diff --git a/compiler/cpp/src/main.cc b/compiler/cpp/src/main.cc
index da45ae7..f751419 100755
--- a/compiler/cpp/src/main.cc
+++ b/compiler/cpp/src/main.cc
@@ -806,6 +806,18 @@
 }
 
 /**
+ * Check simple identifier names
+ * It's easier to do it this way instead of rewriting the whole grammar etc.
+ */
+void validate_simple_identifier(const char* identifier) {
+  string name( identifier);
+  if( name.find(".") != string::npos) {
+    yyerror("Identifier %s can't have a dot.", identifier);
+    exit(1);
+  }
+}
+
+/**
  * Check the type of the parsed const information against its declared type
  */
 void validate_const_type(t_const* c) {