fixed generate.sh script
[cdsspec-compiler.git] / run-javacc.sh
1 #!/bin/bash
2
3 SPEC_COMPILER_HOME=$(pwd)
4
5 echo "CDSSpec Compiler home: " $SPEC_COMPILER_HOME
6
7 JAVACC_PATH=$SPEC_COMPILER_HOME/lib
8
9 UTIL_FILE=$SPEC_COMPILER_HOME/grammer/util.jj
10
11 UTIL_OUTPUT_PATH=$SPEC_COMPILER_HOME/src/edu/uci/eecs/utilParser
12
13 echo "Deleting the old generated java files."
14 rm -rf $UTIL_OUTPUT_PATH/*
15
16 mkdir -p $UTIL_OUTPUT_PATH
17
18 java -cp $JAVACC_PATH/javacc.jar javacc -OUTPUT_DIRECTORY=$UTIL_OUTPUT_PATH $UTIL_FILE