1 function FindWord(var cur : integer; var cat : integer; var index : integer; var word : Str16) : boolean;
2 var i, j, s, l, fs, fl : integer;
10 if ('A' <= Line[0]) and (Line[0] <= 'z') then
13 for s := cur to Length(Line) do
15 {
\90\94\8e\9a(
\96¼
\8e\8c)
\82©? }
16 if (('0' <= Line[s]) and (Line[s] <= '9')) or (('A' <= Line[s]) and (Line[s] <= 'z')) then
20 while (('0' <= Line[cur]) and (Line[cur] <= '9')) or (('A' <= Line[cur]) and (Line[cur] <= 'z')) do
22 word := word + Line[cur];
37 if Copy(Line, s, l) = d[i, j] then
57 if Copy(Line, s, l) = m[i, j] then
69 {
\8f\95\8e\8c\81u
\82É
\81v
\82©? }
71 if (l > fl) and (Copy(Line, s, l) = '
\82É') then
79 {
\8f\95\8e\8c\81u
\82Å
\81v
\82©? }
81 if (l > fl) and (Copy(Line, s, l) = '
\82Å') then
89 {
\92P
\8cê
\82ª
\8c©
\82Â
\82©
\82Á
\82½ }
98 {
\92P
\8cê
\82ª
\8c©
\82Â
\82©
\82ç
\82È
\82©
\82Á
\82½ }
103 procedure ParseJ(var verb : Str16; var noun1 : Str16; var prepos : Str16; var noun2 : Str16);
104 var cur, cat, index : integer;
114 if not FindWord(cur, cat, index, word) then
124 if not FindWord(cur, cat, index, word) then
140 if not FindWord(cur, cat, index, word) then
144 if (noun2 <> '') and (prepos = '') then
145 prepos := prep[index];
154 if not FindWord(cur, cat, index, word) then
159 prepos := prep[index];
164 procedure SayJ(var message : Str16);
168 i := Pos(d[31,1], Line);
172 message := Copy(Line, 1, i - 1);
173 if (message = '
\83P
\83\89\83q
\83\88\83`
\83~') or (message = '
\83P
\83\89\83q
\83\88\83`
\83~') or (message = '
\82¯
\82ç
\82Ð
\82æ
\82¿
\82Ý') or (message = '
\82¯
\82ç
\82Ð
\82æ
\82¿
\82Ý') then
174 message := 'nepo egassap'
175 else if message = '
\82±
\82ñ
\82É
\82¿
\82Í' then
177 else if message = '
\82³
\82æ
\82¤
\82È
\82ç' then
182 var message, verb, noun1, prepos, noun2 : Str16;
185 if message <> '' then
187 Line := 'say ' + message;
191 ParseJ(verb, noun1, prepos, noun2);
202 Line := verb + ' ' + noun1 + ' ' + prepos + ' ' + noun2;
208 Line := verb + ' ' + noun1;