Improved error handling in parser (use $startpos / $endpos rather than Parsing which is deprecated).
Solved a shift/reduce conflict.