Added stub for error detection; added some tests with illegal inputs
Improved error detection for shift-reduce a bit