Lots of Ruby code generation improvements

Summary: Submitted by Kevin Clark, Ruby guru from Powerset

Reviewed By: mcslee

Test Plan: He updated the tests in trunk/test/rb/

Notes: The code is now officially "ruby-ish" and idiomatic


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665151 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/thriftl.ll b/compiler/cpp/src/thriftl.ll
index 3100c6a..803f786 100644
--- a/compiler/cpp/src/thriftl.ll
+++ b/compiler/cpp/src/thriftl.ll
@@ -63,42 +63,43 @@
 
 {symbol}      { return yytext[0]; }
 
-"namespace"     { return tok_namespace;     }
-"cpp_namespace" { return tok_cpp_namespace; }
-"cpp_include"   { return tok_cpp_include;   }
-"cpp_type"      { return tok_cpp_type;      }
-"java_package"  { return tok_java_package;  }
-"php_namespace" { return tok_php_namespace; }
-"xsd_all"       { return tok_xsd_all;       }
-"xsd_optional"  { return tok_xsd_optional;  }
-"xsd_nillable"  { return tok_xsd_nillable;  }
-"xsd_namespace" { return tok_xsd_namespace; }
-"xsd_attrs"     { return tok_xsd_attrs;     }
-"include"       { return tok_include;       }
+"namespace"      { return tok_namespace;      }
+"cpp_namespace"  { return tok_cpp_namespace;  }
+"cpp_include"    { return tok_cpp_include;    }
+"cpp_type"       { return tok_cpp_type;       }
+"java_package"   { return tok_java_package;   }
+"php_namespace"  { return tok_php_namespace;  }
+"ruby_namespace" { return tok_ruby_namespace; }
+"xsd_all"        { return tok_xsd_all;        }
+"xsd_optional"   { return tok_xsd_optional;   }
+"xsd_nillable"   { return tok_xsd_nillable;   }
+"xsd_namespace"  { return tok_xsd_namespace;  }
+"xsd_attrs"      { return tok_xsd_attrs;      }
+"include"        { return tok_include;        }
 
-"void"          { return tok_void;          }
-"bool"          { return tok_bool;          }
-"byte"          { return tok_byte;          }
-"i16"           { return tok_i16;           }
-"i32"           { return tok_i32;           }
-"i64"           { return tok_i64;           }
-"double"        { return tok_double;        }
-"string"        { return tok_string;        }
-"binary"        { return tok_binary;        }
-"slist"         { return tok_slist;         }
-"senum"         { return tok_senum;         }
-"map"           { return tok_map;           }
-"list"          { return tok_list;          }
-"set"           { return tok_set;           }
-"async"         { return tok_async;         }
-"typedef"       { return tok_typedef;       }
-"struct"        { return tok_struct;        }
-"exception"     { return tok_xception;      }
-"extends"       { return tok_extends;       }
-"throws"        { return tok_throws;        }
-"service"       { return tok_service;       }
-"enum"          { return tok_enum;          }
-"const"         { return tok_const;         }
+"void"           { return tok_void;           }
+"bool"           { return tok_bool;           }
+"byte"           { return tok_byte;           }
+"i16"            { return tok_i16;            }
+"i32"            { return tok_i32;            }
+"i64"            { return tok_i64;            }
+"double"         { return tok_double;         }
+"string"         { return tok_string;         }
+"binary"         { return tok_binary;         }
+"slist"          { return tok_slist;          }
+"senum"          { return tok_senum;          }
+"map"            { return tok_map;            }
+"list"           { return tok_list;           }
+"set"            { return tok_set;            }
+"async"          { return tok_async;          }
+"typedef"        { return tok_typedef;        }
+"struct"         { return tok_struct;         }
+"exception"      { return tok_xception;       }
+"extends"        { return tok_extends;        }
+"throws"         { return tok_throws;         }
+"service"        { return tok_service;        }
+"enum"           { return tok_enum;           }
+"const"          { return tok_const;          }
 
 "abstract" { thrift_reserved_keyword(yytext); }
 "and" { thrift_reserved_keyword(yytext); }