Skip to content

Commit

Permalink
fixed assign for CC (clang was already working)
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaBortoli committed Dec 22, 2014
1 parent 400ca59 commit 537fe67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

LEX = lex
YACC = yacc -d
CC = clang -std=c99
CC = cc -std=c99

interpreter: y.tab.o lex.yy.o myCalc.o calcInterpreter.o
$(CC) -o interpreter y.tab.o lex.yy.o myCalc.o calcInterpreter.o -ll -lm
Expand Down
8 changes: 4 additions & 4 deletions calcInterpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ conNodeType * ex(nodeType *p) {
conNodeType * a;
//fake for with while
while(ex(opr(LT, 2, p->opr.op[0], p->opr.op[2]))->b) {
// body
ex(p->opr.op[3]);
// 3:05 AM coded -_-
ex(opr(EQ, 2, p->opr.op[0],
con(getTyped(a = ex(opr(PLUS, 2, p->opr.op[0], con(1,INTTYPE)))), a->type)
));
// increment of one
a = ex(opr(PLUS, 2, p->opr.op[0], con(1,INTTYPE)));
ex(opr(EQ, 2, p->opr.op[0], con(getTyped(a), a->type)));
}
return 0;
}
Expand Down

0 comments on commit 537fe67

Please sign in to comment.