diff options
author | Will Estes <wlestes@users.sourceforge.net> | 2001-05-01 20:47:11 +0000 |
---|---|---|
committer | Will Estes <wlestes@users.sourceforge.net> | 2001-05-01 20:47:11 +0000 |
commit | 2eae8800306d74d3507eee2464630a085b211779 (patch) | |
tree | a892110dd6ff826cf3691ce0b38615ed6d1fc061 /examples/manual/user_act.lex | |
parent | 26e78464e71e0d03bf16cda54bcf06a6785e727c (diff) |
adding the rest of vern's files
Diffstat (limited to 'examples/manual/user_act.lex')
-rw-r--r-- | examples/manual/user_act.lex | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/examples/manual/user_act.lex b/examples/manual/user_act.lex new file mode 100644 index 0000000..156d5f9 --- /dev/null +++ b/examples/manual/user_act.lex @@ -0,0 +1,31 @@ +%{ + +#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]); + } + } +} + + + + |