remove hard-coded error values for parser
Revert "remove hard-coded error values for parser"

This reverts commit 9be1f331925819cd93ac07d24f9fbfd0889c1b1a.
move error stuff into errors.h/errors.c