summaryrefslogtreecommitdiff
path: root/cpp/include/Slice/Parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/include/Slice/Parser.h')
-rw-r--r--cpp/include/Slice/Parser.h35
1 files changed, 5 insertions, 30 deletions
diff --git a/cpp/include/Slice/Parser.h b/cpp/include/Slice/Parser.h
index 519ef691921..17a357fee3c 100644
--- a/cpp/include/Slice/Parser.h
+++ b/cpp/include/Slice/Parser.h
@@ -109,36 +109,6 @@ typedef ::IceUtil::Handle<Enumerator> EnumeratorPtr;
typedef ::IceUtil::Handle<Const> ConstPtr;
typedef ::IceUtil::Handle<Unit> UnitPtr;
-}
-
-//
-// Stuff for flex and bison
-//
-
-#define YYSTYPE Slice::GrammarBasePtr
-#define YY_DECL int yylex(YYSTYPE* yylvalp)
-YY_DECL;
-int yyparse();
-
-//
-// I must set the initial stack depth to the maximum stack depth to
-// disable bison stack resizing. The bison stack resizing routines use
-// simple malloc/alloc/memcpy calls, which do not work for the
-// YYSTYPE, since YYSTYPE is a C++ type, with constructor, destructor,
-// assignment operator, etc.
-//
-#define YYMAXDEPTH 20000 // 20000 should suffice. Bison default is 10000 as maximum.
-#define YYINITDEPTH YYMAXDEPTH // Initial depth is set to max depth, for the reasons described above.
-
-//
-// Newer bison versions allow to disable stack resizing by defining
-// yyoverflow.
-//
-#define yyoverflow(a, b, c, d, e, f) yyerror(a)
-
-namespace Slice
-{
-
typedef std::list<TypePtr> TypeList;
typedef std::list<ExceptionPtr> ExceptionList;
typedef std::set<std::string> StringSet;
@@ -708,6 +678,7 @@ class SLICE_API Enum : virtual public Constructed
{
public:
+ virtual void destroy();
EnumeratorList getEnumerators();
void setEnumerators(const EnumeratorList&);
virtual ContainedType containedType() const;
@@ -733,6 +704,7 @@ class SLICE_API Enumerator : virtual public Contained
{
public:
+ EnumPtr type() const;
virtual bool uses(const ContainedPtr&) const;
virtual ContainedType containedType() const;
virtual std::string kindOf() const;
@@ -741,6 +713,9 @@ protected:
Enumerator(const ContainerPtr&, const std::string&);
friend class SLICE_API Container;
+ friend class SLICE_API Enum;
+
+ EnumPtr _type;
};
// ----------------------------------------------------------------------