Add documentation to 'parser.c' and 'parser.h'. Clean up code in these
files.