Debian Codegraph @

examples/manual/user_act.lex

raw
1 %{
2
3 #include <ctype.h>
4
5 void user_action(void);
6
7 #define YY_USER_ACTION user_action();
8
9 %}
10
11 %%
12
13 .* ECHO;
14 \n ECHO;
15
16 %%
17
18 void user_action(void)
19 {
20 int loop;
21
22 for(loop=0; loop<yyleng; loop++){
23 if(islower(yytext[loop])){
24 yytext[loop] = toupper(yytext[loop]);
25 }
26 }
27 }
28
29
30
31