summaryrefslogtreecommitdiff
path: root/cpp/src/slice2freeze/Main.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2002-07-25 23:09:48 +0000
committerMichi Henning <michi@zeroc.com>2002-07-25 23:09:48 +0000
commit997c78b8c2911a3787d9ca9b4b10e587cb8cbb2d (patch)
tree267560499341128d631b40e1caff8e9435b55552 /cpp/src/slice2freeze/Main.cpp
parentAdded generation of Yellow.Query in service configuration. (diff)
downloadice-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/slice2freeze/Main.cpp')
-rw-r--r--cpp/src/slice2freeze/Main.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/cpp/src/slice2freeze/Main.cpp b/cpp/src/slice2freeze/Main.cpp
index 4692dcf2581..047defaa62c 100644
--- a/cpp/src/slice2freeze/Main.cpp
+++ b/cpp/src/slice2freeze/Main.cpp
@@ -43,6 +43,7 @@ usage(const char* n)
" different names. NAME may be a scoped name.\n"
"--output-dir DIR Create files in the directory DIR.\n"
"-d, --debug Print debug messages.\n"
+ "--ice Permit `Ice' prefix (for building Ice source code only)\n"
;
}
@@ -198,6 +199,7 @@ main(int argc, char* argv[])
string dllExport;
string output;
bool debug = false;
+ bool ice = false;
vector<Dict> dicts;
int idx = 1;
@@ -308,6 +310,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)
@@ -392,7 +403,7 @@ main(int argc, char* argv[])
fileC = output + '/' + fileC;
}
- UnitPtr unit = Unit::createUnit(true, false);
+ UnitPtr unit = Unit::createUnit(true, false, ice);
StringList includes;