there is a lexer.l file:
%option noyywrap
%x IN_COMMENT

%{
#include <stdio.h>
#include "parser.tab.h"
extern YYSTYPE yylval;
#define YY_DECL int yylex(YYSTYPE *yylval)

%}


%%
<INITIAL>"/*"         {BEGIN(IN_COMMENT);}
<IN_COMMENT>"*/"      {BEGIN(INITIAL); return COMMENT;}
<IN_COMMENT>[^*\n]+   ;
<IN_COMMENT>"*"       ;
<IN_COMMENT>\n        {yylineno++;}
<IN_COMMENT><<EOF>>   {
                        printf("UNTERMINATED COMMENT AT line %d!", yylineno);
                        yyterminate();
                      }
"bool"      { yylval->strval = strdup("bool"); return BOOL; }
"char"      { yylval->strval = strdup("char"); return CHAR; }
"int"       { yylval->strval = strdup("int"); return INT; }
"double"    { yylval->strval = strdup("double"); return DOUBLE; }
"float"     { yylval->strval = strdup("float"); return FLOAT; }
"string"    { yylval->strval = strdup("string"); return STRING; }
"int*"      { yylval->strval = strdup("int*"); return INTPTR; }
"char*"     { yylval->strval = strdup("char*"); return CHARPTR; }
"double*"   { yylval->strval = strdup("double*"); return DOUBLEPTR; }
"float*"    { yylval->strval = strdup("float*"); return FLOATPTR; }
"void"      { yylval->strval = strdup("void"); return VOID; }
"if"        { yylval->strval = strdup("if"); return IF; }
"else"      { yylval->strval = strdup("else"); return ELSE; }
"while"     { yylval->strval = strdup("while"); return WHILE; }
"for"       { yylval->strval = strdup("for"); return FOR; }
"var"       { yylval->strval = strdup("var"); return VARIABLE; }
"args>>"    { yylval->strval = strdup("args>>"); return ARGS; }
"function"  { yylval->strval = strdup("function"); return FUNCTION; }
"public"    { yylval->strval = strdup("public"); return PUBLIC; }
"private"   { yylval->strval = strdup("private"); return PRIVATE; }
"static"    { yylval->strval = strdup("static"); return STATIC; }
"return"    { yylval->strval = strdup("return"); return RETURN; }
"null"      { yylval->strval = strdup("null"); return NULL_VAL; }
"main"      { yylval->strval = strdup("main"); return MAIN; }
 
"true"      { yylval->strval = strdup("true"); return TRUE_VAL; }
"false"     { yylval->strval = strdup("false"); return FALSE_VAL; }

"&&"        {return AND;}
"=="        {return EQUAL;}
">"         {return GREATER;}
">="        {return GREATER_EQ;}
"<"         {return LESSER;}
"<="        {return LESSER_EQ;}
"-"         {return SUB;}
"!"         {return NOT;}
"!="        {return NOT_EQ;}
"||"        {return OR;}
"+"         {return ADD;}
"*"         {return MULT;}
"/"         {return DIVIDE;}
"&"         {return ADDRESS;}
"^"         {return DEREFRENCE;}
"<-"        {return ASSIGN;}

"|"         {return LENGTH;}
";"         {return SEMICOLON;}
":"         {return COLON;}
","         {return COMMA;}
"{"         {return OPENBRACE;}
"}"         {return CLOSEBRACE;}
"("         {return OPENPAREN;}
")"         {return CLOSEPAREN;}
"["         {return OPENBRACKET;}
"]"         {return CLOSEBRACKET;}
 


[a-zA-Z][a-zA-Z0-9_]*                           { yylval->strval= strdup(yytext); return ID; }

"\""[^"]*"\""                                   { yylval->strval= strdup(yytext); return STRING_VAL; }

[-]?[1-9][0-9]*|[0-9]                          { yylval->strval= strdup(yytext); return INT_VAL; }

0(x|X)[0-9A-F]+                                 { yylval->strval= strdup(yytext); return HEX_VAL; }

[-]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?[fF]?     { yylval->strval = strdup(yytext); return FLOAT_VAL; }

[-]?[0-9]*\.?[0-9]*[eE]?[-+]?[0-9]+            { yylval->strval= strdup(yytext); return DOUBLE_VAL; }

\'.\'                                           { yylval->strval= strdup(yytext); return CHAR_VAL; }

[\n]        {yylineno++;} 

[\r\n]      {yylineno++;} 

[ \t\r]+      ;

. { return yytext[0]; }
%%
meaning one by one.