%{ #include #include void put_utf8(int); %} %START SKT INIT___ %% "" BEGIN INIT___; "" BEGIN 0; "a" { put_utf8(0x0905); BEGIN SKT; } "A" { put_utf8(0x0906); BEGIN SKT; } "i" { put_utf8(0x0907); BEGIN SKT; } "I" { put_utf8(0x0908); BEGIN SKT; } "u" { put_utf8(0x0909); BEGIN SKT; } "U" { put_utf8(0x090a); BEGIN SKT; } "f" { put_utf8(0x090b); BEGIN SKT; } "F" { put_utf8(0x0960); BEGIN SKT; } "x" { put_utf8(0x090c); BEGIN SKT; } "X" { put_utf8(0x0961); BEGIN SKT; } "e" { put_utf8(0x090f); BEGIN SKT; } "E" { put_utf8(0x0910); BEGIN SKT; } "o" { put_utf8(0x0913); BEGIN SKT; } "O" { put_utf8(0x0914); BEGIN SKT; } "^a" { put_utf8(0x0905); put_utf8(0x0951); BEGIN SKT; } "^A" { put_utf8(0x0906); put_utf8(0x0951); BEGIN SKT; } "^i" { put_utf8(0x0907); put_utf8(0x0951); BEGIN SKT; } "^I" { put_utf8(0x0908); put_utf8(0x0951); BEGIN SKT; } "^u" { put_utf8(0x0909); put_utf8(0x0951); BEGIN SKT; } "^U" { put_utf8(0x090a); put_utf8(0x0951); BEGIN SKT; } "^f" { put_utf8(0x090b); put_utf8(0x0951); BEGIN SKT; } "^F" { put_utf8(0x0960); put_utf8(0x0951); BEGIN SKT; } "^x" { put_utf8(0x090c); put_utf8(0x0951); BEGIN SKT; } "^X" { put_utf8(0x0961); put_utf8(0x0951); BEGIN SKT; } "^e" { put_utf8(0x090f); put_utf8(0x0951); BEGIN SKT; } "^E" { put_utf8(0x0910); put_utf8(0x0951); BEGIN SKT; } "^o" { put_utf8(0x0913); put_utf8(0x0951); BEGIN SKT; } "^O" { put_utf8(0x0914); put_utf8(0x0951); BEGIN SKT; } "\\a" { put_utf8(0x0905); put_utf8(0x0952); BEGIN SKT; } "\\A" { put_utf8(0x0906); put_utf8(0x0952); BEGIN SKT; } "\\i" { put_utf8(0x0907); put_utf8(0x0952); BEGIN SKT; } "\\I" { put_utf8(0x0908); put_utf8(0x0952); BEGIN SKT; } "\\u" { put_utf8(0x0909); put_utf8(0x0952); BEGIN SKT; } "\\U" { put_utf8(0x090a); put_utf8(0x0952); BEGIN SKT; } "\\f" { put_utf8(0x090b); put_utf8(0x0952); BEGIN SKT; } "\\F" { put_utf8(0x0960); put_utf8(0x0952); BEGIN SKT; } "\\x" { put_utf8(0x090c); put_utf8(0x0952); BEGIN SKT; } "\\X" { put_utf8(0x0961); put_utf8(0x0952); BEGIN SKT; } "\\e" { put_utf8(0x090f); put_utf8(0x0952); BEGIN SKT; } "\\E" { put_utf8(0x0910); put_utf8(0x0952); BEGIN SKT; } "\\o" { put_utf8(0x0913); put_utf8(0x0952); BEGIN SKT; } "\\O" { put_utf8(0x0914); put_utf8(0x0952); BEGIN SKT; } "a" { BEGIN INIT___; } // delete "A" { put_utf8(0x093e); BEGIN INIT___; } "i" { put_utf8(0x093f); BEGIN INIT___; } "I" { put_utf8(0x0940); BEGIN INIT___; } "u" { put_utf8(0x0941); BEGIN INIT___; } "U" { put_utf8(0x0942); BEGIN INIT___; } "f" { put_utf8(0x0943); BEGIN INIT___; } "F" { put_utf8(0x0944); BEGIN INIT___; } "x" { put_utf8(0x0962); BEGIN INIT___; } "X" { put_utf8(0x0963); BEGIN INIT___; } "e" { put_utf8(0x0947); BEGIN INIT___; } "E" { put_utf8(0x0948); BEGIN INIT___; } "o" { put_utf8(0x094b); BEGIN INIT___; } "O" { put_utf8(0x094c); BEGIN INIT___; } "^a" { put_utf8(0x0951); BEGIN INIT___; } "^A" { put_utf8(0x093e); put_utf8(0x951); BEGIN INIT___; } "^i" { put_utf8(0x093f); put_utf8(0x951); BEGIN INIT___; } "^I" { put_utf8(0x0940); put_utf8(0x951); BEGIN INIT___; } "^u" { put_utf8(0x0941); put_utf8(0x951); BEGIN INIT___; } "^U" { put_utf8(0x0942); put_utf8(0x951); BEGIN INIT___; } "^f" { put_utf8(0x0943); put_utf8(0x951); BEGIN INIT___; } "^F" { put_utf8(0x0944); put_utf8(0x951); BEGIN INIT___; } "^x" { put_utf8(0x0962); put_utf8(0x951); BEGIN INIT___; } "^X" { put_utf8(0x0963); put_utf8(0x951); BEGIN INIT___; } "^e" { put_utf8(0x0947); put_utf8(0x951); BEGIN INIT___; } "^E" { put_utf8(0x0948); put_utf8(0x951); BEGIN INIT___; } "^o" { put_utf8(0x094b); put_utf8(0x951); BEGIN INIT___; } "^O" { put_utf8(0x094c); put_utf8(0x951); BEGIN INIT___; } "\\a" { put_utf8(0x0952); BEGIN INIT___; } "\\A" { put_utf8(0x093e); put_utf8(0x952); BEGIN INIT___; } "\\i" { put_utf8(0x093f); put_utf8(0x952); BEGIN INIT___; } "\\I" { put_utf8(0x0940); put_utf8(0x952); BEGIN INIT___; } "\\u" { put_utf8(0x0941); put_utf8(0x952); BEGIN INIT___; } "\\U" { put_utf8(0x0942); put_utf8(0x952); BEGIN INIT___; } "\\f" { put_utf8(0x0943); put_utf8(0x952); BEGIN INIT___; } "\\F" { put_utf8(0x0944); put_utf8(0x952); BEGIN INIT___; } "\\x" { put_utf8(0x0962); put_utf8(0x952); BEGIN INIT___; } "\\X" { put_utf8(0x0963); put_utf8(0x952); BEGIN INIT___; } "\\e" { put_utf8(0x0947); put_utf8(0x952); BEGIN INIT___; } "\\E" { put_utf8(0x0948); put_utf8(0x952); BEGIN INIT___; } "\\o" { put_utf8(0x094b); put_utf8(0x952); BEGIN INIT___; } "\\O" { put_utf8(0x094c); put_utf8(0x952); BEGIN INIT___; } "k"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0915); put_utf8(0x094d); BEGIN SKT; } "K"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0916); put_utf8(0x094d); BEGIN SKT; } "g"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0917); put_utf8(0x094d); BEGIN SKT; } "G"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0918); put_utf8(0x094d); BEGIN SKT; } "N"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0919); put_utf8(0x094d); BEGIN SKT; } "c"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x091a); put_utf8(0x094d); BEGIN SKT; } "C"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x091b); put_utf8(0x094d); BEGIN SKT; } "j"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x091c); put_utf8(0x094d); BEGIN SKT; } "J"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x091d); put_utf8(0x094d); BEGIN SKT; } "Y"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x091e); put_utf8(0x094d); BEGIN SKT; } "w"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x091f); put_utf8(0x094d); BEGIN SKT; } "W"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0920); put_utf8(0x094d); BEGIN SKT; } "q"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0921); put_utf8(0x094d); BEGIN SKT; } "Q"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0922); put_utf8(0x094d); BEGIN SKT; } "R"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0923); put_utf8(0x094d); BEGIN SKT; } "t"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0924); put_utf8(0x094d); BEGIN SKT; } "T"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0925); put_utf8(0x094d); BEGIN SKT; } "d"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0926); put_utf8(0x094d); BEGIN SKT; } "D"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0927); put_utf8(0x094d); BEGIN SKT; } "n"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0928); put_utf8(0x094d); BEGIN SKT; } "p"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x092a); put_utf8(0x094d); BEGIN SKT; } "P"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x092b); put_utf8(0x094d); BEGIN SKT; } "b"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x092c); put_utf8(0x094d); BEGIN SKT; } "B"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x092d); put_utf8(0x094d); BEGIN SKT; } "m"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x092e); put_utf8(0x094d); BEGIN SKT; } "y"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x092f); put_utf8(0x094d); BEGIN SKT; } "r"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0930); put_utf8(0x094d); BEGIN SKT; } "l"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0932); put_utf8(0x094d); BEGIN SKT; } "L"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0933); put_utf8(0x094d); BEGIN SKT; } "|"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0933); put_utf8(0x094d); put_utf8(0x0939); put_utf8(0x094d); BEGIN SKT; } "v"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0935); put_utf8(0x094d); BEGIN SKT; } "S"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0936); put_utf8(0x094d); BEGIN SKT; } "z"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0937); put_utf8(0x094d); BEGIN SKT; } "s"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0938); put_utf8(0x094d); BEGIN SKT; } "h"/[^aAiIuUfFxXeEoO^/\\] { put_utf8(0x0939); put_utf8(0x094d); BEGIN SKT; } "k" { put_utf8(0x0915); BEGIN SKT; } "K" { put_utf8(0x0916); BEGIN SKT; } "g" { put_utf8(0x0917); BEGIN SKT; } "G" { put_utf8(0x0918); BEGIN SKT; } "N" { put_utf8(0x0919); BEGIN SKT; } "c" { put_utf8(0x091a); BEGIN SKT; } "C" { put_utf8(0x091b); BEGIN SKT; } "j" { put_utf8(0x091c); BEGIN SKT; } "J" { put_utf8(0x091d); BEGIN SKT; } "Y" { put_utf8(0x091e); BEGIN SKT; } "w" { put_utf8(0x091f); BEGIN SKT; } "W" { put_utf8(0x0920); BEGIN SKT; } "q" { put_utf8(0x0921); BEGIN SKT; } "Q" { put_utf8(0x0922); BEGIN SKT; } "R" { put_utf8(0x0923); BEGIN SKT; } "t" { put_utf8(0x0924); BEGIN SKT; } "T" { put_utf8(0x0925); BEGIN SKT; } "d" { put_utf8(0x0926); BEGIN SKT; } "D" { put_utf8(0x0927); BEGIN SKT; } "n" { put_utf8(0x0928); BEGIN SKT; } // 0x0929 not used "p" { put_utf8(0x092a); BEGIN SKT; } "P" { put_utf8(0x092b); BEGIN SKT; } "b" { put_utf8(0x092c); BEGIN SKT; } "B" { put_utf8(0x092d); BEGIN SKT; } "m" { put_utf8(0x092e); BEGIN SKT; } "y" { put_utf8(0x092f); BEGIN SKT; } "r" { put_utf8(0x0930); BEGIN SKT; } // 0x0931 not used "l" { put_utf8(0x0932); BEGIN SKT; } "L" { put_utf8(0x0933); BEGIN SKT; } "|" { put_utf8(0x0933); put_utf8(0x094d); put_utf8(0x0939); BEGIN SKT; } "v" { put_utf8(0x0935); BEGIN SKT; } "S" { put_utf8(0x0936); BEGIN SKT; } "z" { put_utf8(0x0937); BEGIN SKT; } "s" { put_utf8(0x0938); BEGIN SKT; } "h" { put_utf8(0x0939); BEGIN SKT; } "M" { put_utf8(0x0902); } "H" { put_utf8(0x0903); } "'" { put_utf8(0x093d); } ":" { put_utf8(0x093d); } // ejf Feb 2, 2008 "." { put_utf8(0x0964); } ".." { put_utf8(0x0965); } "0" { put_utf8(0x0966); } "1" { put_utf8(0x0967); } "2" { put_utf8(0x0968); } "3" { put_utf8(0x0969); } "4" { put_utf8(0x096a); } "5" { put_utf8(0x096b); } "6" { put_utf8(0x096c); } "7" { put_utf8(0x096d); } "8" { put_utf8(0x096e); } "9" { put_utf8(0x096f); } " "|\t { ECHO; BEGIN INIT___; } \n { ECHO; fflush(stdout); BEGIN INIT___; } "/" { } // high pitch is not marked . { ECHO; } \n { ECHO; fflush(stdout); } %% void put_utf8(int in) { char out[7]; int count; int mask = 0x3f; if (in <= 0x7f) { count = 1; out[0] = in; } else if (in >= 0x80 && in <= 0x7ff) { count = 2; out[1] = (in & mask) | 0x80; out[0] = ((in >> 6) & mask) | (0xf << (8 - count)); /* 0xc0; */ } else if (in >= 0x800 && in <= 0xffff) { count = 3; out[2] = (in & mask) | 0x80; out[1] = ((in >> 6) & mask) | 0x80; out[0] = ((in >> 12) & mask) | (0xf << (8 - count)); /* 0xe0; */ } out[count] = '\0'; printf("%s", out); /* printf("%x %x\n", 0xc0, ((0x0f << 5) & 0xff)); */ }