JSON-Lang/build_oracle.sh

15 lines
255 B
Bash

#!/bin/bash
cat << EOF > oracle_table.py
from grammar import Tok, Variable
oracle_table = (
EOF
if python grammar.py >> oracle_table.py; then
echo ")" >> oracle_table.py
echo "Built oracle_table.py"
else
rm oracle_table.py
python build_oracle.py
fi