PPT Slide
/*
* Parse slash-delimited book data.
*/
%%
%class lex
%standalone
%unicode
%%
[^/\r\n]+ { System.out.print(yytext()); }
"/" { System.out.print("/"); }
\r|\n|\r\n { System.out.println(); }
<<EOF>> { return 0; }
mylexer.flex
<<EOF>> is a standard
lex symbol used to
match the end
of the input file.
Previous slide
Next slide
Back to first slide
View graphic version