1 void munchit(char *); 2 %% 3 \..*\n printf("%s", yytext); 4 pea[ ][_A-Za-z][A-Za-z0-9_]*$ {printf("pea");munchit(yytext+3);} 5 \ [_A-Za-z][A-Za-z0-9_]*/\, munchit(yytext); 6 . putchar(*yytext); 7 %% 8 /* $NetBSD: txlt.l,v 1.2 1998/01/05 21:34:56 perry Exp $ */ 9 10 void 11 munchit(s) 12 char *s; 13 { 14 putchar(*s++); 15 if (!strncmp(s, "fp", 2) || 16 !strncmp(s, "sp", 2) || 17 ((*s == 'a') || (*s == 'd')) && ((s[1]-'0')<=7)) 18 printf("%s", s); 19 else 20 printf("pc@(%s)",s); 21 } 22