first compile PA5

This commit is contained in:
ridethepig 2023-03-27 19:21:05 +08:00
parent 92527e8034
commit 040115e812
16 changed files with 20 additions and 63 deletions

18
.gitignore vendored
View File

@ -1,12 +1,16 @@
*.s *.s
*.o
.cache/
*.d
grading/
compile_commands.json
assignments/PA2/cgen assignments/PA2/cgen
assignments/PA2/cool-lex.cc assignments/PA2/cool-lex.cc
assignments/PA2/parser assignments/PA2/parser
assignments/PA2/semant assignments/PA2/semant
assignments/PA2/lexer assignments/PA2/lexer
*.o
.cache/
compile_commands.json
assignments/PA3/cgen assignments/PA3/cgen
assignments/PA3/parser assignments/PA3/parser
assignments/PA3/semant assignments/PA3/semant
@ -14,9 +18,13 @@ assignments/PA3/lexer
assignments/PA3/cool.output assignments/PA3/cool.output
assignments/PA3/cool.tab.h assignments/PA3/cool.tab.h
assignments/PA3/cool-parse.cc assignments/PA3/cool-parse.cc
*.d
grading/
assignments/PA4/cgen assignments/PA4/cgen
assignments/PA4/parser assignments/PA4/parser
assignments/PA4/semant assignments/PA4/semant
assignments/PA4/lexer assignments/PA4/lexer
assignments/PA5/cgen
assignments/PA5/parser
assignments/PA5/semant
assignments/PA5/lexer

View File

@ -26,7 +26,7 @@ FFLAGS = -d8 -ocool-lex.cc
BFLAGS = -d -v -y -b cool --debug -p cool_yy BFLAGS = -d -v -y -b cool --debug -p cool_yy
CC=g++ CC=g++
CFLAGS=-g -Wall -Wno-unused -Wno-write-strings -Wno-deprecated ${CPPINCLUDE} -DDEBUG CFLAGS=-g -Wall -Wno-unused -Wno-write-strings -Wno-deprecated ${CPPINCLUDE} -DDEBUG -std=c++11
FLEX=flex ${FFLAGS} FLEX=flex ${FFLAGS}
BISON= bison ${BFLAGS} BISON= bison ${BFLAGS}
DEPEND = ${CC} -MM ${CPPINCLUDE} DEPEND = ${CC} -MM ${CPPINCLUDE}

View File

@ -1,5 +0,0 @@
ast-lex.o ast-lex.d : ast-lex.cc ../../include/PA5/ast-parse.h \
../../include/PA5/copyright.h ../../include/PA5/cool-io.h \
../../include/PA5/tree.h ../../include/PA5/stringtab.h \
../../include/PA5/list.h ../../include/PA5/stringtab.h \
../../include/PA5/utilities.h

View File

@ -1,6 +0,0 @@
ast-parse.o ast-parse.d : ast-parse.cc ../../include/PA5/cool-io.h \
../../include/PA5/copyright.h cool-tree.h ../../include/PA5/tree.h \
../../include/PA5/stringtab.h ../../include/PA5/list.h \
../../include/PA5/cool-io.h cool-tree.handcode.h \
../../include/PA5/cool.h ../../include/PA5/stringtab.h \
../../include/PA5/utilities.h

View File

@ -1,6 +0,0 @@
cgen-phase.o cgen-phase.d : cgen-phase.cc ../../include/PA5/cool-io.h \
../../include/PA5/copyright.h cool-tree.h ../../include/PA5/tree.h \
../../include/PA5/stringtab.h ../../include/PA5/list.h \
../../include/PA5/cool-io.h cool-tree.handcode.h \
../../include/PA5/cool.h ../../include/PA5/stringtab.h \
../../include/PA5/cgen_gc.h

View File

@ -1,6 +0,0 @@
cgen.o cgen.d : cgen.cc cgen.h emit.h ../../include/PA5/stringtab.h \
../../include/PA5/copyright.h ../../include/PA5/list.h \
../../include/PA5/cool-io.h cool-tree.h ../../include/PA5/tree.h \
../../include/PA5/stringtab.h cool-tree.handcode.h \
../../include/PA5/cool.h ../../include/PA5/symtab.h \
../../include/PA5/cgen_gc.h

View File

@ -1,3 +0,0 @@
cgen_supp.o cgen_supp.d : cgen_supp.cc ../../include/PA5/stringtab.h \
../../include/PA5/copyright.h ../../include/PA5/list.h \
../../include/PA5/cool-io.h

View File

@ -1,5 +0,0 @@
cool-tree.o cool-tree.d : cool-tree.cc ../../include/PA5/tree.h \
../../include/PA5/copyright.h ../../include/PA5/stringtab.h \
../../include/PA5/list.h ../../include/PA5/cool-io.h \
cool-tree.handcode.h ../../include/PA5/cool.h \
../../include/PA5/stringtab.h cool-tree.h

View File

@ -1,6 +0,0 @@
dumptype.o dumptype.d : dumptype.cc ../../include/PA5/copyright.h \
../../include/PA5/cool.h ../../include/PA5/copyright.h \
../../include/PA5/cool-io.h ../../include/PA5/tree.h \
../../include/PA5/stringtab.h ../../include/PA5/list.h cool-tree.h \
cool-tree.handcode.h ../../include/PA5/stringtab.h \
../../include/PA5/utilities.h

View File

@ -1,3 +0,0 @@
handle_flags.o handle_flags.d : handle_flags.cc ../../include/PA5/copyright.h \
../../include/PA5/cool-io.h ../../include/PA5/copyright.h \
../../include/PA5/cgen_gc.h

View File

@ -1,2 +1,2 @@
#!/bin/csh -f #!/bin/bash
./lexer $* | ./parser $* | ./semant $* | ./cgen $* ./lexer $* | ./parser $* | ./semant $* | ./cgen $*

2
assignments/PA5/stdcoolc Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
../../bin/lexer $* | ../../bin/parser $* | ../../bin/semant $* | ../../bin/cgen $*

View File

@ -1,4 +0,0 @@
stringtab.o stringtab.d : stringtab.cc ../../include/PA5/copyright.h \
../../include/PA5/stringtab_functions.h ../../include/PA5/copyright.h \
../../include/PA5/cool-io.h ../../include/PA5/stringtab.h \
../../include/PA5/list.h ../../include/PA5/stringtab.h

View File

@ -1,3 +0,0 @@
tree.o tree.d : tree.cc ../../include/PA5/copyright.h ../../include/PA5/tree.h \
../../include/PA5/copyright.h ../../include/PA5/stringtab.h \
../../include/PA5/list.h ../../include/PA5/cool-io.h

View File

@ -1,6 +0,0 @@
utilities.o utilities.d : utilities.cc ../../include/PA5/copyright.h \
../../include/PA5/cool-io.h ../../include/PA5/copyright.h \
../../include/PA5/cool-parse.h ../../include/PA5/cool-io.h \
../../include/PA5/tree.h ../../include/PA5/stringtab.h \
../../include/PA5/list.h ../../include/PA5/stringtab.h \
../../include/PA5/utilities.h