minix/external/bsd/flex/dist/examples/manual/user_act.lex
2012-06-18 10:54:47 +00:00

31 lines
303 B
Text

%{
#include <ctype.h>
void user_action(void);
#define YY_USER_ACTION user_action();
%}
%%
.* ECHO;
\n ECHO;
%%
void user_action(void)
{
int loop;
for(loop=0; loop<yyleng; loop++){
if(islower(yytext[loop])){
yytext[loop] = toupper(yytext[loop]);
}
}
}