Skip to content

Commit

Permalink
Thrift-1366: Delphi generator, lirbrary and unit test.
Browse files Browse the repository at this point in the history
Client: delphi
Patch: Kenjiro Fukumitsu

Adding delphi XE generator, lib and unit tests.



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1185688 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
jfarrell committed Oct 18, 2011
1 parent 857a8b8 commit 7ae13e1
Show file tree
Hide file tree
Showing 20 changed files with 7,904 additions and 1 deletion.
1 change: 1 addition & 0 deletions compiler/cpp/Makefile.am
Expand Up @@ -80,6 +80,7 @@ thrift_SOURCES += src/generate/t_c_glib_generator.cc \
src/generate/t_html_generator.cc \
src/generate/t_js_generator.cc \
src/generate/t_javame_generator.cc \
src/generate/t_delphi_generator.cc \
src/generate/t_go_generator.cc

thrift_CPPFLAGS = -I$(srcdir)/src
Expand Down
2,688 changes: 2,688 additions & 0 deletions compiler/cpp/src/generate/t_delphi_generator.cc

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions compiler/cpp/src/main.cc
Expand Up @@ -184,6 +184,7 @@ bool gen_ocaml = false;
bool gen_hs = false;
bool gen_cocoa = false;
bool gen_csharp = false;
bool gen_delphi = false;
bool gen_st = false;
bool gen_recurse = false;

Expand Down Expand Up @@ -1045,6 +1046,8 @@ int main(int argc, char** argv) {
gen_st = true;
} else if (strcmp(arg, "-csharp") == 0) {
gen_csharp = true;
} else if (strcmp(arg, "-delphi") == 0) {
gen_delphi = true;
} else if (strcmp(arg, "-cpp_use_include_prefix") == 0) {
g_cpp_use_include_prefix = true;
} else if (strcmp(arg, "-I") == 0) {
Expand Down Expand Up @@ -1124,6 +1127,10 @@ int main(int argc, char** argv) {
pwarning(1, "-csharp is deprecated. Use --gen csharp");
generator_strings.push_back("csharp");
}
if (gen_delphi) {
pwarning(1, "-delphi is deprecated. Use --gen delphi");
generator_strings.push_back("delphi");
}
if (gen_py) {
pwarning(1, "-py is deprecated. Use --gen py");
generator_strings.push_back("py");
Expand Down
1 change: 1 addition & 0 deletions compiler/cpp/src/thriftl.ll
Expand Up @@ -120,6 +120,7 @@ literal_begin (['\"])
"java_package" { return tok_java_package; }
"cocoa_prefix" { return tok_cocoa_prefix; }
"csharp_namespace" { return tok_csharp_namespace; }
"delphi_namespace" { return tok_delphi_namespace; }
"php_namespace" { return tok_php_namespace; }
"py_module" { return tok_py_module; }
"perl_package" { return tok_perl_package; }
Expand Down
10 changes: 10 additions & 0 deletions compiler/cpp/src/thrifty.yy
Expand Up @@ -110,6 +110,7 @@ const int struct_is_union = 1;
%token tok_smalltalk_prefix
%token tok_cocoa_prefix
%token tok_csharp_namespace
%token tok_delphi_namespace

/**
* Base datatype keywords
Expand Down Expand Up @@ -393,6 +394,15 @@ Header:
g_program->set_namespace("csharp", $2);
}
}
/* TODO(dreiss): Get rid of this once everyone is using the new hotness. */
| tok_delphi_namespace tok_identifier
{
pwarning(1, "'delphi_namespace' is deprecated. Use 'namespace delphi' instead");
pdebug("Header -> tok_delphi_namespace tok_identifier");
if (g_parse_mode == PROGRAM) {
g_program->set_namespace("delphi", $2);
}
}

Include:
tok_include tok_literal
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Expand Up @@ -528,7 +528,6 @@ fi
if test "$have_ruby" = "yes" ; then
echo
echo "Using Ruby ................... : $RUBY"
echo "Using rspec .................. : $RSPEC"
fi
if test "$have_haskell" = "yes" ; then
echo
Expand Down

0 comments on commit 7ae13e1

Please sign in to comment.