summaryrefslogtreecommitdiff
path: root/cpp/include/Slice/PythonUtil.h
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2004-09-02 15:47:00 +0000
committerMark Spruiell <mes@zeroc.com>2004-09-02 15:47:00 +0000
commiteb39f9c113fb0d6810d4e4d3d67af6b7f026bec9 (patch)
tree2b030d453c01c94a1398071487ba33504d02afe6 /cpp/include/Slice/PythonUtil.h
parentbug fix (diff)
downloadice-eb39f9c113fb0d6810d4e4d3d67af6b7f026bec9.tar.bz2
ice-eb39f9c113fb0d6810d4e4d3d67af6b7f026bec9.tar.xz
ice-eb39f9c113fb0d6810d4e4d3d67af6b7f026bec9.zip
adding Python translator
Diffstat (limited to 'cpp/include/Slice/PythonUtil.h')
-rw-r--r--cpp/include/Slice/PythonUtil.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/cpp/include/Slice/PythonUtil.h b/cpp/include/Slice/PythonUtil.h
new file mode 100644
index 00000000000..2235611a057
--- /dev/null
+++ b/cpp/include/Slice/PythonUtil.h
@@ -0,0 +1,50 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef SLICE_PYTHON_UTIL_H
+#define SLICE_PYTHON_UTIL_H
+
+#include <Slice/Parser.h>
+#include <IceUtil/OutputUtil.h>
+
+namespace Slice
+{
+namespace Python
+{
+
+//
+// Generate Python code for a translation unit.
+//
+SLICE_API void generate(const Slice::UnitPtr&, IceUtil::Output&);
+
+//
+// Split up a string using whitespace delimiters.
+//
+SLICE_API bool splitString(const std::string&, std::vector<std::string>&);
+
+//
+// Convert a scoped name into a Python name.
+//
+SLICE_API std::string scopedToName(const std::string&);
+
+//
+// Check the given identifier against Python's list of reserved words. If it matches
+// a reserved word, then an escaped version is returned with a leading underscore.
+//
+SLICE_API std::string fixIdent(const std::string&);
+
+//
+// Emit a comment header.
+//
+SLICE_API void printHeader(IceUtil::Output&);
+
+}
+}
+
+#endif