Add helpers for error generation.
Rename add_error to error.
Add calls to va_end where missing.
Add argv for input file.
Change exit numbers to semantic values.
Add usage and flags to program.