Skip to content

Instantly share code, notes, and snippets.

@benjaminparnell
Created January 17, 2014 16:09
Show Gist options
  • Save benjaminparnell/8476055 to your computer and use it in GitHub Desktop.
Save benjaminparnell/8476055 to your computer and use it in GitHub Desktop.
@ECHO OFF
set ANTLR_PATH= :: Your path to the Antlr jar
set TARGET= :: Language name
set FILE=%1
echo \nGenerating into/%TARGET%
java -jar %ANTLR_PATH% -o %TARGET% %TARGET%.g4
echo Compiling using /%TARGET%
javac -cp %ANTLR_PATH% %TARGET%/*.java
echo Making tree...
java -cp .;%ANTLR_PATH% org.antlr.v4.runtime.misc.TestRig %TARGET%.%TARGET% program -tree %FILE%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment