1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
VOWEL [aeiouyAEIOUY]
UUOO (OO|UU|oo|uu)
HAT [aeoAEO]
MARKS ['`?~^]
DOT "d"
PAR "u"
SAC (sac|Sac)
HUY (huy|Huy)
HOI (hoi|Hoi)
NGA (nga|Nga)
NAN nan
%%
\\{MARKS}"{"{VOWEL}"}" {printf ("%c%c", *(yytext+3),*(yytext+1));}
\\{DOT}"{"{VOWEL}"}" {printf ("%c.", *(yytext+3));}
\\{PAR}"{"{VOWEL}"}" {printf ("%c(", *(yytext+3));}
\\(DD|dd)" " {printf ("%c%c", *(yytext+1), *(yytext+1));}
"{"\\{UUOO}"}" {printf ("%c%c", *(yytext+2), *(yytext+2));}
\\{SAC}"{"\\{MARKS}"{"{VOWEL}"}}" {printf ("%c%c'", *(yytext+8), *(yytext+6));}
\\{HUY}"{"\\{MARKS}"{"{VOWEL}"}}" {printf ("%c%c`", *(yytext+8), *(yytext+6));}
\\{HOI}"{"\\{MARKS}"{"{VOWEL}"}}" {printf ("%c%c?", *(yytext+8), *(yytext+6));}
\\{NGA}"{"\\{MARKS}"{"{VOWEL}"}}" {printf ("%c%c~", *(yytext+8), *(yytext+6));}
\\{NAN}"{"\\{MARKS}"{"{VOWEL}"}}" {printf ("%c%c.", *(yytext+8), *(yytext+6));}
\\{SAC}"{"\\{PAR}"{"{VOWEL}"}}" {printf ("%c('", *(yytext+8));}
\\{HUY}"{"\\{PAR}"{"{VOWEL}"}}" {printf ("%c(`", *(yytext+8));}
\\{HOI}"{"\\{PAR}"{"{VOWEL}"}}" {printf ("%c(?", *(yytext+8));}
\\{NGA}"{"\\{PAR}"{"{VOWEL}"}}" {printf ("%c(~", *(yytext+8));}
\\{NAN}"{"\\{PAR}"{"{VOWEL}"}}" {printf ("%c(.", *(yytext+8));}
\\{SAC}"{"\\{UUOO}"}" {printf ("%c%c'", *(yytext+6), *(yytext+6));}
\\{HUY}"{"\\{UUOO}"}" {printf ("%c%c`", *(yytext+6), *(yytext+6));}
\\{HOI}"{"\\{UUOO}"}" {printf ("%c%c?", *(yytext+6), *(yytext+6));}
\\{NGA}"{"\\{UUOO}"}" {printf ("%c%c~", *(yytext+6), *(yytext+6));}
\\{NAN}"{"\\{UUOO}"}" {printf ("%c%c.", *(yytext+6), *(yytext+6));}
\n {ECHO;}
. {ECHO;}
|