summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/GrammarUtil.h
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2002-07-05 00:22:17 +0000
committerMichi Henning <michi@zeroc.com>2002-07-05 00:22:17 +0000
commit451058a0f311fea3784812ad8b5759170de35afd (patch)
treeeb1367904c39bea9e5b18290255e6491581da196 /cpp/src/Slice/GrammarUtil.h
parentFixes from Marc review. (diff)
downloadice-451058a0f311fea3784812ad8b5759170de35afd.tar.bz2
ice-451058a0f311fea3784812ad8b5759170de35afd.tar.xz
ice-451058a0f311fea3784812ad8b5759170de35afd.zip
Constant definitions for Slice are complete now. (Code generation for C++
only.) I couldn't avoid adding a few #ifdefs because of the different 64-bit integer APIs across Linux and Windows. (#including config.h wasn't an option because that would have created a circular dependency between Ice and Slice.) Added sufficient test cases to convince myself that things actually work as intended. Will compile under Windows now, so bear with me if things are broken under Windows for a few minutes... Some things that aren't quite right yet: - No support for universal character names (\uxxxx) - gcc appears to have a preprocessor bug. For example, preprocessing a file containing a single '@' character just echos that '@' character to the output. According to the C++ spec, '@' should be translated to its universal character name (because it isn't part of the basic C++ source character set). - Why is the Slice string type mapped to std::string? Given that we are supposed to support unicode for everything, shouldn't that be mapped to std::wstring? Once Windows compiles OK, I'll start on the Java code generation.
Diffstat (limited to 'cpp/src/Slice/GrammarUtil.h')
-rw-r--r--cpp/src/Slice/GrammarUtil.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/cpp/src/Slice/GrammarUtil.h b/cpp/src/Slice/GrammarUtil.h
index bc349184dc0..a3fc29b74d2 100644
--- a/cpp/src/Slice/GrammarUtil.h
+++ b/cpp/src/Slice/GrammarUtil.h
@@ -27,6 +27,7 @@ class FloatingTok;
class ExceptionListTok;
class ClassListTok;
class EnumeratorListTok;
+class SyntaxTreeBaseStringTok;
typedef ::IceUtil::Handle<StringTok> StringTokPtr;
typedef ::IceUtil::Handle<StringListTok> StringListTokPtr;
@@ -38,6 +39,7 @@ typedef ::IceUtil::Handle<FloatingTok> FloatingTokPtr;
typedef ::IceUtil::Handle<ExceptionListTok> ExceptionListTokPtr;
typedef ::IceUtil::Handle<ClassListTok> ClassListTokPtr;
typedef ::IceUtil::Handle<EnumeratorListTok> EnumeratorListTokPtr;
+typedef ::IceUtil::Handle<SyntaxTreeBaseStringTok> SyntaxTreeBaseStringTokPtr;
// ----------------------------------------------------------------------
// StringTok
@@ -96,7 +98,7 @@ class SLICE_API IntegerTok : public GrammarBase
public:
IntegerTok() { }
- long v;
+ Long v;
};
// ----------------------------------------------------------------------
@@ -108,7 +110,7 @@ class SLICE_API FloatingTok : public GrammarBase
public:
FloatingTok() { }
- double v;
+ Double v;
};
// ----------------------------------------------------------------------
@@ -159,6 +161,18 @@ public:
EnumeratorList v;
};
+// ----------------------------------------------------------------------
+// SyntaxTreeBaseStringTok
+// ----------------------------------------------------------------------
+
+class SLICE_API SyntaxTreeBaseStringTok : public GrammarBase
+{
+public:
+
+ SyntaxTreeBaseStringTok() { }
+ SyntaxTreeBaseString v;
+};
+
}
#endif