%{ /**** The beginnings of a whitespace lexer. ****/ /* Note that the order in which you put the commands here in the lexer will matter as lex is greedy and will match whatever matches first */ #include #include int lineCounter=0; %} %% \xa return NEWLINE; \t return TAB; [ ] return SPACE; . return COMMENT; %% int yywrap() { return 1; }