Skip to content

Instantly share code, notes, and snippets.

@tianruig
Created October 1, 2018 15:39
Show Gist options
  • Save tianruig/af31e28195f14f616f9439b242c3c068 to your computer and use it in GitHub Desktop.
Save tianruig/af31e28195f14f616f9439b242c3c068 to your computer and use it in GitHub Desktop.
clean-pkg:
mvn clean package
clean:
mvn clean
pkg:
mvn package
test:
java -cp "target/assignment.jar:chocopy-ref.jar" chocopy.ChocoPy --pa1 chocopy.pa1.StudentParser --dir src/test/data/pa1/sample --test
parse:
java -cp "target/assignment.jar:chocopy-ref.jar" chocopy.ChocoPy --pa1 chocopy.pa1.StudentParser --in $(f)
parse-reference:
java -cp "target/assignment.jar:chocopy-ref.jar" chocopy.ChocoPy --pa1 chocopy.reference.RefParser --in $(f)
cmp:
make parse f=$(f) | tail -n +4 | head --lines=-1 | jq -S . > out/ours
make parse-reference f=$(f) | tail -n +4 | head --lines=-1| jq -S . > out/ref
vimdiff out/ours out/ref
tokens:
java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.pa1.ChocoPyLexer $(f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment