THRIFT-2849: spelling errors fixed using codespell tool

Client: All
Patch: Anatol Pomozov

This closes #281
diff --git a/compiler/cpp/src/generate/t_csharp_generator.cc b/compiler/cpp/src/generate/t_csharp_generator.cc
index a0cddbf..4762873 100644
--- a/compiler/cpp/src/generate/t_csharp_generator.cc
+++ b/compiler/cpp/src/generate/t_csharp_generator.cc
@@ -691,7 +691,7 @@
   if ((serialize_ || wcf_) && !is_exception) {
     indent(out) << "[DataContract(Namespace=\"" << wcf_namespace_ << "\")]"
                 << endl; // do not make exception classes directly WCF serializable, we provide a
-                         // seperate "fault" for that
+                         // separate "fault" for that
   }
   bool is_final = (tstruct->annotations_.find("final") != tstruct->annotations_.end());
 
diff --git a/compiler/cpp/src/generate/t_html_generator.cc b/compiler/cpp/src/generate/t_html_generator.cc
index f5185ea..8e54ac1 100644
--- a/compiler/cpp/src/generate/t_html_generator.cc
+++ b/compiler/cpp/src/generate/t_html_generator.cc
@@ -716,7 +716,7 @@
  */
 void t_html_generator::print_const_value(t_type* type, t_const_value* tvalue) {
 
-  // if tvalue is an indentifier, the constant content is already shown elsewhere
+  // if tvalue is an identifier, the constant content is already shown elsewhere
   if (tvalue->get_type() == t_const_value::CV_IDENTIFIER) {
     string fname = program_->get_name() + ".html";
     string name = escape_html(tvalue->get_identifier());
diff --git a/compiler/cpp/src/generate/t_php_generator.cc b/compiler/cpp/src/generate/t_php_generator.cc
index 827af9f..b45773c 100644
--- a/compiler/cpp/src/generate/t_php_generator.cc
+++ b/compiler/cpp/src/generate/t_php_generator.cc
@@ -228,7 +228,7 @@
     return (nsglobal_.size() ? NSGLOBAL_B : NSGLOBAL) + ns;
   }
 
-  // add a directory to allready existing namespace
+  // add a directory to already existing namespace
   string php_namespace_directory(string directory, bool end = true) {
     (void)directory;
     if (end) {
diff --git a/compiler/cpp/src/globals.h b/compiler/cpp/src/globals.h
index 93d11aa..af90616 100644
--- a/compiler/cpp/src/globals.h
+++ b/compiler/cpp/src/globals.h
@@ -123,7 +123,7 @@
 };
 
 /**
- * The program level doctext. Stored seperately to make parsing easier.
+ * The program level doctext. Stored separately to make parsing easier.
  */
 extern char* g_program_doctext_candidate;
 extern int g_program_doctext_lineno;
diff --git a/compiler/cpp/src/main.cc b/compiler/cpp/src/main.cc
index 57cd460..c0166a1 100644
--- a/compiler/cpp/src/main.cc
+++ b/compiler/cpp/src/main.cc
@@ -992,7 +992,7 @@
   if (gen_recurse) {
     const vector<t_program*>& includes = program->get_includes();
     for (size_t i = 0; i < includes.size(); ++i) {
-      // Propogate output path from parent to child programs
+      // Propagate output path from parent to child programs
       includes[i]->set_out_path(program->get_out_path(), program->is_out_path_absolute());
 
       generate(includes[i], generator_strings);
diff --git a/compiler/cpp/src/parse/t_program.h b/compiler/cpp/src/parse/t_program.h
index 51157aa..386f589 100644
--- a/compiler/cpp/src/parse/t_program.h
+++ b/compiler/cpp/src/parse/t_program.h
@@ -135,11 +135,11 @@
    * @return     true if a certain collision was found, otherwise false
    */
   bool is_unique_typename(t_type* t) {
-    int occurances = program_typename_count(this, t);
+    int occurrences = program_typename_count(this, t);
     for (std::vector<t_program*>::iterator it = includes_.begin(); it != includes_.end(); ++it) {
-      occurances += program_typename_count(*it, t);
+      occurrences += program_typename_count(*it, t);
     }
-    return 0 == occurances;
+    return 0 == occurrences;
   }
 
   /**
@@ -149,12 +149,12 @@
    * @return     the number of certain typename collisions
    */
   int program_typename_count(t_program* prog, t_type* t) {
-    int occurances = 0;
-    occurances += collection_typename_count(prog, prog->typedefs_, t);
-    occurances += collection_typename_count(prog, prog->enums_, t);
-    occurances += collection_typename_count(prog, prog->objects_, t);
-    occurances += collection_typename_count(prog, prog->services_, t);
-    return occurances;
+    int occurrences = 0;
+    occurrences += collection_typename_count(prog, prog->typedefs_, t);
+    occurrences += collection_typename_count(prog, prog->enums_, t);
+    occurrences += collection_typename_count(prog, prog->objects_, t);
+    occurrences += collection_typename_count(prog, prog->services_, t);
+    return occurrences;
   }
 
   /**
@@ -166,11 +166,11 @@
    */
   template <class T>
   int collection_typename_count(t_program* prog, T type_collection, t_type* t) {
-    int occurances = 0;
+    int occurrences = 0;
     for (typename T::iterator it = type_collection.begin(); it != type_collection.end(); ++it)
       if (t != *it && 0 == t->get_name().compare((*it)->get_name()) && is_common_namespace(prog, t))
-        ++occurances;
-    return occurances;
+        ++occurrences;
+    return occurrences;
   }
 
   /**