Wrote seperate function to read source files named read_source_file(FILE *fp). checked for NULL pointers, closed open files and print all tokens after tokenization phase.
Also introduced xfree(p) macro to avoid double free memory error.
Changed Makefile to add CFLAGS to include useful debug information and enabled all compiler warnings.
Wrote seperate function to read source files named
read_source_file(FILE *fp)
. checked for NULL pointers, closed open files and print all tokens after tokenization phase. Also introducedxfree(p)
macro to avoid double free memory error.Changed Makefile to add
CFLAGS
to include useful debug information and enabled all compiler warnings.