Skip to content

Commit

Permalink
- remove Parser/antlr-3.2 directory (we have it now in ../3rdParty/an…
Browse files Browse the repository at this point in the history
…tlr)

- support both ANTLR 3.2 and ANTLR 3.4 (add a lot of initialization of ast elements and locals to rules)


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17659 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Oct 13, 2013
1 parent 175c72f commit 8acb9a9
Show file tree
Hide file tree
Showing 3 changed files with 477 additions and 306 deletions.
13 changes: 9 additions & 4 deletions Parser/Makefile.common
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
ANTLR=../3rdParty/antlr/3.2/libantlr3c-3.2
#ANTLR=../3rdParty/antlr/3.4/libantlr3c-3.4
ANTLRJAR = $(ANTLR)/../tool/antlr-3.2.jar
#ANTLRJAR = $(ANTLR)/../tool/antlr-3.4-complete.jar
ANTLRCMD=java -cp $(ANTLRJAR) org.antlr.Tool -report

COMPILERHOME=../Compiler/
BUILDINC = -I../Compiler/runtime -I../SimulationRuntime/c/meta -I../SimulationRuntime/c/ -I../SimulationRuntime/c/meta/gc -I../SimulationRuntime/c/util -I../SimulationRuntime/c/simulation/libf2c
RMLINC = -I$(RMLHOME)/include/plain

ANTLRCMD=java -cp ./antlr-3.2/lib/antlr-3.2.jar org.antlr.Tool -report

.PHONY: all
.SUFFIXES: .c .o
Expand All @@ -11,9 +16,9 @@ all: install libomparse_rml.a
install: libantlr3.a libomparse.a
cp libantlr3.a libomparse.a ../build/lib/omc/

libantlr3.a: antlr-3.2/runtime/C/src/* antlr-3.2/runtime/C/include/*
libantlr3.a: $(ANTLR)/src/* $(ATRLR)/include/*
# build the library
$(CC) ${CFLAGS} ${CPPFLAGS} -c antlr-3.2/runtime/C/src/*.c -Iantlr-3.2/runtime/C/include -Iantlr-3.2/runtime/C
$(CC) ${CFLAGS} ${CPPFLAGS} -c $(ANTLR)/src/*.c -I$(ANTLR)/include -I$(ANTLR)
rm -f $@
ar -ru libantlr3.a antlr3*.o
ranlib libantlr3.a
Expand Down Expand Up @@ -117,7 +122,7 @@ $(parmodelicagen) : ParModelica_Lexer.stamp


clean:
rm -f *.o *.a \
rm -f *.o *.obj *.lib *.a \
ModelicaParser.c ModelicaParser.h \
*Modelica*_Lexer.c *Modelica*_Lexer.h \
*.tokens *.stamp *.stamp.tmp

0 comments on commit 8acb9a9

Please sign in to comment.