Skip to content

Commit

Permalink
Removed unused OMC parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Apr 6, 2016
1 parent 3c28781 commit b791c33
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 171 deletions.
3 changes: 1 addition & 2 deletions OMEdit/OMEditGUI/Debugger/Parser/Makefile.common
Expand Up @@ -12,9 +12,8 @@ libantlr3.a: $(ANTLR)/src/*.c $(ANTLR)/include/*.h $(ANTLR)/antlr3config.h
ranlib libantlr3.a
rm -f antlr3*.o

parsergen: GDBMIOutput.g ../../OMC/Parser/OMCParser.g
parsergen: GDBMIOutput.g
$(ANTLRCMD) GDBMIOutput.g
(cd ../../OMC/Parser/ && $(ANTLRCMD) OMCParser.g)

OBJS = GDBMIOutputLexer.o \
GDBMIOutputParser.o \
Expand Down
17 changes: 2 additions & 15 deletions OMEdit/OMEditGUI/Debugger/Parser/Makefile.lib.common
@@ -1,5 +1,5 @@
ANTLRCMD=java -cp $(ANTLRJAR) org.antlr.Tool -Xconversiontimeout 10000 -report
PARSERGEN=GDBMIOutputLexer.c GDBMIOutputLexer.h GDBMIOutputParser.c GDBMIOutputParser.h ../../OMC/Parser/OMCOutputLexer.cpp ../../OMC/Parser/OMCOutputLexer.h ../../OMC/Parser/OMCOutputParser.cpp ../../OMC/Parser/OMCOutputParser.h
PARSERGEN=GDBMIOutputLexer.c GDBMIOutputLexer.h GDBMIOutputParser.c GDBMIOutputParser.h

all: $(PARSERGEN) libGDBMIParser.a

Expand All @@ -9,17 +9,6 @@ GDBMIOutputParser.h: GDBMIOutputLexer.c
GDBMIOutputLexer.c: GDBMIOutput.g
$(ANTLRCMD) $<

../../OMC/Parser/OMCOutputLexer.cpp: ../../OMC/Parser/OMCOutputLexer.c
cp $< $@
../../OMC/Parser/OMCOutputParser.cpp: ../../OMC/Parser/OMCOutputParser.c
cp $< $@

../../OMC/Parser/OMCOutputLexer.c: ../../OMC/Parser/OMCOutputLexer.h
../../OMC/Parser/OMCOutputLexer.h: ../../OMC/Parser/OMCOutputParser.h
../../OMC/Parser/OMCOutputParser.h: ../../OMC/Parser/OMCOutputParser.c
../../OMC/Parser/OMCOutputParser.c: ../../OMC/Parser/OMCOutput.g
(cd ../../OMC/Parser/ && $(ANTLRCMD) OMCOutput.g)

OBJS = GDBMIOutputLexer.o \
GDBMIOutputParser.o \
GDBMIParser.o
Expand All @@ -44,6 +33,4 @@ clean:
rm -f *.o *.a \
GDBMIOutput.tokens \
GDBMIOutputLexer.c GDBMIOutputLexer.h \
GDBMIOutputParser.c GDBMIOutputParser.h \
../../OMC/Parser/OMCOutput.tokens \
../../OMC/Parser/OMCOutput*.c* ../../OMC/Parser/OMCOutput*.h ../../OMC/Parser/*.o
GDBMIOutputParser.c GDBMIOutputParser.h
25 changes: 0 additions & 25 deletions OMEdit/OMEditGUI/OMC/OMCProxy.cpp
Expand Up @@ -35,8 +35,6 @@
*
*/

#include <OMC/Parser/OMCOutputLexer.h>
#include <OMC/Parser/OMCOutputParser.h>
#include "meta/meta_modelica.h"
#ifdef WIN32
#include "version.h"
Expand All @@ -62,29 +60,6 @@ void omc_Main_setWindowsPaths(threadData_t *threadData, void* _inOMHome);
#include "simulation_options.h"
#include "omc_error.h"

static QVariant parseExpression(QString result)
{
QVariant res;
pANTLR3_INPUT_STREAM input;
pOMCOutputLexer lex;
pANTLR3_COMMON_TOKEN_STREAM tokens;
pOMCOutputParser parser;
QByteArray ba = result.toUtf8();

input = antlr3NewAsciiStringInPlaceStream((pANTLR3_UINT8)ba.data(), ba.size(), (pANTLR3_UINT8)"");
lex = OMCOutputLexerNew(input);
tokens = antlr3CommonTokenStreamSourceNew(ANTLR3_SIZE_HINT, TOKENSOURCE(lex));
parser = OMCOutputParserNew(tokens);

parser->exp(parser, res);
// Clean up? Check error? For chickens
parser->free(parser);
tokens->free(tokens);
lex->free(lex);
input->close(input);
return res;
}

/*!
\class OMCProxy
\brief It contains the reference of the CORBA object used to communicate with the OpenModelica Compiler.
Expand Down
123 changes: 0 additions & 123 deletions OMEdit/OMEditGUI/OMC/Parser/OMCOutput.g

This file was deleted.

8 changes: 2 additions & 6 deletions OMEdit/OMEditGUI/OMEditGUI.pro
Expand Up @@ -155,9 +155,7 @@ SOURCES += main.cpp \
Debugger/Attach/AttachToProcessDialog.cpp \
Debugger/Attach/ProcessListModel.cpp \
CrashReport/backtrace.c \
CrashReport/CrashReportDialog.cpp \
OMC/Parser/OMCOutputParser.cpp \
OMC/Parser/OMCOutputLexer.cpp
CrashReport/CrashReportDialog.cpp

HEADERS += Util/Helper.h \
Util/Utilities.h \
Expand Down Expand Up @@ -222,9 +220,7 @@ HEADERS += Util/Helper.h \
Debugger/Attach/AttachToProcessDialog.h \
Debugger/Attach/ProcessListModel.h \
CrashReport/backtrace.h \
CrashReport/CrashReportDialog.h \
OMC/Parser/OMCOutputParser.h \
OMC/Parser/OMCOutputLexer.h
CrashReport/CrashReportDialog.h

LIBS += -lqjson
INCLUDEPATH += ../../qjson/build/include
Expand Down

0 comments on commit b791c33

Please sign in to comment.