|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 331 (0x14b)
Types: TextFile
Names: »pig.l«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
└─⟦this⟧ »EUUGD18/General/Pig/pig.l«
/* PIG - a pig-latin translator */
%{
#include <ctype.h>
char *c, start;
%}
%%
[A-Za-z]+ {
if(yyleng >=2){
c=yytext;
if(isupper(yytext[0]))
start = tolower(yytext[0]);
else
start = yytext[0];
c++;
if(isupper(yytext[0]))
*c=toupper(*c);
printf("%s%ca",c,start);
} else {
ECHO;
}
}
%%
main()
{
yylex();
}