Semantic Errors 0------------------------------------------------------------listing.h// This file contains the function prototypes for the functions that produce the // compilation listingenum ErrorCategories {LEXICAL, SYNTAX, GENERAL_SEMANTIC, DUPLICATE_IDENTIFIER,UNDECLARED};void firstLine();void nextLine();int lastLine();void appendError(ErrorCategories errorCategory, string message);----------------------------------------------------------------------------------makefile
%token ADDOP MULOP RELOP ANDOP%token BEGIN_ BOOLEAN END ENDREDUCE FUNCTIONINTEGER IS REDUCE RETURNS%%function: function_header optional_variable body ;function_header: FUNCTION IDENTIFIER RETURNS type ';' ;optional_variable:variable |;variable:IDENTIFIER ':' type IS statement_ ;type: