clean
[cdsspec-compiler.git] / run-javacc.sh
1 #!/bin/bash
2
3 JAVACC_PATH=/home/peizhaoo/spec-checker-compiler/javacc-6.0/bin/lib
4
5 SRC_PATH=/home/peizhaoo/spec-checker-compiler/src
6 OUTPUT_PATH=$SRC_PATH/edu/uci/eecs/specCompiler/grammerParser
7 mkdir -p $OUTPUT_PATH
8
9 GRAMMER_FILE=$SRC_PATH/../grammer/spec-compiler.jj
10
11 if [ -z $1 ]; then
12         echo "Using the default grammer file: $GRAMMER_FILE."
13 else
14         GRAMMER_FILE=$1
15 fi
16
17 echo "Deleting the old generated java files."
18 rm $OUTPUT_PATH/*.java
19 java -cp $JAVACC_PATH/javacc.jar javacc -OUTPUT_DIRECTORY=$OUTPUT_PATH $GRAMMER_FILE