summaryrefslogtreecommitdiff
path: root/cpp/src/Transform/Parser.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2004-01-19 16:59:41 +0000
committerMark Spruiell <mes@zeroc.com>2004-01-19 16:59:41 +0000
commit88d55d270b358200a787b6bf519d3d5357fe4a43 (patch)
tree37f187ff90063250adc178d2900212dd030e6c29 /cpp/src/Transform/Parser.cpp
parentfixed IceStorm test to not rely on sleep() (diff)
downloadice-88d55d270b358200a787b6bf519d3d5357fe4a43.tar.bz2
ice-88d55d270b358200a787b6bf519d3d5357fe4a43.tar.xz
ice-88d55d270b358200a787b6bf519d3d5357fe4a43.zip
removing old Transform code, tests
Diffstat (limited to 'cpp/src/Transform/Parser.cpp')
-rw-r--r--cpp/src/Transform/Parser.cpp75
1 files changed, 0 insertions, 75 deletions
diff --git a/cpp/src/Transform/Parser.cpp b/cpp/src/Transform/Parser.cpp
deleted file mode 100644
index e7a551339cb..00000000000
--- a/cpp/src/Transform/Parser.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003
-// ZeroC, Inc.
-// Billerica, MA, USA
-//
-// All Rights Reserved.
-//
-// Ice is free software; you can redistribute it and/or modify it under
-// the terms of the GNU General Public License version 2 as published by
-// the Free Software Foundation.
-//
-// **********************************************************************
-
-#include <Transform/Parser.h>
-#include <Transform/GrammarUtil.h>
-#include <IceUtil/Mutex.h>
-
-using namespace std;
-
-Transform::DataFactoryPtr Transform::parseDataFactory;
-Transform::ErrorReporterPtr Transform::parseErrorReporter;
-Transform::NodePtr Transform::parseResult;
-int Transform::parseLine;
-
-static string _input;
-static string::size_type _pos;
-static IceUtil::Mutex _parserMutex;
-
-//
-// Parser
-//
-Transform::NodePtr
-Transform::Parser::parse(const string& expr, const DataFactoryPtr& factory, const ErrorReporterPtr& errorReporter)
-{
- //
- // The bison grammar is not thread-safe.
- //
- IceUtil::Mutex::Lock sync(_parserMutex);
-
- parseDataFactory = factory;
- parseErrorReporter = errorReporter;
- parseLine = 1;
-
- parseErrorReporter->setExpression(expr);
-
- _input = expr;
- _pos = 0;
-
- int status = transform_parse();
- if(status != 0)
- {
- parseResult = 0;
- }
-
- parseErrorReporter->clearExpression();
- parseErrorReporter = 0;
-
- return parseResult;
-}
-
-int
-Transform::getInput(char* buf, int maxSize)
-{
- if(_pos < _input.length())
- {
- buf[0] = _input[_pos];
- _pos++;
- return 1;
- }
- else
- {
- return 0;
- }
-}