#! /bin/bash
GRAMMARDIR="Source/grammar"
NATIVEDIR=`toNative.bash "$GRAMMARDIR"`
CCUPJAR=`toNative.bash "$LIB330/java_cup.jar"`

PARSER=parser
SYM=sym
rm -f "$GRAMMARDIR/$PARSER.java" "$GRAMMARDIR/$SYM.java" "$GRAMMARDIR/$PARSER.states" "$PARSER.cup.error"

java -jar "$CCUPJAR" -nonterms \
-expect 0 -progress -source "$NATIVEDIR" \
-parser $PARSER \
-symbols $SYM \
-input "$PARSER.cup" \
&> $PARSER.cup.error
#	-dump -dumpto "$PARSER.states" \

cat $PARSER.cup.error
