summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/GrammarUtil.h
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2002-06-19 06:38:05 +0000
committerMichi Henning <michi@zeroc.com>2002-06-19 06:38:05 +0000
commitac5baaf4675325375d05f2079f2f0678c6e86fd8 (patch)
treebb2526a6c6593f1125196d6e5ff3a1f9cf7b784d /cpp/src/Slice/GrammarUtil.h
parentfile ActivatorI.cpp was initially added on branch location. (diff)
downloadice-ac5baaf4675325375d05f2079f2f0678c6e86fd8.tar.bz2
ice-ac5baaf4675325375d05f2079f2f0678c6e86fd8.tar.xz
ice-ac5baaf4675325375d05f2079f2f0678c6e86fd8.zip
Changed the grammar for out parameters to deprecate the semicolon syntax
and use an "out" keyword instead. The old syntax still works, but now prints a warning. Fixed up all the test cases that got broken by this and add a new test case for out-of-order in and out parameters. Refactored the grammar somewhat because, initially, out params added something like 50 shift/reduce conflicts. One shift/reduce conflict remains, caused by the addition of ICE_OUT to the last production in Grammar.y. We could avoid the conflict by removing ICE_OUT from that production, but then we wouldn't catch other errors anymore, such as an attempt to use "out" as the name of an operation or interface. I've added a warning to the Makefile to expect 1 shift/reduce conflict when Grammar.y is rebuilt.
Diffstat (limited to 'cpp/src/Slice/GrammarUtil.h')
-rw-r--r--cpp/src/Slice/GrammarUtil.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/cpp/src/Slice/GrammarUtil.h b/cpp/src/Slice/GrammarUtil.h
index 3d64d605fbd..0d510e7e3d3 100644
--- a/cpp/src/Slice/GrammarUtil.h
+++ b/cpp/src/Slice/GrammarUtil.h
@@ -17,6 +17,7 @@ namespace Slice
{
class StringTok;
+class TypeStringTok;
class TypeStringListTok;
class StringListTok;
class BoolTok;
@@ -25,6 +26,7 @@ class ClassListTok;
class EnumeratorListTok;
typedef ::IceUtil::Handle<StringTok> StringTokPtr;
+typedef ::IceUtil::Handle<TypeStringTok> TypeStringTokPtr;
typedef ::IceUtil::Handle<TypeStringListTok> TypeStringListTokPtr;
typedef ::IceUtil::Handle<StringListTok> StringListTokPtr;
typedef ::IceUtil::Handle<BoolTok> BoolTokPtr;
@@ -45,6 +47,18 @@ public:
};
// ----------------------------------------------------------------------
+// TypeStringTok
+// ----------------------------------------------------------------------
+
+class SLICE_API TypeStringTok : public GrammarBase
+{
+public:
+
+ TypeStringTok() { }
+ TypeString v;
+};
+
+// ----------------------------------------------------------------------
// TypeStringListTok
// ----------------------------------------------------------------------