Skip to content

Instantly share code, notes, and snippets.

@benjaminparnell
Created July 25, 2014 14:17
Show Gist options
  • Save benjaminparnell/9f76444faa212c9b1ce6 to your computer and use it in GitHub Desktop.
Save benjaminparnell/9f76444faa212c9b1ce6 to your computer and use it in GitHub Desktop.
# This will run your code on the file you pass to it via the command line
ANTLR_PATH = "Your path to the antlr jar here"
# make sure you are in the project dir
# not in the generated pascal folder
# Generate
java -jar $ANTLR_PATH -o pascal pascal.g4
# Compile
javac -cp $ANTLR_PATH pascal/*.java
# Run
java -cp $ANTLR_PATH pascal.pascal $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment