Groundwork for parser done. Need to implement grammar functions