Skip to content

Commit

Permalink
update final test for lab3
Browse files Browse the repository at this point in the history
  • Loading branch information
hzqmwne committed Oct 10, 2017
1 parent 0f6f304 commit 0eca571
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
20 changes: 15 additions & 5 deletions final_tiger/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
CC=gcc
CFLAGS=-g -c -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
CFLAGS=-g -c -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast

tiger-compiler: main.o y.tab.o lex.yy.o errormsg.o absyn.o prabsyn.o symbol.o translate.o semant.o parse.o escape.o frame.o table.o util.o types.o env.o tree.o temp.o printtree.o canon.o codegen.o assem.o graph.o flowgraph.o liveness.o color.o regalloc.o
$(CC) -g $^ -o $@

y.tab.o: y.tab.c
cc $(CFLAGS) $<

y.tab.c: tiger.y
yacc -dv tiger.y

y.tab.h: y.tab.c
echo "y.tab.h was created at the same time as y.tab.c"

lex.yy.o: lex.yy.c
$(CC) $(CFLAGS) $<
cc $(CFLAGS) $<

lex.yy.c:
lex.yy.c: tiger.lex
lex tiger.lex

clean:
rm -f tiger-compiler lex.yy.c lex.yy.o
clean:
rm -f tiger-compiler lex.yy.o lex.yy.c y.tab.h y.tab.c y.tab.o

3 changes: 0 additions & 3 deletions final_tiger/gradeMe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ DIFFOPTION="-w -B"
score=0

#echo $?
mv tiger.lex ../
cp template.lex tiger.lex
sh change.sh
make clean
make
if [[ $? != 0 ]]; then
Expand Down

0 comments on commit 0eca571

Please sign in to comment.