minix/external/bsd/flex/dist/examples/manual/user_act.lex

32 lines
303 B
Text
Raw Normal View History

2012-06-06 16:10:32 +02:00
%{
#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]);
}
}
}