add compare test script

This commit is contained in:
ridethepig 2023-03-22 21:35:26 +08:00
parent 1d3822faef
commit e07f9769e0
2 changed files with 9 additions and 0 deletions

View File

@ -75,3 +75,10 @@ clean-compile:
${SHELL} -ec '${DEPEND} $< | sed '\''s/\($*\.o\)[ :]*/\1 $@ : /g'\'' > $@'
-include ${CFIL:.cc=.d}
TESTCASE = good.cl
comparetest: parser
./stdparser ${TESTCASE} > std.out
./myparser ${TESTCASE} > my.out
diff std.out my.out
rm std.out my.out

2
assignments/PA3/stdparser Executable file
View File

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