parser scan error handling
parse and parse_rec functions done