compileGrammar.sh 719 Bytes
Newer Older
1
#!/bin/bash -e
Maxime Perrotin's avatar
Maxime Perrotin committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15

echo 'you must download and install antlr_python_runtime-3.1.3.tar.gz:
(from http://pypi.python.org/pypi/antlr_python_runtime/3.1.3 for ex)
cd /opt
sudo tar zxvf antlr_python_runtime-3.1.3.tar.gz
cd antlr_python_runtime-3.1.3
sudo python setup.py install --record install.record

To uninstall later, type:
sudo rm $(cat install.record)

You must also download and unpack antlr-3.1.3.tar.gz
'

16 17 18 19 20 21
if [ ! -d antlr-3.1.3 ]
then
    wget http://download.tuxfamily.org/taste/misc/antlr-3.1.3.tar.bz2
    tar xvf antlr-3.1.3.tar.bz2
    NO_ANTLR=1
fi
Maxime Perrotin's avatar
Maxime Perrotin committed
22 23
export CLASSPATH=$(pwd)/antlr-3.1.3/lib/antlr-3.1.3.jar
java org.antlr.Tool sdl92.g
24 25 26 27 28 29 30

if [ $NO_ANTLR ]
then
    rm -rf antlr-3.1.3
    rm antlr-3.1.3.tar.bz2
fi