Created
June 7, 2016 22:23
-
-
Save jmoyers/63c1c804a9db16ffe0e52bc66eda9aa7 to your computer and use it in GitHub Desktop.
An updated version of Stanford Compilers myparser script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# -d = loads your parser into gdb with correct input | |
# -r = uses the ref lexer and parser to generate the same style output | |
# default, the way the script worked originally | |
if [ $1 = "-d" ]; then | |
shift | |
./lexer $* > lexer.out | |
gdb -ex "set args $* < lexer.out" ./parser | |
elif [ $1 = "-r" ]; then | |
shift | |
/usr/class/cs143/bin/reflexer $* | /usr/class/cs143/bin/refparser $* | |
else | |
./lexer $* | ./parser $* | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment