Install JavaCC on macOS
2. Unzip and set path
code:bash
$ cd ~/Downloads
$ unzip javacc-6.0.zip
$ mv javacc-6.0 ~/bin/ # My local bin directory
code:config.fish
set -x PATH ~/bin $PATH
3. Make running script
code:bash
$ cd ~/bin
$ touch javacc
$ chmod 755 javacc
code:javacc
DIR="$( cd "$( dirname "${BASH_SOURCE0}" )" >/dev/null 2>&1 && pwd )" JAVACC_PATH=${DIR}/javacc-6.0/bin/lib/javacc.jar
java -classpath ${JAVACC_PATH} javacc "$@"