#!/bin/bash

case $1 in
    (clean)
        rm -f calc parser/parse.cc parser/Parserbase.h
    ;;
    (calc)
        cd parser
        bisonc++ -V grammar

       cd ..
       g++ -Wall -o calc *.cc */*.cc

    ;;
    (*)
        echo "$0 [clean|calc] to clean or build the calc program"
    ;;
esac
