A quick basic reference for the Lex programming language.
flex <file_name.l>
gcc lex.yy.c
./a.out
This program will simply print the given input string.
%{
%}
%%
[.] {
printf("%d", yytext);
}
\n {return 0;}
%%
int yywrap(){}
int main(){
yylex();
printf("\n");
return 0;
}