This server is intended for use for Academic Classwork related Git repositories only. Projects/repositories will generally be removed after 6 months following close of the semester. Inactive repositories from previous semester are now being archived when no activity for 365 days. They are renamed and marked as 'archived'. After 90 days in that state they will be removed from the system completely.

Commit aca5edb6 authored by Jonathan Evans's avatar Jonathan Evans

init push

parent 2b575c52
File added
#!/bin/bash
# If you make any changes to this script in Windows, you must
# run dos2unix on it before running.
# Place this script in the same directory as your source
# files. In this directory there should be a `sample_input`
# directory and an `expected_output` directory, both of
# which can be found on Canvas.
# Create an empty directory called `my_output`. This can be
# done by running the command `mkdir my_output`.
# Run this script my typing `bash compare_output.sh`
# If you would like the script to compile your program,
# uncomment the following 3 lines and change the file names
# to the correct format specified in Canvas.
# Otherwise, make sure your executable is named `a.out`
# or update the first line in the for loop.
#flex mfpl.l
#bison mfpl.y
#g++ mfpl.tab.c
test_files=`ls ./sample_input`
diff_files=0
for file in $test_files; do
a.out < ./sample_input/$file > ./my_output/$file.out
diff_lines=`diff ./my_output/$file.out \
./expected_output/$file.out \
--ignore-space-change --ignore-case | egrep -c "^<|^>"`
if [ $diff_lines == 0 ]
then
echo $file matches.
else
diff_files=$((diff_files+1))
echo $file does not match. There are $diff_lines differences.
fi
done
echo
echo "Number of different input files: $diff_files"
echo
EXPR type is: INT
---- Completed parsing ----
Bye!
___Entering new scope...
___Entering new scope...
___Adding x to symbol table
___Adding y to symbol table
___Exiting scope...
___Adding sub to symbol table
Line 3: Arg 1 must be integer
Bye!
Line 1: Arg 2 must be integer
Bye!
Line 1: Arg 1 must be integer
Bye!
Line 1: Arg 2 must be integer
Bye!
Line 1: Arg 1 must be integer
Bye!
EXPR type is: INT_OR_BOOL
---- Completed parsing ----
Bye!
EXPR type is: INT_OR_STR
---- Completed parsing ----
Bye!
EXPR type is: INT
---- Completed parsing ----
Bye!
EXPR type is: INT_OR_STR
---- Completed parsing ----
Bye!
___Entering new scope...
___Adding x to symbol table
___Adding y to symbol table
___Entering new scope...
___Adding x to symbol table
___Adding y to symbol table
___Exiting scope...
___Adding z to symbol table
Line 7: Arg 1 cannot be a function
Bye!
___Entering new scope...
___Adding x to symbol table
___Adding y to symbol table
___Entering new scope...
___Adding x to symbol table
___Adding y to symbol table
___Exiting scope...
___Adding z to symbol table
Line 7: Arg 2 cannot be a function
Bye!
___Entering new scope...
___Adding x to symbol table
___Adding y to symbol table
___Entering new scope...
___Adding x to symbol table
___Adding y to symbol table
___Exiting scope...
___Adding z to symbol table
Line 7: Arg 3 cannot be a function
Bye!
EXPR type is: INT
---- Completed parsing ----
Bye!
___Entering new scope...
___Exiting scope...
EXPR type is: FUNCTION
---- Completed parsing ----
Bye!
___Entering new scope...
___Adding x to symbol table
___Adding y to symbol table
___Exiting scope...
EXPR type is: INT
---- Completed parsing ----
Bye!
___Entering new scope...
___Exiting scope...
EXPR type is: INT_OR_STR
---- Completed parsing ----
Bye!
___Entering new scope...
___Exiting scope...
EXPR type is: BOOL
---- Completed parsing ----
Bye!
___Entering new scope...
___Exiting scope...
EXPR type is: BOOL
---- Completed parsing ----
Bye!
___Entering new scope...
___Adding x to symbol table
___Exiting scope...
___Entering new scope...
___Adding x to symbol table
___Exiting scope...
EXPR type is: INT_OR_STR_OR_BOOL
---- Completed parsing ----
Bye!
___Entering new scope...
___Entering new scope...
___Adding x to symbol table
___Exiting scope...
___Adding f to symbol table
___Exiting scope...
EXPR type is: INT_OR_STR_OR_BOOL
---- Completed parsing ----
Bye!
___Entering new scope...
___Entering new scope...
___Adding x to symbol table
___Exiting scope...
___Adding f to symbol table
___Exiting scope...
EXPR type is: INT
---- Completed parsing ----
Bye!
___Entering new scope...
___Entering new scope...
___Exiting scope...
Line 1: Arg 2 cannot be a function
Bye!
___Entering new scope...
___Adding x to symbol table
___Adding y to symbol table
___Adding z to symbol table
___Exiting scope...
Line 1: Too few parameters in function call
Bye!
___Entering new scope...
___Adding x to symbol table
___Adding y to symbol table
___Adding z to symbol table
___Exiting scope...
Line 1: Too many parameters in function call
Bye!
___Entering new scope...
___Exiting scope...
Line 1: Too many parameters in function call
Bye!
___Entering new scope...
___Exiting scope...
EXPR type is: INT
---- Completed parsing ----
Bye!
___Entering new scope...
___Exiting scope...
EXPR type is: STR
---- Completed parsing ----
Bye!
___Entering new scope...
___Exiting scope...
EXPR type is: INT_OR_STR
---- Completed parsing ----
Bye!
___Entering new scope...
___Entering new scope...
___Exiting scope...
___Adding f0 to symbol table
___Entering new scope...
___Adding x to symbol table
___Exiting scope...
___Adding f1 to symbol table
___Entering new scope...
___Adding x1 to symbol table
___Adding x2 to symbol table
___Adding x3 to symbol table
___Adding x4 to symbol table
___Adding x5 to symbol table
___Adding x6 to symbol table
___Adding x7 to symbol table
___Adding x8 to symbol table
___Adding x9 to symbol table
___Exiting scope...
___Adding fn to symbol table
___Exiting scope...
EXPR type is: STR
---- Completed parsing ----
Bye!
___Entering new scope...
___Adding s to symbol table
___Exiting scope...
EXPR type is: STR
---- Completed parsing ----
Bye!
___Entering new scope...
___Adding x to symbol table
___Exiting scope...
EXPR type is: INT
---- Completed parsing ----
Bye!
___Entering new scope...
___Exiting scope...
EXPR type is: BOOL
---- Completed parsing ----
Bye!
___Entering new scope...
___Entering new scope...
___Exiting scope...
___Exiting scope...
Line 2: Arg 2 cannot be a function
Bye!
EXPR type is: BOOL
---- Completed parsing ----
Bye!
___Entering new scope...
___Exiting scope...
Line 1: Arg 1 cannot be a function
Bye!
___Entering new scope...
___Exiting scope...
Line 1: Arg 2 cannot be a function
Bye!
EXPR type is: BOOL
---- Completed parsing ----
Bye!
EXPR type is: BOOL
---- Completed parsing ----
Bye!
EXPR type is: BOOL
---- Completed parsing ----
Bye!
EXPR type is: BOOL
---- Completed parsing ----
Bye!
EXPR type is: BOOL
---- Completed parsing ----
Bye!
EXPR type is: BOOL
---- Completed parsing ----
Bye!
___Entering new scope...
___Adding x to symbol table
___Adding y to symbol table
___Exiting scope...
Line 1: Arg 1 cannot be a function
Bye!
EXPR type is: BOOL
---- Completed parsing ----
Bye!
EXPR type is: STR
---- Completed parsing ----
Bye!
EXPR type is: INT
---- Completed parsing ----
Bye!
___Entering new scope...
___Adding s to symbol table
___Exiting scope...
EXPR type is: STR
---- Completed parsing ----
Bye!
EXPR type is: BOOL
---- Completed parsing ----