%{
#include "simple.tab.h"
extern int line_number;
%}
%option noyywrap
%%
"float" { printf("FROM FLEX FLOAT %s\n", yytext); return FLOAT; }
"int" { printf("FROM FLEX INT %s\n", yytext); return INT; }
[;] { return *yytext; }
[_a-zA-Z][_a-zA-Z0-9]* { printf("FROM FLEX IDENTIFIER: %s\n", yytext); return IDENTIFIER; }
[ \t\r]+ /* eat up whitespace */
[\n ...I'm Eliot and this is my notepad for programming topics such as Python, Django, Ubuntu, Emacs, etc... more »