diff options
author | Michi Henning <michi@zeroc.com> | 2002-07-25 23:09:48 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2002-07-25 23:09:48 +0000 |
commit | 997c78b8c2911a3787d9ca9b4b10e587cb8cbb2d (patch) | |
tree | 267560499341128d631b40e1caff8e9435b55552 /cpp/src/slice2xsd/Main.cpp | |
parent | Added generation of Yellow.Query in service configuration. (diff) | |
download | ice-997c78b8c2911a3787d9ca9b4b10e587cb8cbb2d.tar.bz2 ice-997c78b8c2911a3787d9ca9b4b10e587cb8cbb2d.tar.xz ice-997c78b8c2911a3787d9ca9b4b10e587cb8cbb2d.zip |
Changed Slice parser to disallow leading underscore for identifiers.
Changed Slice parser to reject identifiers beginning with "Ice", unless
the --ice option is used. Changed Slice parser to disallow identifiers
that have a trailing "Operations", "Holder", "Helper", "Prx", or "Ptr",
to avoid clashes with language mappings. Fixed tests and remaining code
base to work correctly with the changed rules.
Diffstat (limited to 'cpp/src/slice2xsd/Main.cpp')
-rw-r--r-- | cpp/src/slice2xsd/Main.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/cpp/src/slice2xsd/Main.cpp b/cpp/src/slice2xsd/Main.cpp index f3c485ad95c..82395018af4 100644 --- a/cpp/src/slice2xsd/Main.cpp +++ b/cpp/src/slice2xsd/Main.cpp @@ -26,8 +26,8 @@ usage(const char* n) "-DNAME=DEF Define NAME as DEF.\n" "-UNAME Remove any definition for NAME.\n" "-IDIR Put DIR in the include file search path.\n" - "--ice TBD.\n" "-d, --debug Print debug messages.\n" + "--ice Permit `Ice' prefix (for building Ice source code only)\n" ; } @@ -36,6 +36,7 @@ main(int argc, char* argv[]) { string cpp("cpp -C"); bool debug = false; + bool ice = false; string include; string output; vector<string> includePaths; @@ -90,6 +91,15 @@ main(int argc, char* argv[]) } --argc; } + else if(strcmp(argv[idx], "--ice") == 0) + { + ice = true; + for(int i = idx ; i + 1 < argc ; ++i) + { + argv[i] = argv[i + 1]; + } + --argc; + } else if(strcmp(argv[idx], "--include-dir") == 0) { if(idx + 1 >= argc) @@ -122,15 +132,6 @@ main(int argc, char* argv[]) } argc -= 2; } - else if(strcmp(argv[idx], "--ice") == 0) - { - // TBD - for(int i = idx ; i + 1 < argc ; ++i) - { - argv[i] = argv[i + 1]; - } - --argc; - } else if(argv[idx][0] == '-') { cerr << argv[0] << ": unknown option `" << argv[idx] << "'" << endl; @@ -191,7 +192,7 @@ main(int argc, char* argv[]) return EXIT_FAILURE; } - UnitPtr unit = Unit::createUnit(false, false); + UnitPtr unit = Unit::createUnit(false, false, ice); int parseStatus = unit->parse(cppHandle, debug); #ifdef _WIN32 |