Mercurial > ~dholland > hg > ag > index.cgi
comparison tests/agcl/oldagsrc/good/pgg24-3.c @ 0:13d2b8934445
Import AnaGram (near-)release tree into Mercurial.
author | David A. Holland |
---|---|
date | Sat, 22 Dec 2007 17:52:45 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:13d2b8934445 |
---|---|
1 /* | |
2 AnaGram Syntax Analyzer. | |
3 Copyright (c) Jerome T. Holland, 1989, 1990, 1991, 1992 | |
4 All Rights Reserved. | |
5 */ | |
6 #include HEADERS | |
7 #include STDLIB | |
8 #include STDIO | |
9 #include STRING | |
10 #include DATA | |
11 #include TREES | |
12 #include STK | |
13 #include CTYPE | |
14 #include ASSERT | |
15 #include SETJMP | |
16 #include PGG | |
17 #include MYALLOC | |
18 | |
19 /* | |
20 * AnaGram, A System for Syntax Directed Programming | |
21 * File generated by: ... | |
22 * | |
23 * AnaGram Parsing Engine | |
24 * Copyright 1993-2002 Parsifal Software. All Rights Reserved. | |
25 * | |
26 * This software is provided 'as-is', without any express or implied | |
27 * warranty. In no event will the authors be held liable for any damages | |
28 * arising from the use of this software. | |
29 * | |
30 * Permission is granted to anyone to use this software for any purpose, | |
31 * including commercial applications, and to alter it and redistribute it | |
32 * freely, subject to the following restrictions: | |
33 * | |
34 * 1. The origin of this software must not be misrepresented; you must not | |
35 * claim that you wrote the original software. If you use this software | |
36 * in a product, an acknowledgment in the product documentation would be | |
37 * appreciated but is not required. | |
38 * 2. Altered source versions must be plainly marked as such, and must not be | |
39 * misrepresented as being the original software. | |
40 * 3. This notice may not be removed or altered from any source distribution. | |
41 */ | |
42 | |
43 #ifndef PGG24-3_H | |
44 #include "pgg24-3.h" | |
45 #endif | |
46 | |
47 #ifndef PGG24-3_H | |
48 #error Mismatched header file | |
49 #endif | |
50 | |
51 #include <ctype.h> | |
52 #include <stdio.h> | |
53 | |
54 #define RULE_CONTEXT (&((PCB).cs[(PCB).ssx])) | |
55 #define ERROR_CONTEXT ((PCB).cs[(PCB).error_frame_ssx]) | |
56 #define CONTEXT ((PCB).cs[(PCB).ssx]) | |
57 | |
58 | |
59 #define CHANGE_REDUCTION(x) pgg_change_reduction(pgg_##x##_token) | |
60 int pgg_change_reduction(pgg_token_type); | |
61 | |
62 #define TOKEN_NAMES pgg_token_names | |
63 const char *const pgg_token_names[236] = { | |
64 "syntax definition", | |
65 "", | |
66 "\"->\"", | |
67 "", | |
68 "", | |
69 "", | |
70 "", | |
71 "','", | |
72 "", | |
73 "", | |
74 "", | |
75 "\"...\"", | |
76 "", | |
77 "'='", | |
78 "", | |
79 "'!'", | |
80 "", | |
81 "'{'", | |
82 "", | |
83 "'['", | |
84 "", | |
85 "'('", | |
86 "", | |
87 "'-'", | |
88 "", | |
89 "'+'", | |
90 "", | |
91 "']'", | |
92 "", | |
93 "'}'", | |
94 "", | |
95 "')'", | |
96 "", | |
97 "single quote", | |
98 "", | |
99 "'~'", | |
100 "", | |
101 "'|'", | |
102 "syntax definition", | |
103 "", | |
104 "", | |
105 "", | |
106 "", | |
107 "statement", | |
108 "", | |
109 "", | |
110 "eof", | |
111 "production", | |
112 "", | |
113 "left hand side", | |
114 "right hand side", | |
115 "", | |
116 "", | |
117 "", | |
118 "definition", | |
119 "embedded c", | |
120 "configuration section", | |
121 "token name list", | |
122 "type definition", | |
123 "", | |
124 "name", | |
125 "'$'", | |
126 "", | |
127 "", | |
128 "vp rule spec", | |
129 "", | |
130 "", | |
131 "reduction procedure", | |
132 "vp rules", | |
133 "grammar rule", | |
134 "", | |
135 "rule element", | |
136 "parameter name", | |
137 "c expression", | |
138 "';'", | |
139 "type name", | |
140 "", | |
141 "", | |
142 "", | |
143 "\"::\"", | |
144 "", | |
145 "", | |
146 "", | |
147 "", | |
148 "template field head", | |
149 "'>'", | |
150 "'<'", | |
151 "", | |
152 "", | |
153 "'*'", | |
154 "", | |
155 "", | |
156 "letter", | |
157 "", | |
158 "enum fix", | |
159 "\"enum\"", | |
160 "blank char", | |
161 "c comment", | |
162 "continuation", | |
163 "comment", | |
164 "", | |
165 "carriage return", | |
166 "", | |
167 "newline", | |
168 "", | |
169 "vertical space", | |
170 "\"//\"", | |
171 "", | |
172 "", | |
173 "", | |
174 "character", | |
175 "signed number", | |
176 "'^'", | |
177 "", | |
178 "char const", | |
179 "", | |
180 "", | |
181 "", | |
182 "decimal number", | |
183 "'0'", | |
184 "octal number", | |
185 "\"0x\"", | |
186 "\"0X\"", | |
187 "", | |
188 "hex number", | |
189 "", | |
190 "", | |
191 "", | |
192 "hex digit", | |
193 "", | |
194 "token", | |
195 "mid rule action", | |
196 "", | |
197 "virtual production", | |
198 "", | |
199 "", | |
200 "'&'", | |
201 "", | |
202 "", | |
203 "escape sequence", | |
204 "octal escape", | |
205 "", | |
206 "hex escape", | |
207 "character range", | |
208 "\"..\"", | |
209 "enum definition", | |
210 "enum statement", | |
211 "keyword string", | |
212 "keyword string head", | |
213 "string", | |
214 "double quote", | |
215 "", | |
216 "", | |
217 "", | |
218 "string char", | |
219 "simple string char", | |
220 "\"\\\\a\"", | |
221 "\"\\\\b\"", | |
222 "\"\\\\f\"", | |
223 "\"\\\\n\"", | |
224 "\"\\\\r\"", | |
225 "\"\\\\t\"", | |
226 "\"\\\\v\"", | |
227 "\"\\\\\\\\\"", | |
228 "\"\\\\?\"", | |
229 "\"\\\\\\'\"", | |
230 "\"\\\\\\\"\"", | |
231 "", | |
232 "backslash", | |
233 "", | |
234 "\"\\\\x\"", | |
235 "any digit", | |
236 "nonoctal digit", | |
237 "':'", | |
238 "", | |
239 "", | |
240 "configuration parameters", | |
241 "configuration parameter list", | |
242 "", | |
243 "configuration parameter", | |
244 "attribute statement", | |
245 "\"left\"", | |
246 "token list", | |
247 "\"right\"", | |
248 "\"nonassoc\"", | |
249 "\"sticky\"", | |
250 "\"subgrammar\"", | |
251 "\"hidden\"", | |
252 "", | |
253 "", | |
254 "\"disregard\"", | |
255 "\"lexeme\"", | |
256 "", | |
257 "\"distinguish\"", | |
258 "\"keywords\"", | |
259 "tokens", | |
260 "'\\?'", | |
261 "\"}...\"", | |
262 "\"]...\"", | |
263 "\"?...\"", | |
264 "\"}/...\"", | |
265 "\"]/...\"", | |
266 "embedded c head", | |
267 "", | |
268 "", | |
269 "", | |
270 "", | |
271 "c code first", | |
272 "", | |
273 "", | |
274 "c character constant", | |
275 "c string constant", | |
276 "", | |
277 "simple c char", | |
278 "", | |
279 "", | |
280 "", | |
281 "", | |
282 "\"\\\\\\n\"", | |
283 "", | |
284 "\"*/\"", | |
285 "\"/*\"", | |
286 "", | |
287 "c literal elem", | |
288 "", | |
289 "", | |
290 "", | |
291 "", | |
292 "", | |
293 "", | |
294 "", | |
295 "", | |
296 "", | |
297 "", | |
298 "", | |
299 "", | |
300 | |
301 }; | |
302 | |
303 | |
304 #line - "pgg24-3.syn" | |
305 int null_warning(int n) { | |
306 extern void warning_here(const char *); | |
307 if (n == 0) warning_here("Null character in keyword string"); | |
308 return n; | |
309 } | |
310 #line - "pgg24-3.c" | |
311 #line - "pgg24-3.syn" | |
312 pgg_pcb_type pgcb; | |
313 #define PCB pgcb | |
314 | |
315 #define PARSE_STACK_OVERFLOW parse_stack_overflow() | |
316 #define SYNTAX_ERROR log_syntax_error() | |
317 #define GET_CONTEXT CONTEXT.y = PCB.line, CONTEXT.x = PCB.column; | |
318 | |
319 #define REDUCTION_TOKEN_ERROR reduction_token_error() | |
320 | |
321 int save_case_sensitive; | |
322 | |
323 void reduction_token_error(void) { | |
324 assert(0); | |
325 } | |
326 | |
327 extern jmp_buf error_continuation; | |
328 extern char longjmp_msg[]; | |
329 | |
330 void parse_stack_overflow(void) { | |
331 sprintf(longjmp_msg, "Excessive recursion"); | |
332 longjmp(error_continuation,1); | |
333 } | |
334 | |
335 extern string_dict *cast_dict; | |
336 extern int character_seen; | |
337 extern int enum_base; | |
338 extern unsigned char *input_base; | |
339 extern int nest_comments; | |
340 extern int precedence_level; | |
341 extern int syntax_error_flag; | |
342 extern int case_sensitive; | |
343 extern int n_statements; | |
344 | |
345 void log_error_location(int,int); | |
346 void log_error_here(void); | |
347 void log_error(void); | |
348 | |
349 node make_or_node(node,node); | |
350 node make_and_node(node,node); | |
351 node make_minus_node(node,node); | |
352 node make_tilde_node(node); | |
353 node ss1(int); | |
354 node ss2(void); | |
355 node ss3(void); | |
356 | |
357 void acs(int); | |
358 void aws(int); | |
359 void atkn(int); | |
360 int copyoff(void); | |
361 int copyon(void); | |
362 int definition_1(node); | |
363 int definition_2(int); | |
364 int definition_3(int); | |
365 int form_element_1(node); | |
366 int form_spec_2(int, int); | |
367 int form1(void); | |
368 int form2(void); | |
369 int gp2(void); | |
370 int gp3(void); | |
371 void gp4(int); | |
372 int gp5(int); | |
373 int head_list_1(int); | |
374 int head_list_2(int); | |
375 static int head_list_3(int); | |
376 void ics(void); | |
377 int identify_node(node); | |
378 void init_reserve(int); | |
379 void iws(void); | |
380 int mid_line(int); | |
381 int new_cast_spec_1(void); | |
382 int new_cast_spec_2(void); | |
383 void new_reserve(void); | |
384 int null_warning(int); | |
385 /* void pf2(int, int, int); */ | |
386 void pf2x(int, int); | |
387 int pr3(int); | |
388 int pr4(int); | |
389 int proc_spec_4(int); | |
390 int proc_spec_5(void); | |
391 void production(int); | |
392 int range(int, int); | |
393 void scs(int); | |
394 static void set_prec(int,int); | |
395 /* | |
396 void suppress(void); | |
397 void suppress_all(void); | |
398 void suppress_except(void); | |
399 void suppress_initial(void); | |
400 */ | |
401 void sws(int); | |
402 void tp4(int); | |
403 int vp_form3(int); | |
404 int vp_s(void); | |
405 int vp_1(void); | |
406 int vp_2(void); | |
407 int vp_3(void); | |
408 int vp_4(void); | |
409 int vp_5(int); | |
410 int vp_6(int); | |
411 int vp_7(int); | |
412 int vp_8(int); | |
413 int vp_8a(int); | |
414 int vp_9(void); | |
415 int vp_10(void); | |
416 | |
417 /* | |
418 static int reserve(int pt) { | |
419 int key = map_token_number[vp_s()].key; | |
420 map_key_word[key].reserve = pt; | |
421 return pt; | |
422 } | |
423 */ | |
424 | |
425 /* | |
426 static void anomalous(void) { | |
427 map_token_number[vp_s()].anomalous = 1; | |
428 } | |
429 */ | |
430 | |
431 int *disregard_list = NULL; | |
432 int n_disregard_list = 0; | |
433 | |
434 void disregard(int tn) { | |
435 iws(); | |
436 if (n_disregard_list) { | |
437 int *p = disregard_list; | |
438 while (n_disregard_list--) aws(*p++); | |
439 free(disregard_list); | |
440 } | |
441 xws(tn); | |
442 disregard_list = build_list(); | |
443 n_disregard_list = fis(); | |
444 } | |
445 | |
446 extern tsd *syntax_errors; | |
447 | |
448 static void log_syntax_error(void) { | |
449 int eline = PCB.line, ecol = PCB.column; | |
450 int flag = PCB.error_frame_token == pgg_c_comment_token || | |
451 PCB.error_frame_token == pgg_embedded_c_token; | |
452 | |
453 reset_stk(); | |
454 if (flag && PCB.token_number == pgg_eof_token) { | |
455 eline = ERROR_CONTEXT.y; | |
456 ecol = ERROR_CONTEXT.x; | |
457 } | |
458 log_error_location(ecol,eline); | |
459 asprintf("%s in %s", | |
460 PCB.error_message,pgg_token_names[PCB.error_frame_token]); | |
461 log_error(); | |
462 syntax_error_flag++; | |
463 if (syntax_errors->nt < 50) return; | |
464 sss("Too many syntax errors, parse aborted"); | |
465 log_error(); | |
466 PCB.exit_flag = AG_SYNTAX_ERROR_CODE; | |
467 } | |
468 | |
469 static int head_list_3(int type) { | |
470 int i, n = tis(); | |
471 for (i = 0; i < n; i ++) { | |
472 int tn = list_base[i]; | |
473 token_number_map *tp = &map_token_number[tn]; | |
474 int ptt = tp->value_type; | |
475 if (ptt && ptt != type) { | |
476 log_error_here(); | |
477 asprintf("Type Redefinition of T%03d: ", tn); | |
478 atkn(tn); | |
479 log_error(); | |
480 } | |
481 tp->value_type = type; | |
482 if (ptt == 0 && tp->rp_arg && type == void_token_type) { | |
483 log_error_here(); | |
484 asprintf("Void token, %s, used as parameter", | |
485 dict_str(tkn_dict,tp->token_name)); | |
486 log_error(); | |
487 } | |
488 } | |
489 return type; | |
490 } | |
491 | |
492 static void set_prec(int left, int right){ | |
493 int n = tis(); | |
494 precedence_level++; | |
495 while (n--) { | |
496 int k = list_base[n]; | |
497 token_number_map *tp = &map_token_number[k]; | |
498 tp->left_associative = left; | |
499 tp->right_associative = right; | |
500 tp->precedence_level = precedence_level; | |
501 } | |
502 rws(); | |
503 } | |
504 | |
505 static void set_sticky(void){ | |
506 int n = tis(); | |
507 while (n--) { | |
508 int k = list_base[n]; | |
509 token_number_map *tp = &map_token_number[k]; | |
510 tp->sticky = 1; | |
511 } | |
512 rws(); | |
513 } | |
514 | |
515 static void set_subgrammar(void){ | |
516 int n = tis(); | |
517 while (n--) { | |
518 int k = list_base[n]; | |
519 token_number_map *tp = &map_token_number[k]; | |
520 tp->subgrammar = 1; | |
521 } | |
522 rws(); | |
523 } | |
524 | |
525 void set_hidden(void) { | |
526 int *lb = list_base; | |
527 int n = tis(); | |
528 while (n--) map_token_number[*lb++].fine_structure = 1; | |
529 rws(); | |
530 } | |
531 | |
532 void set_lexeme(void) { | |
533 int n = tis(); | |
534 while (n--) { | |
535 token_number_map *tp = &map_token_number[list_base[n]]; | |
536 /* tp->lexeme = tp->subgrammar = 1; */ | |
537 tp->lexeme = 1; | |
538 } | |
539 rws(); | |
540 } | |
541 | |
542 void parse(void) { | |
543 pgcb.pointer = input_base; | |
544 pgg(); | |
545 } | |
546 #line - "pgg24-3.c" | |
547 | |
548 #ifndef CONVERT_CASE | |
549 #define CONVERT_CASE(c) (c) | |
550 #endif | |
551 #ifndef TAB_SPACING | |
552 #define TAB_SPACING 8 | |
553 #endif | |
554 | |
555 #define ag_rp_1() (n_statements++) | |
556 | |
557 #define ag_rp_3(t) (production(t)) | |
558 | |
559 #define ag_rp_5(t) (production(t)) | |
560 | |
561 #define ag_rp_7(type) (iws(),type) | |
562 | |
563 #define ag_rp_8(type) (concat_list(),type) | |
564 | |
565 #define ag_rp_9() (n_statements++, 0) | |
566 | |
567 #define ag_rp_10(d) (n_statements++, head_list_3(d)) | |
568 | |
569 #define ag_rp_11(x) (sws(head_list_2(x))) | |
570 | |
571 #define ag_rp_12(x) (aws(head_list_2(x))) | |
572 | |
573 #define ag_rp_13() (0) | |
574 | |
575 #define ag_rp_14() (1) | |
576 | |
577 #define ag_rp_15() (ids(cast_dict),fis()) | |
578 | |
579 #define ag_rp_16(n) (sws(n)) | |
580 | |
581 #define ag_rp_17(n) (aws(n)) | |
582 | |
583 #define ag_rp_18(pn) (sws((iws(),vp_form3(pn)))) | |
584 | |
585 #define ag_rp_19(s) (vp_form3(s)) | |
586 | |
587 #define ag_rp_20(n) (sws(form_spec_2(form1(),n))) | |
588 | |
589 #define ag_rp_21(n) (sws(n)) | |
590 | |
591 #define ag_rp_22(n) (aws(n)) | |
592 | |
593 #define ag_rp_23(s) (form_spec_2(form2(),s)) | |
594 | |
595 #define ag_rp_24(e, p) (iws(),pf2x(e,p)) | |
596 | |
597 #define ag_rp_25(e, p) (pf2x(e,p)) | |
598 | |
599 #define ag_rp_26() (0) | |
600 | |
601 #define ag_rp_27() (proc_spec_4(0)) | |
602 | |
603 #define ag_rp_28() (proc_spec_4(1)) | |
604 | |
605 #define ag_rp_29() (concat_string()) | |
606 | |
607 #define ag_rp_30() (sss("::")) | |
608 | |
609 #define ag_rp_31() (concat_string()) | |
610 | |
611 #define ag_rp_32() (ass("::")) | |
612 | |
613 #define ag_rp_33() (concat_string()) | |
614 | |
615 #define ag_rp_34() (concat_string()) | |
616 | |
617 #define ag_rp_35() (acs('>'), concat_string()) | |
618 | |
619 #define ag_rp_36() (acs('<')) | |
620 | |
621 #define ag_rp_37() (acs(','), concat_string()) | |
622 | |
623 #define ag_rp_38() (scs('(')) | |
624 | |
625 #define ag_rp_39() (concat_string(), acs(')')) | |
626 | |
627 #define ag_rp_40() (sss(" *")) | |
628 | |
629 #define ag_rp_41() (concat_string()) | |
630 | |
631 #define ag_rp_42() (concat_string()) | |
632 | |
633 #define ag_rp_43(c) (scs(c)) | |
634 | |
635 #define ag_rp_44(c) (acs(c)) | |
636 | |
637 #define ag_rp_45(c) (acs(' '), acs(c)) | |
638 | |
639 #define ag_rp_46(c) (sss("enum "), acs(c)) | |
640 | |
641 #define ag_rp_47(c) (acs(c)) | |
642 | |
643 #define ag_rp_48(c) (acs(' '), acs(c)) | |
644 | |
645 #define ag_rp_49(x) (x & 0x1f) | |
646 | |
647 #define ag_rp_50(c) ((character_seen=1),c) | |
648 | |
649 #define ag_rp_51(s, n) (s*n) | |
650 | |
651 #define ag_rp_52() (1) | |
652 | |
653 #define ag_rp_53() (-1) | |
654 | |
655 #define ag_rp_54(n) (n) | |
656 | |
657 #define ag_rp_55(n) (n) | |
658 | |
659 #define ag_rp_56(d) (d - '0') | |
660 | |
661 #define ag_rp_57(n, d) (10*n + d - '0') | |
662 | |
663 #define ag_rp_58() (0) | |
664 | |
665 #define ag_rp_59(n, d) (8*n + d - '0') | |
666 | |
667 #define ag_rp_60(d) (d) | |
668 | |
669 #define ag_rp_61(n, d) (16*n + d) | |
670 | |
671 #define ag_rp_62(d) (d-'0') | |
672 | |
673 #define ag_rp_63(d) ((d&7)+9) | |
674 | |
675 #define ag_rp_64(p) (vp_8a(p)) | |
676 | |
677 #define ag_rp_65(n) (form_element_1(n)) | |
678 | |
679 #define ag_rp_66(u, i) (make_or_node(u,i)) | |
680 | |
681 #define ag_rp_67(u, i) (make_minus_node(u,i)) | |
682 | |
683 #define ag_rp_68(i, n) (make_and_node(i,n)) | |
684 | |
685 #define ag_rp_69(n) (make_tilde_node(n)) | |
686 | |
687 #define ag_rp_70(c) (case_sensitive ? (c) : toupper(c)) | |
688 | |
689 #define ag_rp_71() (ss3()) | |
690 | |
691 #define ag_rp_72(n) (ss1(n)) | |
692 | |
693 #define ag_rp_73() (ss2()) | |
694 | |
695 #define ag_rp_74(x) (x) | |
696 | |
697 #define ag_rp_75(l, r) ((character_seen=1),range(l,r)) | |
698 | |
699 #define ag_rp_76(l, r) (range(l,r)) | |
700 | |
701 #define ag_rp_77(n) (definition_1(n)) | |
702 | |
703 #define ag_rp_78(p) (definition_2(p)) | |
704 | |
705 #define ag_rp_79(p) (definition_2(vp_8a(p))) | |
706 | |
707 #define ag_rp_80() (definition_3(enum_base++)) | |
708 | |
709 #define ag_rp_81(n) (definition_3(enum_base = n), enum_base++) | |
710 | |
711 #define ag_rp_82() (ics()) | |
712 | |
713 #define ag_rp_83(n) (null_warning(n)) | |
714 | |
715 #define ag_rp_84() ('\a') | |
716 | |
717 #define ag_rp_85() ('\b') | |
718 | |
719 #define ag_rp_86() ('\f') | |
720 | |
721 #define ag_rp_87() ('\n') | |
722 | |
723 #define ag_rp_88() ('\r') | |
724 | |
725 #define ag_rp_89() ('\t') | |
726 | |
727 #define ag_rp_90() ('\v') | |
728 | |
729 #define ag_rp_91() ('\\') | |
730 | |
731 #define ag_rp_92() ('\?') | |
732 | |
733 #define ag_rp_93() ('\'') | |
734 | |
735 #define ag_rp_94() ('"') | |
736 | |
737 #define ag_rp_95(n) (n&7) | |
738 | |
739 #define ag_rp_96(n, d) (n*8 + (d&7)) | |
740 | |
741 #define ag_rp_97(n, d) (n*8 + (d&7)) | |
742 | |
743 #define ag_rp_98(x) (x) | |
744 | |
745 #define ag_rp_99(c) (acs(c)) | |
746 | |
747 #define ag_rp_100(c) (acs(c)) | |
748 | |
749 #define ag_rp_101(c) (acs(c)) | |
750 | |
751 #define ag_rp_102(c) (acs(c)) | |
752 | |
753 #define ag_rp_103(c) (acs(c)) | |
754 | |
755 #define ag_rp_104(c) (acs(null_warning(c))) | |
756 | |
757 #define ag_rp_105(c) (acs(null_warning(c))) | |
758 | |
759 #define ag_rp_106(c) (acs(null_warning(c))) | |
760 | |
761 #define ag_rp_107(c) (acs(null_warning(c))) | |
762 | |
763 #define ag_rp_108() (0) | |
764 | |
765 #define ag_rp_109() (ids(cvar_dict),fis()) | |
766 | |
767 #define ag_rp_110(c) (scs(c)) | |
768 | |
769 #define ag_rp_111(c) (acs(c)) | |
770 | |
771 #define ag_rp_112() (gp4(1)) | |
772 | |
773 #define ag_rp_113() (gp4(0)) | |
774 | |
775 #define ag_rp_114() (gp2()) | |
776 | |
777 #define ag_rp_115() (gp3()) | |
778 | |
779 #define ag_rp_116() (gp3()) | |
780 | |
781 #define ag_rp_117(n) (gp5(n)) | |
782 | |
783 #define ag_rp_118() (set_prec(1,0)) | |
784 | |
785 #define ag_rp_119() (set_prec(0,1)) | |
786 | |
787 #define ag_rp_120() (set_prec(0,0)) | |
788 | |
789 #define ag_rp_121() (set_sticky()) | |
790 | |
791 #define ag_rp_122() (set_subgrammar()) | |
792 | |
793 #define ag_rp_123() (set_hidden()) | |
794 | |
795 #define ag_rp_124() (new_reserve()) | |
796 | |
797 #define ag_rp_125(t) (disregard(t)) | |
798 | |
799 #define ag_rp_126() (set_lexeme()) | |
800 | |
801 #define ag_rp_127(n) (init_reserve(identify_node(n))) | |
802 | |
803 #define ag_rp_128(n) (aws(identify_node(n))) | |
804 | |
805 #define ag_rp_129(t) (sws(t)) | |
806 | |
807 #define ag_rp_130(t) (aws(t)) | |
808 | |
809 #define ag_rp_131() (vp_s()) | |
810 | |
811 #define ag_rp_132() (vp_5(vp_s())) | |
812 | |
813 #define ag_rp_133() (vp_1()) | |
814 | |
815 #define ag_rp_134() (vp_2()) | |
816 | |
817 #define ag_rp_135() (vp_3()) | |
818 | |
819 #define ag_rp_136() (vp_4()) | |
820 | |
821 #define ag_rp_137(n) (vp_5(form_element_1(n))) | |
822 | |
823 #define ag_rp_138(n) (vp_6(form_element_1(n))) | |
824 | |
825 #define ag_rp_139(n) (vp_7(form_element_1(n))) | |
826 | |
827 #define ag_rp_140() (vp_9()) | |
828 | |
829 #define ag_rp_141() (vp_10()) | |
830 | |
831 #define ag_rp_142() (mid_line(proc_spec_4(0))) | |
832 | |
833 #define ag_rp_143() (mid_line(proc_spec_4(1))) | |
834 | |
835 #define ag_rp_144() (copyon()) | |
836 | |
837 #define ag_rp_145() (copyoff()) | |
838 | |
839 #define ag_rp_146() (copyoff()) | |
840 | |
841 #define ag_rp_147() (copyon()) | |
842 | |
843 #define ag_rp_148() (copyoff()) | |
844 | |
845 static void near ag_rp_149(void) { | |
846 #line - "pgg24-3.syn" | |
847 if (nest_comments) PCB.reduction_token = pgg_c_comment_head_token; | |
848 #line - "pgg24-3.c" | |
849 } | |
850 | |
851 | |
852 #define READ_COUNTS | |
853 #define WRITE_COUNTS | |
854 #undef V | |
855 #define V(i,t) (*t (&(PCB).vs[(PCB).ssx + i])) | |
856 #undef VS | |
857 #define VS(i) (PCB).vs[(PCB).ssx + i] | |
858 | |
859 #ifndef GET_CONTEXT | |
860 #define GET_CONTEXT CONTEXT = (PCB).input_context | |
861 #endif | |
862 | |
863 typedef enum { | |
864 ag_action_1, | |
865 ag_action_2, | |
866 ag_action_3, | |
867 ag_action_4, | |
868 ag_action_5, | |
869 ag_action_6, | |
870 ag_action_7, | |
871 ag_action_8, | |
872 ag_action_9, | |
873 ag_action_10, | |
874 ag_action_11, | |
875 ag_action_12 | |
876 } ag_parser_action; | |
877 | |
878 | |
879 #ifndef NULL_VALUE_INITIALIZER | |
880 #define NULL_VALUE_INITIALIZER = { 0 } | |
881 #endif | |
882 | |
883 static pgg_vs_type const ag_null_value NULL_VALUE_INITIALIZER; | |
884 | |
885 static const unsigned char ag_rpx[] = { | |
886 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, | |
887 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 3, 1, | |
888 4, 0, 5, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 11, 12, 13, | |
889 0, 14, 15, 0, 0, 0, 16, 17, 18, 0, 19, 20, 21, 22, 23, 24, 25, 0, | |
890 0, 0, 0, 26, 0, 27, 28, 29, 30, 0, 0, 31, 32, 33, 34, 35, 36, 37, | |
891 0, 38, 0, 39, 40, 41, 42, 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, | |
892 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, | |
893 47, 48, 0, 0, 49, 50, 0, 51, 0, 0, 52, 53, 54, 55, 56, 57, 58, 59, | |
894 60, 0, 61, 62, 0, 0, 63, 64, 0, 65, 0, 66, 67, 0, 0, 0, 0, 68, | |
895 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 0, 0, 0, 0, 0, 0, 79, 0, | |
896 0, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 0, 0, | |
897 95, 96, 97, 98, 99,100,101,102,103,104,105,106,107,108, 0, 0, 0, 0, | |
898 0, 0, 0,109,110,111,112,113,114, 0,115,116,117,118,119,120,121, 0, | |
899 122,123, 0, 0, 0, 0,124,125, 0,126,127,128,129,130,131,132,133,134, | |
900 135,136,137,138,139,140, 0, 0, 0, 0, 0, 0,141,142,143, 0, 0, 0, | |
901 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,144,145, 0, 0, 0, 0, 0, 0, | |
902 0, 0, 0, 0,146 | |
903 }; | |
904 | |
905 static const unsigned char ag_key_itt[] = { | |
906 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
907 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, | |
908 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
909 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
910 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
911 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
912 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
913 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
914 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
915 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
916 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
917 0 | |
918 }; | |
919 | |
920 static const unsigned short ag_key_pt[] = { | |
921 0, 11, 0,144,0 | |
922 }; | |
923 | |
924 static const unsigned char ag_key_ch[] = { | |
925 0, 42, 47,255, 47,255, 42, 47,255, 46,255, 46,255, 42, 47,255, 88,120, | |
926 255, 46, 47,255,114,116,255,115,255,105,255,102,120,255,101,255,116,117, | |
927 255, 46, 47,255, 45, 46, 47, 48, 58, 63, 93,100,101,104,108,110,114,115, | |
928 125,255, 47,255, 42, 47,255,114,116,255,115,255,105,255,102,120,255,101, | |
929 255,116,117,255, 47,100,101,104,108,110,114,115,255, 42, 47,255, 88,120, | |
930 255, 47, 48, 58,255, 42, 47,255, 46, 47,255, 46, 47,255, 45, 46, 47, 58, | |
931 63, 93,125,255, 58,255, 45, 47,255, 42, 47,255, 88,120,255, 47, 48, 58, | |
932 92,125,255, 47,255, 47, 58,255,114,116,255,115,255,105,255,102,120,255, | |
933 101,255,116,117,255, 47,100,101,104,108,110,114,115,255, 42, 47,255, 88, | |
934 120,255, 47, 48, 58, 92,255, 88,120,255, 48,255, 42, 47,255, 45, 47,255, | |
935 42, 47,255, 88,120,255, 47, 48,255, 88,120,255, 47, 48,255, 88,120,255, | |
936 47, 48, 58, 92,125,255, 47, 58,255,114,116,255,115,255,105,255,102,120, | |
937 255,101,255,116,117,255,100,101,104,108,110,114,115,255, 42, 47,255, 46, | |
938 47,255, 46, 47,255, 47, 93,125,255, 42, 47,255, 47, 92,255, 92,255, 42, | |
939 47,255, 88,120,255, 47, 48,125,255, 34, 39, 63, 92, 97, 98,102,110,114, | |
940 116,118,120,255, 92,255, 88,120,255, 48,125,255, 46, 47,255, 46, 47,255, | |
941 47, 93,125,255, 46,255, 46,255, 46, 47,255, 46, 47,255, 46, 47, 63, 93, | |
942 125,255, 46, 47,255, 46, 47,255, 46, 47, 63, 93,125,255, 46, 47, 63,255, | |
943 46, 47,255, 46, 47,255, 93,125,255, 46, 47,255, 93,255, 46, 47,255,125, | |
944 255,125,255, 46,255, 46,255, 42, 47,255, 46, 47,255, 46, 47,255, 46, 47, | |
945 63, 93,125,255, 47,107,255, 88,120,255, 47, 48,255, 88,120,255, 48, 58, | |
946 255, 47, 92,255, 42, 47,255, 46, 47,255, 46, 47,255, 46, 47, 63, 93,125, | |
947 255 | |
948 }; | |
949 | |
950 static const unsigned char ag_key_act[] = { | |
951 0,0,0,4,2,4,3,3,4,5,4,6,4,0,0,4,0,0,4,3,3,4,3,3,4,2,4,2,4,3,3,4,2,4,3, | |
952 3,4,3,3,4,3,2,2,2,3,3,2,2,3,3,2,3,3,2,2,4,3,4,0,0,4,3,3,4,2,4,2,4,3,3, | |
953 4,2,4,3,3,4,2,2,3,3,2,3,3,2,4,0,0,4,0,0,4,2,2,3,4,0,0,4,3,3,4,3,3,4,3, | |
954 7,2,3,3,2,2,4,3,4,3,3,4,0,0,4,0,0,4,2,2,3,3,3,4,3,4,3,3,4,3,3,4,2,4,2, | |
955 4,3,3,4,2,4,3,3,4,3,2,3,3,2,3,3,2,4,0,0,4,0,0,4,2,2,3,3,4,0,0,4,2,4,0, | |
956 0,4,3,2,4,0,0,4,0,0,4,2,2,4,0,0,4,3,2,4,0,0,4,3,2,3,3,3,4,3,3,4,3,3,4, | |
957 2,4,2,4,3,3,4,2,4,3,3,4,2,3,3,2,3,3,2,4,0,0,4,3,3,4,3,3,4,2,2,2,4,0,0, | |
958 4,2,3,4,3,4,0,0,4,0,0,4,2,2,3,4,0,0,0,0,0,0,0,0,0,0,0,0,4,2,4,0,0,4,2, | |
959 3,4,3,3,4,3,3,4,3,2,2,4,5,4,6,4,3,3,4,3,3,4,2,3,3,2,2,4,3,3,4,3,3,4,7, | |
960 3,3,2,2,4,7,3,3,4,3,3,4,3,3,4,2,2,4,3,3,4,2,4,3,3,4,2,4,3,4,5,4,6,4,0, | |
961 0,4,3,3,4,3,3,4,2,2,3,2,2,4,3,3,4,0,0,4,3,2,4,0,0,4,2,3,4,3,3,4,0,0,4, | |
962 3,3,4,3,3,4,7,2,3,2,2,4 | |
963 }; | |
964 | |
965 static const unsigned char ag_key_parm[] = { | |
966 0,221,106, 0, 0, 0,220,221, 0, 0, 0, 2, 0,221,106, 0,122,121, | |
967 0,198,201, 0,190,193, 0, 0, 0, 0, 0,181,191, 0, 0, 0,185,186, | |
968 0,197,200, 0, 2, 0, 0, 0, 79,199, 0, 0, 95,187, 0,184,183, 0, | |
969 0, 0,106, 0,221,106, 0,190,193, 0, 0, 0, 0, 0,181,191, 0, 0, | |
970 0,185,186, 0, 0, 0, 95,187, 0,184,183, 0, 0,221,106, 0,122,121, | |
971 0, 0, 0, 79, 0,221,106, 0,198,201, 0,197,200, 0, 2, 0, 0, 79, | |
972 199, 0, 0, 0, 79, 0, 2,106, 0,221,106, 0,122,121, 0, 0, 0, 79, | |
973 218,197, 0,221, 0,106, 79, 0,190,193, 0, 0, 0, 0, 0,181,191, 0, | |
974 0, 0,185,186, 0,106, 0, 95,187, 0,184,183, 0, 0,221,106, 0,122, | |
975 121, 0, 0, 0, 79,218, 0,122,121, 0, 0, 0,221,106, 0, 2, 0, 0, | |
976 221,106, 0,122,121, 0, 0, 0, 0,122,121, 0,106, 0, 0,122,121, 0, | |
977 221, 0, 79,218,197, 0,221, 79, 0,190,193, 0, 0, 0, 0, 0,181,191, | |
978 0, 0, 0,185,186, 0, 0, 95,187, 0,184,183, 0, 0,221,106, 0,198, | |
979 201, 0,197,200, 0, 0, 0, 0, 0,221,106, 0, 0,218, 0,218, 0,221, | |
980 106, 0,122,121, 0, 0, 0,197, 0,166,165,164,163,156,157,158,159,160, | |
981 161,162,170, 0, 0, 0,122,121, 0, 0,197, 0,198,201, 0,197,200, 0, | |
982 106, 0, 0, 0, 0, 0, 2, 0,198,201, 0,197,200, 0, 0,106,199, 0, | |
983 0, 0,198,201, 0,197,200, 0, 0,106,199, 0, 0, 0, 0,106,199, 0, | |
984 198,201, 0,197,200, 0, 0, 0, 0,198,201, 0, 0, 0,197,200, 0, 0, | |
985 0,197, 0, 0, 0, 2, 0,221,106, 0,198,201, 0,197,200, 0, 0, 0, | |
986 199, 0, 0, 0,221,194, 0,122,121, 0,221, 0, 0,122,121, 0, 0, 79, | |
987 0,221,218, 0,221,106, 0,198,201, 0,197,200, 0, 0, 0,199, 0, 0, | |
988 0 | |
989 }; | |
990 | |
991 static const unsigned short ag_key_jmp[] = { | |
992 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, | |
993 0, 12, 15, 0, 19, 25, 0, 22, 0, 25, 0, 43, 45, 0, 29, 0, 62, 67, | |
994 0, 76, 79, 0, 4, 11, 13, 16, 6, 8, 19, 27, 33, 37, 32, 49, 57, 34, | |
995 37, 0, 83, 0, 0, 0, 0, 85, 91, 0, 61, 0, 64, 0,109,111, 0, 68, | |
996 0,128,133, 0, 58, 66, 99,103, 71,115,123, 73, 0, 0, 0, 0, 0, 0, | |
997 0, 85, 88,142, 0, 0, 0, 0,155,158, 0,162,165, 0,144,146, 95,149, | |
998 151, 98,101, 0,169, 0,171,173, 0, 0, 0, 0, 0, 0, 0,117,120,175, | |
999 177,179, 0,183, 0,185,187, 0,191,197, 0,134, 0,137, 0,215,217, 0, | |
1000 141, 0,234,239, 0,189,139,205,209,144,221,229,146, 0, 0, 0, 0, 0, | |
1001 0, 0,158,161,248,250, 0, 0, 0, 0,169, 0, 0, 0, 0,252,174, 0, | |
1002 0, 0, 0, 0, 0, 0,180,183, 0, 0, 0, 0,254,189, 0, 0, 0, 0, | |
1003 256,195,258,260,262, 0,266,268, 0,270,276, 0,207, 0,210, 0,294,296, | |
1004 0,214, 0,313,318, 0,212,284,288,217,300,308,219, 0, 0, 0, 0,327, | |
1005 330, 0,334,337, 0,230,233,236, 0, 0, 0, 0,243,341, 0,343, 0, 0, | |
1006 0, 0, 0, 0, 0,251,254,345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
1007 0, 0, 0, 0,261, 0, 0, 0, 0,276,349, 0,355,358, 0,362,365, 0, | |
1008 353,282,285, 0, 0, 0,292, 0,375,378, 0,382,385, 0,294,369,371,296, | |
1009 299, 0,398,401, 0,405,408, 0,389,392,394,308,311, 0,412,415,417, 0, | |
1010 421,424, 0,428,431, 0,324,327, 0,435,438, 0,333, 0,442,445, 0,338, | |
1011 0,449, 0, 0, 0,345, 0, 0, 0, 0,457,460, 0,464,467, 0,347,349, | |
1012 453,352,355, 0,471,473, 0, 0, 0, 0,481,367, 0, 0, 0, 0,373,483, | |
1013 0,485,487, 0, 0, 0, 0,496,499, 0,503,506, 0,489,382,492,385,388, | |
1014 0 | |
1015 }; | |
1016 | |
1017 static const unsigned short ag_key_index[] = { | |
1018 4, 6, 40, 56, 0, 0, 0, 76, 0, 0, 0, 0, 0, 91, 4,104,112, 76, | |
1019 4,114, 0,114,114, 56, 56, 0, 0, 0, 0, 0,123, 0, 4,104,129,131, | |
1020 0,149, 0, 0, 0, 0, 0, 0, 4, 0,164,172,177,114,114,186, 0,186, | |
1021 192, 4,177, 56, 56,198,129,129, 0,204,112, 56, 4,222,239, 0, 0, 0, | |
1022 0, 0, 4,239,246,249,186,257,274,172,279,288,186,186,172, 0,274,186, | |
1023 172,302,172,314,320,314,288, 56,249, 56,186,172, 56,198, 0,129, 4, 56, | |
1024 0, 56, 0,129,129,129, 56, 56,129,129,129,129,129,129, 4,129, 0, 56, | |
1025 56, 0, 0, 0, 4,249, 0, 0, 0,274,274,274,274,274,330,336,341,343, | |
1026 343,239, 0,358,358,358,358, 0, 0,186,186,239,239,239,172,172, 4,172, | |
1027 0, 0, 0,204, 4,364,129,370, 0, 0,172, 0, 4, 0,129,376, 76, 0, | |
1028 4, 0, 0,379,239,274,239,239,239,172,239,239,358,358,274,358,391,172, | |
1029 172,314,314, 0,288,239,129,172, 56, 56, 0, 0, 0,274,239,129, 56,172, | |
1030 0,172,172, 56 | |
1031 }; | |
1032 | |
1033 static const unsigned char ag_key_ends[] = { | |
1034 47,0, 42,0, 62,0, 58,0, 46,46,46,0, 46,46,0, 46,46,46,0, | |
1035 101,103,97,114,100,0, 105,110,103,117,105,115,104,0, 110,117,109,0, | |
1036 105,100,100,101,110,0, 116,0, 101,109,101,0, | |
1037 111,110,97,115,115,111,99,0, 105,103,104,116,0, 105,99,107,121,0, | |
1038 98,103,114,97,109,109,97,114,0, 46,46,0, 46,46,46,0, 47,0, | |
1039 101,103,97,114,100,0, 105,110,103,117,105,115,104,0, 110,117,109,0, | |
1040 105,100,100,101,110,0, 116,0, 101,109,101,0, | |
1041 111,110,97,115,115,111,99,0, 105,103,104,116,0, 105,99,107,121,0, | |
1042 98,103,114,97,109,109,97,114,0, 58,0, 62,0, 46,46,0, 58,0, | |
1043 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 58,0, | |
1044 62,0, 47,0, 58,0, 10,0, 46,46,46,0, 42,0, 47,0, 58,0, 47,0, | |
1045 101,103,97,114,100,0, 105,110,103,117,105,115,104,0, 110,117,109,0, | |
1046 105,100,100,101,110,0, 116,0, 101,109,101,0, | |
1047 111,110,97,115,115,111,99,0, 105,103,104,116,0, 105,99,107,121,0, | |
1048 98,103,114,97,109,109,97,114,0, 58,0, 10,0, 62,0, 47,0, 42,0, | |
1049 58,0, 10,0, 46,46,46,0, 42,0, 58,0, 101,103,97,114,100,0, | |
1050 105,110,103,117,105,115,104,0, 110,117,109,0, 105,100,100,101,110,0, | |
1051 116,0, 101,109,101,0, 111,110,97,115,115,111,99,0, 105,103,104,116,0, | |
1052 105,99,107,121,0, 98,103,114,97,109,109,97,114,0, 46,46,0, | |
1053 46,46,46,0, 46,46,0, 46,46,46,0, 10,0, 10,0, 46,46,46,0, | |
1054 46,46,46,0, 47,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, | |
1055 47,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, | |
1056 46,46,0, 47,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, | |
1057 46,46,46,0, 46,46,0, 47,0, 46,46,46,0, 46,46,0, 46,46,46,0, | |
1058 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, | |
1059 46,46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, | |
1060 46,46,46,0, 42,0, 101,121,119,111,114,100,115,0, 42,0, 58,0, | |
1061 42,0, 10,0, 46,46,0, 46,46,46,0, 46,46,0, 46,46,46,0, 46,46,0, | |
1062 46,46,46,0, | |
1063 }; | |
1064 | |
1065 #define AG_TCV(x) ag_tcv[(x)] | |
1066 | |
1067 static const unsigned char ag_tcv[] = { | |
1068 46,234,234,234,234,234,234,234,234, 96,103,105,105,101,234,234,234,234, | |
1069 234,234,234,234,234,234,234,234, 46,234,234,234,234,234, 96, 15,150,235, | |
1070 61,235,136, 33, 21, 31, 89, 25, 7, 23,235,235,119,232,232,232,232,232, | |
1071 232,232,233,233,173, 74, 86, 13, 85,196,235,129,129,129,129,129,129,231, | |
1072 231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231,231, | |
1073 231, 19,168, 27,112,231,235,129,129,129,129,129,129,231,231,231,231,231, | |
1074 231,231,231,231,231,231,231,231,231,231,231,231,231,231,231, 17, 37, 29, | |
1075 35,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, | |
1076 234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, | |
1077 234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, | |
1078 234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, | |
1079 234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, | |
1080 234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, | |
1081 234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234,234, | |
1082 234,234,234,234 | |
1083 }; | |
1084 | |
1085 #ifndef SYNTAX_ERROR | |
1086 #define SYNTAX_ERROR fprintf(stderr,"%s, line %d, column %d\n", \ | |
1087 (PCB).error_message, (PCB).line, (PCB).column) | |
1088 #endif | |
1089 | |
1090 #ifndef FIRST_LINE | |
1091 #define FIRST_LINE 1 | |
1092 #endif | |
1093 | |
1094 #ifndef FIRST_COLUMN | |
1095 #define FIRST_COLUMN 1 | |
1096 #endif | |
1097 | |
1098 #ifndef PARSER_STACK_OVERFLOW | |
1099 #define PARSER_STACK_OVERFLOW {fprintf(stderr, \ | |
1100 "\nParser stack overflow, line %d, column %d\n",\ | |
1101 (PCB).line, (PCB).column);} | |
1102 #endif | |
1103 | |
1104 #ifndef REDUCTION_TOKEN_ERROR | |
1105 #define REDUCTION_TOKEN_ERROR {fprintf(stderr, \ | |
1106 "\nReduction token error, line %d, column %d\n", \ | |
1107 (PCB).line, (PCB).column);} | |
1108 #endif | |
1109 | |
1110 | |
1111 #ifndef INPUT_CODE | |
1112 #define INPUT_CODE(T) (T) | |
1113 #endif | |
1114 | |
1115 typedef enum | |
1116 {ag_accept_key, ag_set_key, ag_jmp_key, ag_end_key, ag_no_match_key, | |
1117 ag_cf_accept_key, ag_cf_set_key, ag_cf_end_key} key_words; | |
1118 | |
1119 static void near ag_get_key_word(int ag_k) { | |
1120 int ag_save = (int) ((PCB).la_ptr - (PCB).pointer); | |
1121 const unsigned char *ag_p; | |
1122 int ag_ch; | |
1123 while (1) { | |
1124 switch (ag_key_act[ag_k]) { | |
1125 case ag_cf_end_key: { | |
1126 const unsigned char *sp = ag_key_ends + ag_key_jmp[ag_k]; | |
1127 do { | |
1128 if ((ag_ch = *sp++) == 0) { | |
1129 int ag_k1 = ag_key_parm[ag_k]; | |
1130 int ag_k2 = ag_key_pt[ag_k1]; | |
1131 if (ag_key_itt[ag_k2 + CONVERT_CASE(*(PCB).la_ptr)]) goto ag_fail; | |
1132 (PCB).token_number = (pgg_token_type) ag_key_pt[ag_k1 + 1]; | |
1133 return; | |
1134 } | |
1135 } while (CONVERT_CASE(*(PCB).la_ptr++) == ag_ch); | |
1136 goto ag_fail; | |
1137 } | |
1138 case ag_end_key: { | |
1139 const unsigned char *sp = ag_key_ends + ag_key_jmp[ag_k]; | |
1140 do { | |
1141 if ((ag_ch = *sp++) == 0) { | |
1142 (PCB).token_number = (pgg_token_type) ag_key_parm[ag_k]; | |
1143 return; | |
1144 } | |
1145 } while (CONVERT_CASE(*(PCB).la_ptr++) == ag_ch); | |
1146 } | |
1147 case ag_no_match_key: | |
1148 ag_fail: | |
1149 (PCB).la_ptr = (PCB).pointer + ag_save; | |
1150 return; | |
1151 case ag_cf_set_key: { | |
1152 int ag_k1 = ag_key_parm[ag_k]; | |
1153 int ag_k2 = ag_key_pt[ag_k1]; | |
1154 ag_k = ag_key_jmp[ag_k]; | |
1155 if (ag_key_itt[ag_k2 + CONVERT_CASE(*(PCB).la_ptr)]) break; | |
1156 ag_save = (int) ((PCB).la_ptr - (PCB).pointer); | |
1157 (PCB).token_number = (pgg_token_type) ag_key_pt[ag_k1+1]; | |
1158 break; | |
1159 } | |
1160 case ag_set_key: | |
1161 ag_save = (int) ((PCB).la_ptr - (PCB).pointer); | |
1162 (PCB).token_number = (pgg_token_type) ag_key_parm[ag_k]; | |
1163 case ag_jmp_key: | |
1164 ag_k = ag_key_jmp[ag_k]; | |
1165 break; | |
1166 case ag_accept_key: | |
1167 (PCB).token_number = (pgg_token_type) ag_key_parm[ag_k]; | |
1168 return; | |
1169 case ag_cf_accept_key: { | |
1170 int ag_k1 = ag_key_parm[ag_k]; | |
1171 int ag_k2 = ag_key_pt[ag_k1]; | |
1172 if (ag_key_itt[ag_k2 + CONVERT_CASE(*(PCB).la_ptr)]) | |
1173 (PCB).la_ptr = (PCB).pointer + ag_save; | |
1174 else (PCB).token_number = (pgg_token_type) ag_key_pt[ag_k1+1]; | |
1175 return; | |
1176 } | |
1177 } | |
1178 ag_ch = CONVERT_CASE(*(PCB).la_ptr++); | |
1179 ag_p = &ag_key_ch[ag_k]; | |
1180 if (ag_ch <= 255) while (*ag_p < ag_ch) ag_p++; | |
1181 if (ag_ch > 255 || *ag_p != ag_ch) { | |
1182 (PCB).la_ptr = (PCB).pointer + ag_save; | |
1183 return; | |
1184 } | |
1185 ag_k = (int) (ag_p - ag_key_ch); | |
1186 } | |
1187 } | |
1188 | |
1189 | |
1190 #ifndef AG_NEWLINE | |
1191 #define AG_NEWLINE 10 | |
1192 #endif | |
1193 | |
1194 #ifndef AG_RETURN | |
1195 #define AG_RETURN 13 | |
1196 #endif | |
1197 | |
1198 #ifndef AG_FORMFEED | |
1199 #define AG_FORMFEED 12 | |
1200 #endif | |
1201 | |
1202 #ifndef AG_TABCHAR | |
1203 #define AG_TABCHAR 9 | |
1204 #endif | |
1205 | |
1206 static void near ag_track(void) { | |
1207 int ag_k = (int) ((PCB).la_ptr - (PCB).pointer); | |
1208 while (ag_k--) { | |
1209 switch (*(PCB).pointer++) { | |
1210 case AG_NEWLINE: | |
1211 (PCB).column = 1, (PCB).line++; | |
1212 case AG_RETURN: | |
1213 case AG_FORMFEED: | |
1214 break; | |
1215 case AG_TABCHAR: | |
1216 (PCB).column += (TAB_SPACING) - ((PCB).column - 1) % (TAB_SPACING); | |
1217 break; | |
1218 default: | |
1219 (PCB).column++; | |
1220 } | |
1221 } | |
1222 } | |
1223 | |
1224 | |
1225 static void near ag_prot(void) { | |
1226 int ag_k; | |
1227 ag_k = 53 - ++(PCB).btsx; | |
1228 if (ag_k <= (PCB).ssx) { | |
1229 (PCB).exit_flag = AG_STACK_ERROR_CODE; | |
1230 PARSER_STACK_OVERFLOW; | |
1231 return; | |
1232 } | |
1233 (PCB).bts[(PCB).btsx] = (PCB).sn; | |
1234 (PCB).bts[ag_k] = (PCB).ssx; | |
1235 (PCB).vs[ag_k] = (PCB).vs[(PCB).ssx]; | |
1236 (PCB).ss[ag_k] = (PCB).ss[(PCB).ssx]; | |
1237 (PCB).cs[ag_k] = (PCB).cs[(PCB).ssx]; | |
1238 } | |
1239 | |
1240 static void near ag_undo(void) { | |
1241 if ((PCB).drt == -1) return; | |
1242 while ((PCB).btsx) { | |
1243 int ag_k = 53 - (PCB).btsx; | |
1244 (PCB).sn = (PCB).bts[(PCB).btsx--]; | |
1245 (PCB).ssx = (PCB).bts[ag_k]; | |
1246 (PCB).vs[(PCB).ssx] = (PCB).vs[ag_k]; | |
1247 (PCB).ss[(PCB).ssx] = (PCB).ss[ag_k]; | |
1248 (PCB).cs[(PCB).ssx] = (PCB).cs[ag_k]; | |
1249 } | |
1250 (PCB).token_number = (pgg_token_type) (PCB).drt; | |
1251 (PCB).ssx = (PCB).dssx; | |
1252 (PCB).sn = (PCB).dsn; | |
1253 (PCB).drt = -1; | |
1254 } | |
1255 | |
1256 | |
1257 | |
1258 static const int ag_rtt[] = { | |
1259 97,219, 0 | |
1260 }; | |
1261 | |
1262 static const unsigned char ag_tstt[] = { | |
1263 231,221,129,106,103,101,96,46,21,19,17,0,3,4,5,38,97,219, | |
1264 235,234,233,232,231,221,220,196,173,168,150,136,129,119,112,105,103,101,96, | |
1265 89,86,85,74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,97,219, | |
1266 221,96,0,3,97,219, | |
1267 231,129,106,103,101,46,21,19,17,0,39,40,99,102, | |
1268 235,234,233,232,231,196,173,168,150,136,129,119,112,105,103,101,96,89,86,85, | |
1269 74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,108,109, | |
1270 103,0, | |
1271 103,101,0,102, | |
1272 231,221,193,191,190,187,186,185,184,183,181,129,106,105,103,101,96,95,46,35, | |
1273 27,21,19,17,0,3,97,99,102,104,219, | |
1274 231,129,46,21,19,17,0,20,41,42,45,47,48,49,54,55,56,57,58,59,60,91,202, | |
1275 235,234,233,232,231,196,173,168,150,136,129,119,112,105,96,89,86,85,74,61, | |
1276 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0, | |
1277 103,0, | |
1278 103,101,0,102, | |
1279 103,0, | |
1280 233,232,231,221,129,122,121,119,112,106,103,101,96,89,79,35,33,25,23,21,0,3, | |
1281 4,8,9,97,98,99,100,102,219, | |
1282 235,234,233,232,231,221,196,173,168,150,136,129,119,112,106,105,103,101,96, | |
1283 89,86,85,74,61,37,35,33,31,29,27,25,23,21,19,15,13,7,0,102,204,205,206, | |
1284 233,232,231,221,201,200,199,198,197,196,173,136,129,119,106,103,101,96,89, | |
1285 86,85,79,61,46,37,31,29,27,25,23,21,13,11,7,2,0,3,4,5,97,219, | |
1286 231,129,79,0,60,62,75,91, | |
1287 231,221,193,191,190,187,186,185,184,183,181,129,106,103,101,96,95,35,27,0,3, | |
1288 4,5,97,176,219, | |
1289 235,234,233,232,231,221,196,173,168,150,136,129,119,112,106,105,96,89,86,85, | |
1290 74,61,37,35,33,31,29,27,25,23,21,19,15,13,7,0,97,99,203,207,210,211,219, | |
1291 61,13,0,12, | |
1292 231,129,0,57,59,60,91, | |
1293 7,0,6, | |
1294 2,0,1,50, | |
1295 106,103,101,0,39,99,102, | |
1296 106,103,101,0,39,99,102, | |
1297 231,129,46,21,19,17,0,20,41,43,44,47,48,49,54,55,56,57,58,59,60,91,202, | |
1298 46,0, | |
1299 103,0, | |
1300 103,0, | |
1301 103,101,0,100,102, | |
1302 235,234,233,232,231,221,218,197,196,173,168,150,136,129,122,121,119,112,106, | |
1303 105,103,101,96,89,86,85,79,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7, | |
1304 0,3,97,98,99,100,102,219, | |
1305 103,0, | |
1306 235,234,233,232,231,221,196,173,168,150,136,129,119,112,106,105,103,101,96, | |
1307 89,86,85,74,61,37,35,33,31,29,27,25,23,21,19,15,13,7,0,102,204, | |
1308 233,232,231,221,129,119,96,0,3,97,219, | |
1309 231,221,129,96,0,80, | |
1310 106,103,101,89,86,85,79,31,27,21,7,0,76,77,84, | |
1311 31,0, | |
1312 231,193,191,190,187,186,185,184,183,181,129,106,103,101,95,35,27,0,39,40,99, | |
1313 102, | |
1314 27,0,26, | |
1315 235,234,233,232,231,196,173,168,150,136,129,119,112,105,96,89,86,85,74,61, | |
1316 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,225,226,227, | |
1317 235,234,233,232,231,196,173,168,150,136,129,119,112,105,96,89,86,85,74,61, | |
1318 37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,228,229,230, | |
1319 150,0, | |
1320 33,0, | |
1321 103,101,0,102, | |
1322 235,234,233,232,231,221,196,173,168,150,136,129,119,112,106,105,103,101,96, | |
1323 89,86,85,74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,208, | |
1324 29,0,28, | |
1325 235,234,233,232,231,221,218,196,173,168,150,136,129,122,121,119,112,106,105, | |
1326 103,101,96,89,86,85,79,61,37,35,33,31,27,25,23,21,19,17,15,13,7,0,3,4,8, | |
1327 9,97,98,99,100,102,219, | |
1328 233,232,231,150,129,122,121,119,112,35,33,25,23,21,19,17,15,0,14,16,18,20, | |
1329 22,24,34,60,91,110,111,115,117,131,132,133,134,135,137,143,147,148, | |
1330 221,106,103,101,96,46,7,2,0,3,4,5,97,219, | |
1331 61,0, | |
1332 7,0,6, | |
1333 233,232,231,221,150,129,122,121,119,112,106,103,101,96,35,33,29,25,23,21,19, | |
1334 17,15,0,3,4,8,9,97,98,99,100,102,219, | |
1335 231,129,0,59,60,91, | |
1336 233,232,231,221,150,129,122,121,119,112,106,103,101,96,46,37,35,33,25,23,21, | |
1337 19,17,15,13,0,3,4,5,97,219, | |
1338 233,232,231,150,129,122,121,119,112,106,103,101,46,37,35,33,25,23,21,19,17, | |
1339 15,13,0,12,14,16,18,20,22,24,34,53,60,67,69,70,71,91,110,111,115,117, | |
1340 130,131,132,133,134,135,137,143,147,148, | |
1341 231,221,129,106,105,103,101,96,46,21,19,17,0,3,97,99,102,104,219, | |
1342 231,221,129,106,105,103,101,96,46,37,21,19,17,2,0,1,3,36,50,51,52,97,99,102, | |
1343 104,219, | |
1344 106,103,101,46,0,39,99,102, | |
1345 106,103,101,46,0,39,99,102, | |
1346 221,96,0,3,4,97,219, | |
1347 231,221,129,96,0,3,4,5,97,219, | |
1348 231,221,129,96,0,81, | |
1349 89,21,0,20,78,82,83,87,88,90, | |
1350 231,221,129,96,79,0,3,4,5,97,219, | |
1351 231,129,79,0,60,62,75,91, | |
1352 106,103,101,89,85,31,27,21,7,0, | |
1353 231,221,129,106,103,101,96,0,3,4,8,9,97,98,99,100,102,219, | |
1354 231,193,191,190,187,186,185,184,183,181,129,95,35,27,0,34,60,91,94,146,177, | |
1355 178,179,180,188, | |
1356 221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, | |
1357 235,234,233,232,231,196,173,168,150,136,129,119,112,105,103,101,96,89,86,85, | |
1358 74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,224, | |
1359 235,234,233,232,231,196,173,168,136,129,119,112,105,96,89,86,85,74,61,37,35, | |
1360 33,31,29,27,25,23,21,19,17,15,13,7,0,225, | |
1361 235,234,233,232,231,196,173,168,150,136,129,119,112,105,103,101,96,89,86,85, | |
1362 74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,224, | |
1363 235,234,233,232,231,196,173,168,150,136,129,119,112,105,96,89,86,85,74,61, | |
1364 37,35,31,29,27,25,23,21,19,17,15,13,7,0,228, | |
1365 103,0, | |
1366 235,234,233,232,231,221,196,173,168,150,136,129,119,112,106,105,103,101,96, | |
1367 89,86,85,74,61,37,35,33,31,27,25,23,21,19,17,15,13,7,0,97,99,210,211, | |
1368 212,219, | |
1369 221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, | |
1370 235,234,233,232,231,221,218,196,173,168,150,136,129,119,112,106,105,103,101, | |
1371 96,89,86,85,61,37,35,33,31,27,25,23,21,19,17,15,13,7,0,3,4,8,9,97,98,99, | |
1372 100,102,219, | |
1373 235,234,233,232,231,218,196,173,168,150,136,129,119,112,105,89,86,85,61,37, | |
1374 35,33,31,27,25,23,21,19,17,15,13,7,0,55,73,202,214, | |
1375 233,232,231,221,150,129,122,121,119,112,106,103,101,96,35,33,25,23,21,19,17, | |
1376 15,0,3,4,8,9,97,98,99,100,102,219, | |
1377 233,232,231,221,197,150,129,122,121,119,112,106,103,101,96,37,35,33,29,25, | |
1378 23,21,19,17,15,13,0,3,4,8,9,97,98,99,100,102,219, | |
1379 235,234,233,232,231,196,173,170,168,166,165,164,163,162,161,160,159,158,157, | |
1380 156,136,129,119,112,105,96,89,86,85,74,61,37,35,33,31,29,27,25,23,21,19, | |
1381 17,15,13,7,0,139,140,141,142,149,151,152,153,154,167,169, | |
1382 233,232,231,150,129,122,121,119,112,35,33,25,23,21,19,17,15,0,14,16,18,20, | |
1383 22,24,34,60,63,64,69,71,91,110,111,115,117,130,131,132,133,134,135,137, | |
1384 143,147,148, | |
1385 233,232,231,197,150,129,122,121,119,112,37,35,33,29,25,23,21,19,17,15,13,0, | |
1386 12,14,16,18,20,22,24,34,60,63,64,66,67,68,69,71,91,110,111,115,117,130, | |
1387 131,132,133,134,135,137,143,147,148, | |
1388 196,0, | |
1389 233,232,231,221,129,122,121,119,112,106,103,101,96,35,33,25,23,21,0,3,4,8,9, | |
1390 97,98,99,100,102,219, | |
1391 233,232,231,221,129,122,121,119,112,106,103,101,96,35,33,25,23,21,0,3,4,8,9, | |
1392 97,98,99,100,102,219, | |
1393 233,232,122,121,119,0,116,118,123, | |
1394 235,233,232,231,196,173,168,150,136,129,119,112,89,86,85,74,61,37,35,33,31, | |
1395 29,27,25,23,21,19,17,15,13,7,0, | |
1396 235,234,233,232,231,196,173,170,168,166,165,164,163,162,161,160,159,158,157, | |
1397 156,150,136,129,119,112,105,96,89,86,85,74,61,37,35,31,29,27,25,23,21, | |
1398 19,17,15,13,7,0,114,139,140,141,142,167,169, | |
1399 233,232,231,221,129,122,121,119,112,106,103,101,96,35,33,25,23,21,0,3,4,8,9, | |
1400 97,98,99,100,102,219, | |
1401 233,232,231,129,122,121,119,112,35,33,25,23,21,0,20,22,24,34,60,91,110,111, | |
1402 115,117,132,134,135,137,143, | |
1403 144,0, | |
1404 233,232,231,129,122,121,119,112,35,33,25,23,21,0,20,22,24,34,60,91,110,111, | |
1405 115,117,135,137,143, | |
1406 136,0, | |
1407 199,196,25,23,11,0,10,22,24, | |
1408 199,196,25,23,11,0,10,22,24, | |
1409 201,200,198,197,173,106,103,101,46,37,29,27,13,7,0,72, | |
1410 106,103,101,46,37,13,7,0,6,12,67, | |
1411 235,234,233,232,231,218,196,173,168,150,136,129,119,112,105,89,86,85,61,37, | |
1412 35,33,31,27,25,23,21,19,17,15,13,7,0,55,73,202,214, | |
1413 37,0,36,51, | |
1414 233,232,231,221,150,129,122,121,119,112,106,103,101,96,35,33,25,23,21,19,17, | |
1415 15,0,3,4,8,9,97,98,99,100,102,219, | |
1416 233,232,231,150,129,122,121,119,112,35,33,25,23,21,19,17,15,0,14,16,18,20, | |
1417 22,24,34,60,69,70,71,91,110,111,115,117,130,131,132,133,134,135,137,143, | |
1418 147,148, | |
1419 37,0,36,51, | |
1420 221,96,0,3,97,219, | |
1421 231,129,0,60,91, | |
1422 231,221,129,96,0,3,4,5,97,219, | |
1423 231,221,129,106,103,101,96,89,85,31,27,21,7,0,3,4,5,97,219, | |
1424 231,129,0,60,91, | |
1425 89,21,0,20,78,82,83,87,88,90, | |
1426 89,21,0,20,83,87,88,90, | |
1427 85,7,0, | |
1428 221,96,0,3,4,97,219, | |
1429 221,96,0,3,4,97,182,219, | |
1430 221,96,0,3,4,97,219, | |
1431 106,103,101,29,7,0,6,98,99,100,102,189,192, | |
1432 106,103,101,29,7,0,6,98,99,100,102,189,192, | |
1433 221,96,0,3,4,97,182,219, | |
1434 221,96,0,3,4,97,182,219, | |
1435 221,96,0,3,4,97,182,219, | |
1436 221,96,0,3,4,97,182,219, | |
1437 221,96,0,3,4,97,182,219, | |
1438 221,96,0,3,4,97,182,219, | |
1439 221,106,103,101,96,0,3,4,8,97,98,99,100,102,219, | |
1440 233,232,231,221,129,119,96,13,0,3,4,5,97,219, | |
1441 231,129,0,60,91, | |
1442 13,0,12, | |
1443 106,103,101,27,0,39,40,99,102, | |
1444 150,0, | |
1445 33,0, | |
1446 103,101,0,102, | |
1447 235,234,233,232,231,221,196,173,168,150,136,129,119,112,106,105,103,101,96, | |
1448 89,86,85,74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,208, | |
1449 235,234,233,232,231,218,196,173,168,150,136,129,119,112,105,89,86,85,61,37, | |
1450 35,33,31,27,25,23,21,19,15,13,7,0,210,211,215,216, | |
1451 74,0, | |
1452 232,119,0, | |
1453 233,232,129,119,0,124,128, | |
1454 232,119,0, | |
1455 232,119,0, | |
1456 233,129,0, | |
1457 233,232,129,119,0, | |
1458 235,234,231,196,173,170,168,166,165,164,163,162,161,160,159,158,157,156,150, | |
1459 136,112,105,96,89,86,85,74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7, | |
1460 0,139,140,141,142,154,167,169, | |
1461 201,200,198,197,37,29,27,13,7,0,6,12,67, | |
1462 201,198,37,27,0,26,36,65, | |
1463 200,37,0,36,65, | |
1464 37,0,36,65, | |
1465 197,29,0,28, | |
1466 221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, | |
1467 233,232,129,119,0,124,128, | |
1468 232,221,201,200,199,198,197,196,173,144,136,119,106,103,101,96,46,37,31,29, | |
1469 27,25,23,13,11,7,0,120, | |
1470 233,232,119,0, | |
1471 221,201,200,199,198,197,196,173,144,136,106,103,101,96,46,37,31,29,27,25,23, | |
1472 13,11,7,0,3,4,5,97,219, | |
1473 221,201,200,199,198,197,196,173,144,136,106,103,101,96,46,37,31,29,27,25,23, | |
1474 13,11,7,0,3,4,5,97,219, | |
1475 33,23,0,32, | |
1476 31,25,23,0,22,24,30, | |
1477 233,232,221,122,121,119,112,106,103,101,96,33,25,23,0,3,4,8,9,97,98,99,100, | |
1478 102,219, | |
1479 233,232,231,221,129,122,121,119,112,106,103,101,96,35,33,25,23,21,0,3,4,8,9, | |
1480 97,98,99,100,102,219, | |
1481 221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, | |
1482 221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, | |
1483 221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, | |
1484 233,232,231,129,122,121,119,112,35,33,25,23,21,0,20,22,24,34,60,91,110,111, | |
1485 115,117,134,135,137,143, | |
1486 233,232,231,129,122,121,119,112,35,33,25,23,21,0,20,22,24,34,60,91,110,111, | |
1487 115,117,134,135,137,143, | |
1488 231,221,129,106,103,101,96,0,3,4,8,9,97,98,99,100,102,219, | |
1489 233,232,231,150,129,122,121,119,112,35,33,25,23,21,19,17,15,0,14,16,18,20, | |
1490 22,24,34,60,71,91,110,111,115,117,130,131,132,133,134,135,137,143,147, | |
1491 148, | |
1492 74,0, | |
1493 231,129,0,60,91, | |
1494 31,0,30, | |
1495 231,221,129,96,79,0,3,4,5,97,219, | |
1496 221,106,103,101,96,89,85,31,27,21,7,0,3,4,5,97,219, | |
1497 221,194,96,0,3,97,219, | |
1498 221,96,17,0,3,16,97,219, | |
1499 233,232,231,221,150,129,122,121,119,112,96,35,33,25,23,21,19,17,0,3,16,18, | |
1500 20,22,24,34,60,91,97,110,111,115,117,130,132,133,134,135,137,143,147, | |
1501 148,219, | |
1502 29,0,28, | |
1503 231,129,0,60,91,145, | |
1504 233,232,231,129,122,121,119,112,35,33,29,25,23,21,0,20,22,24,34,60,91,110, | |
1505 111,115,117,132,134,135,137,143, | |
1506 17,0,16, | |
1507 233,232,231,221,129,119,106,103,101,96,17,0,3,97,98,99,100,102,219, | |
1508 13,0,12, | |
1509 233,232,231,221,129,119,96,0,3,97,219, | |
1510 233,232,231,150,129,122,121,119,79,25,23,0,22,24,60,62,75,91,111,115,117, | |
1511 147,148, | |
1512 231,221,193,191,190,187,186,185,184,183,181,129,106,105,103,101,96,95,35,27, | |
1513 0,3,34,60,91,94,97,99,102,104,146,179,180,188,219, | |
1514 103,0, | |
1515 235,234,233,232,231,221,196,173,168,150,136,129,119,112,106,105,103,101,96, | |
1516 89,86,85,74,61,37,35,33,31,29,27,25,23,21,19,17,15,13,7,0,97,99,210,211, | |
1517 212,219, | |
1518 150,0, | |
1519 33,0, | |
1520 235,234,233,232,231,221,218,196,173,168,150,136,129,119,112,105,96,89,86,85, | |
1521 61,37,35,33,31,27,25,23,21,19,15,13,7,0,3,97,210,211,216,219, | |
1522 221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, | |
1523 233,232,129,119,0,128, | |
1524 221,201,200,198,197,196,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, | |
1525 221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, | |
1526 221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, | |
1527 233,232,231,150,129,122,121,119,112,35,33,25,23,21,19,17,15,0,14,16,18,20, | |
1528 22,24,34,60,64,69,71,91,110,111,115,117,130,131,132,133,134,135,137,143, | |
1529 147,148, | |
1530 221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, | |
1531 221,201,200,198,197,173,106,103,101,96,46,37,29,27,13,7,0,3,4,5,97,219, | |
1532 233,232,129,119,0,128, | |
1533 232,119,0, | |
1534 235,234,233,232,231,196,173,170,168,166,165,164,163,162,161,160,159,158,157, | |
1535 156,150,136,129,119,112,105,96,89,86,85,74,61,37,35,31,29,27,25,23,21, | |
1536 19,17,15,13,7,0,114,139,140,141,142,167,169, | |
1537 221,201,200,199,198,197,196,173,144,136,106,103,101,96,46,37,31,29,27,25,23, | |
1538 13,11,7,0,3,4,5,97,219, | |
1539 221,201,200,199,198,197,196,173,136,106,103,101,96,85,46,37,31,29,27,25,23, | |
1540 13,11,7,0,3,4,5,97,219, | |
1541 233,232,122,121,119,112,33,25,23,0,22,24,110,111,115,117, | |
1542 233,232,231,129,122,121,119,112,35,33,25,23,21,0,20,22,24,34,60,91,110,111, | |
1543 115,117,135,137,143, | |
1544 136,0, | |
1545 136,0, | |
1546 231,129,0,174,175, | |
1547 201,200,198,197,173,106,103,101,46,37,29,27,13,7,0,72, | |
1548 221,201,200,198,197,106,103,101,96,46,37,29,27,0,3,4,5,97,219, | |
1549 221,96,0,3,4,97,219, | |
1550 233,232,231,150,129,122,121,119,112,35,33,25,23,21,19,17,0,16,18,20,22,24, | |
1551 34,60,91,110,111,115,117,130,132,133,134,135,137,143,147,148,195, | |
1552 13,0,12, | |
1553 25,23,0,22,24, | |
1554 231,129,0,60,91,145, | |
1555 150,0,147,148, | |
1556 33,0,32, | |
1557 235,234,233,232,231,196,173,170,168,166,165,164,163,162,161,160,159,158,157, | |
1558 156,150,136,129,119,112,105,96,89,86,85,74,61,37,35,31,29,27,25,23,21, | |
1559 19,17,15,13,7,0,114,139,140,141,142,167,169, | |
1560 233,232,231,221,201,200,198,197,129,119,106,103,101,96,46,37,29,27,13,7,0,3, | |
1561 4,5,97,219, | |
1562 221,96,17,0,3,16,97,219, | |
1563 106,103,101,29,7,0,6,98,99,100,102,189,192, | |
1564 233,232,122,121,119,112,33,25,23,0,22,24,110,111,115,117, | |
1565 33,0,32, | |
1566 233,232,231,129,122,121,119,112,35,33,25,23,21,0,20,22,24,34,60,91,110,111, | |
1567 115,117,132,134,135,137,143, | |
1568 233,232,231,150,129,122,121,119,112,35,33,29,25,23,21,19,17,0,16,18,20,22, | |
1569 24,34,60,91,110,111,115,117,130,132,133,134,135,137,143,147,148, | |
1570 25,23,0,22,24, | |
1571 | |
1572 }; | |
1573 | |
1574 | |
1575 static unsigned const char ag_astt[3853] = { | |
1576 5,1,5,8,8,8,1,5,5,5,5,7,1,1,1,0,1,1,3,3,3,3,3,1,3,3,3,3,3,3,3,3,3,3,3,3,3, | |
1577 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,7,2,1,1,9,5,3,3,1,8,8,1,8,1,5,8,8,8, | |
1578 7,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, | |
1579 1,1,1,1,7,1,3,3,7,8,1,7,1,5,1,5,5,5,5,5,5,5,5,5,5,1,9,8,1,9,5,5,5,5,5,5,5, | |
1580 7,3,3,1,1,3,1,2,2,8,1,1,1,7,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,9,9,9,9,9,9,9, | |
1581 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,5,3,7,8,1,7,1,3,7,5, | |
1582 5,5,1,5,5,5,5,5,1,8,1,1,5,5,5,5,5,5,5,7,1,1,3,3,1,3,1,3,1,1,5,5,5,5,5,5,5, | |
1583 5,5,5,5,5,5,5,5,5,8,1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,7,1,1,1,2,10, | |
1584 10,10,1,5,5,5,5,5,5,5,5,10,10,5,5,5,1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,7, | |
1585 1,1,3,1,1,2,2,1,7,1,1,1,1,5,1,5,5,5,5,5,5,5,5,5,5,8,8,8,1,5,5,5,7,1,1,1,1, | |
1586 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,1,1,1, | |
1587 7,1,1,1,1,1,1,1,1,1,4,1,2,2,7,1,2,1,1,1,4,1,1,4,1,3,1,8,1,7,1,1,1,1,8,1,7, | |
1588 1,1,1,2,2,5,1,1,1,7,1,3,3,3,1,1,1,1,1,1,1,1,2,1,1,1,3,7,3,7,1,7,8,1,7,3,1, | |
1589 5,5,5,5,5,1,5,5,5,5,5,5,5,5,5,5,5,5,1,5,8,1,9,5,5,5,5,5,5,5,5,5,5,5,5,5,5, | |
1590 5,5,5,5,5,7,3,3,3,1,3,1,1,3,7,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,8,1,5,5,5,5, | |
1591 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,7,1,3,2,2,2,1,2,2,9,5,3,3,1,4,4,4,4,7,1,5,5, | |
1592 5,8,1,5,1,5,5,8,5,7,1,1,1,1,7,8,8,8,8,8,8,8,8,8,8,8,1,8,1,8,8,5,7,1,1,1,1, | |
1593 1,7,3,1,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, | |
1594 7,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,1,1,1,1,1,1,1,1, | |
1595 1,7,1,1,3,3,7,3,7,8,1,7,1,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, | |
1596 8,8,8,8,5,8,8,8,8,8,8,8,8,8,7,1,1,7,3,5,5,5,5,5,1,5,5,5,5,5,5,5,5,5,5,5,1, | |
1597 5,8,1,1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,7,1,1,2,2,1,2,1,2,1,1,5,5,2,2, | |
1598 2,5,5,5,1,1,1,1,1,1,1,1,1,7,1,1,1,1,2,2,1,2,1,1,1,1,2,2,1,2,1,1,1,2,1,1,1, | |
1599 5,5,5,1,5,5,5,7,1,1,2,1,1,1,4,1,4,1,5,5,5,1,5,5,5,5,5,5,1,8,1,1,5,5,5,5,5, | |
1600 5,5,5,5,7,1,1,3,3,1,3,1,3,1,1,2,2,7,2,1,1,5,5,5,1,5,5,5,5,5,5,5,5,5,1,5,5, | |
1601 5,5,5,5,5,5,5,5,5,7,1,1,3,1,1,5,5,2,2,2,5,5,5,1,4,4,4,4,4,1,1,1,1,1,1,1,1, | |
1602 1,7,1,1,1,1,1,2,2,1,1,2,2,1,2,1,1,1,1,1,2,1,2,1,1,1,1,1,2,1,1,4,1,4,1,9,8, | |
1603 1,9,4,4,4,4,7,3,3,1,1,3,1,4,1,4,1,9,8,1,9,4,1,4,4,4,1,7,1,3,1,2,1,1,3,1,1, | |
1604 3,1,1,8,1,4,7,1,1,1,1,8,1,4,7,1,1,1,1,1,5,1,1,1,1,8,1,8,1,7,1,1,1,1,1,4,4, | |
1605 4,4,7,1,1,1,7,2,2,1,2,1,1,1,5,1,5,1,5,7,1,1,2,1,1,2,2,1,7,1,1,1,1,5,5,5,5, | |
1606 5,5,5,5,5,7,5,1,5,1,8,1,1,7,1,1,2,2,1,2,1,2,1,1,2,1,1,1,1,1,1,1,1,1,2,1,1, | |
1607 5,7,1,1,1,1,1,1,3,1,1,1,1,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,7,1,1,3,1,1,3,3,3, | |
1608 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,7,3,9,9, | |
1609 9,9,9,9,9,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,5,3,3,3,3,3, | |
1610 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,7,3,9,9,9, | |
1611 9,9,9,9,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,5,3,3,7,9,9,9, | |
1612 9,9,1,9,9,9,1,9,9,9,9,1,9,9,9,9,9,9,9,9,9,9,9,1,9,9,9,9,9,9,1,9,9,9,4,3,1, | |
1613 1,1,3,1,1,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,7,1,1,3,1,1,5,5,5,5,5,1,5,5,5,5,5, | |
1614 5,5,5,5,1,5,8,1,1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,7,1,1,2,2,1,2,1,2,1,1, | |
1615 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,4,4,4,7,2,1,1,1, | |
1616 5,5,5,1,5,5,5,5,5,5,1,8,1,1,5,5,5,5,5,5,5,5,7,1,1,3,3,1,3,1,3,1,1,5,5,5,1, | |
1617 5,5,5,5,5,5,5,1,8,1,1,5,5,5,5,5,5,5,5,5,5,5,7,1,1,3,3,1,3,1,3,1,1,2,2,2,2, | |
1618 2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, | |
1619 2,2,2,2,7,2,2,2,2,1,1,1,1,2,1,1,5,5,2,2,2,5,5,5,1,1,1,1,1,1,1,1,1,7,1,1,1, | |
1620 1,2,2,1,2,1,2,1,1,1,1,1,1,2,1,2,1,1,1,1,1,2,1,1,5,5,2,4,2,2,5,5,5,1,4,1,1, | |
1621 4,1,1,1,1,1,1,1,7,1,1,1,1,1,2,2,1,2,1,2,1,2,1,1,1,1,1,1,1,2,1,2,1,1,1,1,1, | |
1622 2,1,1,1,4,5,5,5,1,5,5,5,5,5,1,8,1,1,5,5,5,5,5,7,1,1,3,3,1,3,1,3,1,1,5,5,5, | |
1623 1,5,5,5,5,5,1,8,1,1,5,5,5,5,5,7,1,1,3,3,1,3,1,3,1,1,2,2,1,1,1,7,1,1,1,1,1, | |
1624 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,7,2,2,2,2,2,2,2, | |
1625 1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, | |
1626 2,7,1,1,1,1,1,1,1,5,5,5,1,5,5,5,5,5,1,8,1,1,5,5,5,5,5,7,1,1,3,3,1,3,1,3,1, | |
1627 1,5,5,2,2,5,5,5,1,1,1,1,1,1,7,1,2,2,1,2,1,1,1,1,2,1,1,1,1,2,1,4,5,5,2,2,5, | |
1628 5,5,1,1,1,1,1,1,7,1,2,2,1,2,1,1,1,1,2,2,2,2,1,5,1,1,1,1,1,4,2,1,1,1,1,1,1, | |
1629 1,4,2,1,1,4,4,4,4,1,4,4,4,4,4,4,4,4,4,7,2,4,4,4,4,4,1,1,7,1,1,2,4,4,4,4,4, | |
1630 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,4,4,4,7,2,1,1,1,1,5,1,3,5, | |
1631 5,5,1,5,5,5,5,5,5,1,8,1,1,5,5,5,5,5,5,5,5,7,1,1,3,3,1,3,1,3,1,1,5,5,2,2,2, | |
1632 5,5,5,1,1,1,1,1,1,1,1,1,7,1,1,1,1,2,2,1,2,1,2,1,1,1,1,1,2,1,2,1,1,1,1,1,2, | |
1633 1,1,1,5,1,3,1,9,5,3,3,1,2,2,7,2,1,8,1,8,1,7,1,1,1,1,1,5,1,5,5,5,5,1,5,5,5, | |
1634 5,5,5,7,1,1,2,1,1,2,2,5,2,1,1,1,7,2,1,1,1,1,1,1,1,1,5,2,2,1,1,2,1,1,7,1,1, | |
1635 7,1,1,1,1,1,1,7,1,1,1,2,1,1,1,7,1,1,1,1,1,8,1,8,1,7,1,1,1,1,1,3,1,1,8,1,8, | |
1636 1,7,1,1,1,1,1,2,1,1,1,7,1,1,1,2,1,1,1,7,1,1,1,2,1,1,1,7,1,1,1,2,1,1,1,7,1, | |
1637 1,1,2,1,1,1,7,1,1,1,2,1,1,1,7,1,1,1,2,1,1,1,8,1,1,7,1,1,1,1,1,1,1,1,1,10, | |
1638 10,10,1,10,10,1,8,7,1,1,1,1,1,2,2,7,2,1,1,4,1,1,8,1,5,7,1,3,1,1,3,7,3,7,8, | |
1639 1,7,1,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, | |
1640 8,8,8,8,7,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, | |
1641 7,1,1,1,1,1,7,2,2,7,2,2,2,2,7,1,2,2,2,5,2,2,5,2,2,5,10,10,10,10,5,2,2,2,2, | |
1642 2,1,1,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, | |
1643 2,7,2,2,2,2,2,1,1,4,4,4,4,4,4,4,1,1,7,1,1,2,1,1,1,1,7,2,1,3,1,1,5,1,3,1,5, | |
1644 1,3,1,1,7,2,1,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,7,1,1,2,1,1,2,2,2,2,7,1,2,4,4, | |
1645 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,7,1,10,10,10,5,1,5,5,5,5,5, | |
1646 5,5,5,5,5,5,5,1,5,5,5,5,5,5,5,5,5,5,7,1,1,2,1,1,1,5,5,5,5,5,5,5,5,5,5,5,5, | |
1647 1,5,5,5,5,5,5,5,5,5,5,7,1,1,2,1,1,1,1,7,2,1,1,1,7,1,1,2,8,8,1,8,8,8,8,1,8, | |
1648 1,1,8,8,8,7,1,1,1,1,1,1,1,1,1,1,8,8,8,1,8,8,8,8,8,1,8,1,1,8,8,8,8,8,7,1,1, | |
1649 1,1,1,1,1,1,1,1,1,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,7,1,1,3,1,1,1,5,5,5,5,5,5, | |
1650 5,5,1,5,5,5,5,5,5,7,1,1,2,1,1,1,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,7,1,1,2,1,1, | |
1651 5,5,2,2,5,5,5,1,1,1,1,1,1,7,1,2,2,1,2,1,1,1,1,2,1,1,1,2,5,5,2,2,5,5,5,1,1, | |
1652 1,1,1,1,7,1,2,2,1,2,1,1,1,1,2,1,1,1,2,8,1,8,1,8,1,1,7,1,1,1,1,1,1,1,1,1,1, | |
1653 5,5,2,2,2,5,5,5,1,1,1,1,1,1,1,1,1,7,1,1,1,1,2,2,1,2,1,1,1,1,1,2,1,2,1,1,1, | |
1654 1,1,2,1,1,1,7,2,2,7,2,1,1,7,2,5,1,5,1,5,7,1,1,2,1,1,1,5,5,5,1,5,5,5,5,5,5, | |
1655 7,1,1,2,1,1,1,1,9,7,3,3,1,1,9,1,7,3,1,3,1,5,5,2,1,2,2,5,5,5,1,9,1,1,1,1,1, | |
1656 1,1,7,3,1,1,1,2,2,1,2,1,3,1,1,1,2,2,1,2,1,1,1,2,1,1,1,1,7,3,2,2,5,1,1,3,5, | |
1657 5,2,2,5,5,5,1,1,1,5,1,1,1,7,1,2,2,1,2,1,1,1,1,2,1,1,1,1,2,1,7,1,2,2,2,1,2, | |
1658 2,1,8,1,9,5,7,3,3,3,1,3,1,1,1,7,1,2,2,2,1,2,2,9,5,3,3,1,5,5,2,2,2,5,5,5,1, | |
1659 1,1,7,2,2,1,2,1,1,2,1,2,2,1,2,1,1,1,1,1,1,1,1,1,1,2,1,9,8,1,9,1,1,5,7,3,1, | |
1660 1,1,1,3,1,1,3,1,3,3,1,1,3,7,9,9,9,9,9,1,9,9,9,1,9,9,9,9,1,9,9,9,9,9,9,9,9, | |
1661 9,9,9,1,9,3,9,9,9,9,9,1,9,9,9,7,3,1,1,1,3,1,3,7,3,7,9,9,9,9,9,1,9,9,9,9,1, | |
1662 9,9,9,9,9,9,9,9,9,9,9,9,1,9,9,9,9,9,9,9,9,9,4,3,3,1,1,3,1,1,5,5,5,5,5,5,5, | |
1663 5,1,5,5,5,5,5,5,7,1,1,2,1,1,2,2,2,2,4,2,1,5,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5, | |
1664 7,1,1,3,1,1,1,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,7,1,1,2,1,1,1,5,5,5,5,5,5,5,5, | |
1665 1,5,5,5,5,5,5,7,1,1,2,1,1,5,5,2,2,2,5,5,5,1,1,1,1,1,1,1,1,1,7,1,1,1,1,2,2, | |
1666 1,2,2,1,1,1,1,1,1,2,1,2,1,1,1,1,1,2,1,1,1,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,7, | |
1667 1,1,2,1,1,1,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,7,1,1,2,1,1,2,2,2,2,4,2,10,10,4, | |
1668 2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, | |
1669 2,2,2,2,2,2,2,2,7,1,1,1,1,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,5, | |
1670 5,5,5,7,1,1,3,1,1,1,5,5,5,5,5,5,5,5,5,5,5,1,5,5,5,5,5,5,5,5,5,5,5,7,1,1,3, | |
1671 1,1,5,5,5,5,5,1,1,1,1,7,2,2,2,2,1,2,5,5,2,2,5,5,5,1,1,1,1,1,1,7,1,2,2,1,2, | |
1672 1,1,1,1,2,2,2,2,1,4,1,4,2,2,7,2,1,4,4,4,4,1,4,4,4,4,4,4,4,4,4,7,2,1,5,5,5, | |
1673 5,5,5,5,1,5,5,5,5,7,1,1,2,1,1,1,1,7,1,1,1,1,5,5,2,2,2,5,5,5,1,1,1,1,1,1,1, | |
1674 1,7,1,1,1,2,2,1,2,1,1,1,1,2,2,1,2,1,1,1,2,1,1,1,1,4,1,1,1,4,1,1,2,2,7,1,1, | |
1675 3,2,7,2,1,1,7,2,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, | |
1676 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,7,1,1,1,1,1,1,1,10,10,10,1,5,5,5,5,10,10,5, | |
1677 5,5,1,5,5,5,5,5,5,7,1,1,3,1,1,1,9,1,7,3,1,3,1,1,8,1,8,1,7,1,1,1,1,1,3,1,5, | |
1678 5,5,5,5,1,1,1,1,7,2,2,2,2,1,2,1,7,2,5,5,2,2,5,5,5,1,1,1,1,1,1,7,1,2,2,1,2, | |
1679 1,1,1,1,2,1,1,1,1,2,5,5,2,2,2,5,5,5,1,1,1,5,1,1,1,1,1,7,1,1,1,2,2,1,2,1,1, | |
1680 1,1,2,2,1,2,1,1,1,2,1,1,1,1,4,1,1 | |
1681 }; | |
1682 | |
1683 | |
1684 static const unsigned short ag_pstt[] = { | |
1685 3,1,3,3,3,3,2,3,3,3,3,0,2,2,3,0,2,1, | |
1686 291,291,291,291,291,1,289,291,291,291,291,291,291,291,291,291,291,291,291, | |
1687 291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291, | |
1688 291,1,292,1, | |
1689 1,2,4,2,2,1, | |
1690 8,8,4,5,5,23,8,8,8,3,7,8,6,5, | |
1691 9,9,9,9,9,9,9,9,9,9,9,9,9,9,121,121,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, | |
1692 4,9,123, | |
1693 116,5, | |
1694 10,10,6,10, | |
1695 24,1,24,24,24,24,24,24,24,24,24,24,4,118,12,12,117,24,24,24,24,24,24,24,7, | |
1696 117,117,11,12,117,1, | |
1697 94,94,26,13,17,14,8,16,25,25,26,24,23,22,23,23,23,21,20,48,19,15,18, | |
1698 120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, | |
1699 120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,122, | |
1700 115,10, | |
1701 27,27,11,27, | |
1702 113,12, | |
1703 6,6,6,1,6,6,6,6,6,4,28,28,30,6,6,6,6,6,6,6,13,30,30,14,14,30,14,29,14,28,1, | |
1704 262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,31,31,262, | |
1705 262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262,262, | |
1706 14,31,32,32,264, | |
1707 95,95,95,1,3,3,3,3,3,3,3,3,95,95,3,3,3,33,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, | |
1708 15,33,33,100,33,1, | |
1709 94,94,34,16,35,36,35,15, | |
1710 3,1,3,3,3,3,3,3,3,3,3,3,37,37,37,2,3,3,3,17,2,2,37,2,38,1, | |
1711 44,44,44,44,44,1,44,44,44,39,44,44,44,44,4,44,44,44,44,44,44,44,44,44,40,44, | |
1712 265,44,44,44,44,44,44,44,44,18,44,43,45,44,42,41,1, | |
1713 48,46,50,47, | |
1714 94,94,20,50,48,49,15, | |
1715 51,46,52, | |
1716 53,36,54,37, | |
1717 4,5,5,23,55,6,5, | |
1718 4,5,5,24,56,6,5, | |
1719 94,94,27,13,17,14,25,16,26,30,30,58,57,22,57,57,57,21,20,48,19,15,18, | |
1720 31,26, | |
1721 114,27, | |
1722 59,28, | |
1723 28,28,29,106,28, | |
1724 103,103,103,103,103,1,103,103,103,103,103,103,103,103,103,103,103,103,4,103, | |
1725 28,28,2,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103, | |
1726 103,103,103,30,2,2,104,29,104,28,1, | |
1727 259,31, | |
1728 263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,31,31,263, | |
1729 263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263,263, | |
1730 32,31,261, | |
1731 96,96,96,1,96,96,2,4,2,2,1, | |
1732 77,77,77,77,34,60, | |
1733 71,71,71,62,63,71,61,71,71,62,71,35,65,62,64, | |
1734 66,36, | |
1735 67,67,67,67,67,67,67,67,67,67,67,4,5,5,67,67,23,37,7,67,6,5, | |
1736 68,38,213, | |
1737 70,70,70,70,70,70,70,69,298,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70, | |
1738 70,70,70,70,70,70,70,70,70,39,70,70,300, | |
1739 72,72,72,72,72,72,72,71,72,72,72,72,72,72,72,72,72,72,72,72,72,72,306,72,72, | |
1740 72,72,72,72,72,72,72,72,72,40,72,72,308, | |
1741 271,41, | |
1742 270,42, | |
1743 73,73,43,73, | |
1744 74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74, | |
1745 74,74,74,272,74,74,74,74,74,74,74,74,74,44,74, | |
1746 75,45,258, | |
1747 6,6,6,6,6,1,6,6,6,6,6,6,6,6,6,6,6,4,6,28,28,30,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | |
1748 6,6,6,6,46,30,30,10,10,30,10,29,10,28,1, | |
1749 128,128,94,178,94,128,128,128,87,89,88,84,85,13,78,79,76,47,77,82,81,90,131, | |
1750 130,92,163,15,91,91,86,130,169,94,168,93,93,93,161,83,80, | |
1751 1,3,3,3,2,3,3,3,48,2,2,51,2,1, | |
1752 48,50, | |
1753 51,47,52, | |
1754 6,6,6,1,6,6,6,6,6,6,4,28,28,30,6,6,6,6,6,6,6,6,6,51,30,30,8,8,30,8,29,8,28, | |
1755 1, | |
1756 94,94,52,49,49,15, | |
1757 3,3,3,1,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,53,2,2,5,2,1, | |
1758 128,128,94,178,94,128,128,128,87,68,68,68,68,68,89,88,84,85,13,78,79,76,46, | |
1759 54,98,77,82,81,90,131,130,92,99,163,61,97,62,96,15,91,91,86,130,96,146, | |
1760 95,96,93,93,93,161,83,80, | |
1761 33,1,33,4,118,12,12,117,33,33,33,33,55,117,117,11,12,117,1, | |
1762 32,1,32,4,118,12,12,117,32,100,32,32,32,53,56,54,117,101,38,102,102,117,11, | |
1763 12,117,1, | |
1764 4,5,5,35,57,55,6,5, | |
1765 4,5,5,34,58,56,6,5, | |
1766 1,103,110,103,103,103,1, | |
1767 104,1,104,2,60,2,2,104,2,1, | |
1768 79,79,79,79,61,105, | |
1769 106,13,62,87,75,109,75,108,107,109, | |
1770 3,1,3,2,3,63,2,2,85,2,1, | |
1771 94,94,34,64,35,110,35,15, | |
1772 72,72,72,74,72,72,72,74,72,65, | |
1773 6,1,6,4,28,28,30,66,30,30,52,52,30,52,29,52,28,1, | |
1774 94,111,112,113,116,117,118,119,120,121,94,122,89,214,67,124,125,15,123,114, | |
1775 126,216,126,126,115, | |
1776 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,68,2,2,17,2,1, | |
1777 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, | |
1778 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,69, | |
1779 295, | |
1780 297,297,297,297,297,297,297,69,297,297,297,297,297,297,297,297,297,297,297, | |
1781 297,297,297,297,297,297,297,297,297,297,297,297,297,297,299,297, | |
1782 303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303, | |
1783 303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,71, | |
1784 303, | |
1785 305,305,305,305,305,305,305,71,305,305,305,305,305,305,305,305,305,305,305, | |
1786 305,305,305,305,305,305,305,305,305,305,305,305,305,305,307,305, | |
1787 269,73, | |
1788 273,273,273,273,273,1,273,273,273,39,273,273,273,273,4,273,273,273,273,273, | |
1789 273,273,273,273,273,273,40,273,273,273,273,273,273,130,273,273,273,266, | |
1790 273,129,128,127,273,1, | |
1791 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,75,2,2,18,2,1, | |
1792 6,6,6,6,6,1,6,6,6,6,6,6,6,6,6,4,6,28,28,30,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | |
1793 6,76,30,30,11,11,30,11,29,11,28,1, | |
1794 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, | |
1795 280,280,280,280,280,280,280,280,280,14,280,280,280,77,256,132,18,131, | |
1796 6,6,6,1,6,6,6,6,6,6,4,28,28,30,6,6,6,6,6,6,6,6,78,30,30,13,13,30,13,29,13, | |
1797 28,1, | |
1798 6,6,6,1,6,6,6,6,6,6,6,4,28,28,30,6,6,6,6,6,6,6,6,6,6,6,79,30,30,12,12,30,12, | |
1799 29,12,28,1, | |
1800 199,199,200,200,199,199,199,134,133,192,191,190,189,188,187,186,185,184,183, | |
1801 182,199,200,200,199,199,199,199,199,199,199,199,199,199,199,199,199,199, | |
1802 199,199,199,199,199,199,199,199,80,199,204,181,206,139,138,137,139,199, | |
1803 136,135, | |
1804 128,128,94,178,94,128,128,128,87,89,88,84,85,13,78,79,76,81,77,82,81,90,131, | |
1805 130,92,163,141,53,140,96,15,91,91,86,130,96,146,95,96,93,93,93,161,83, | |
1806 80, | |
1807 128,128,94,68,178,94,128,128,128,87,68,89,88,68,84,85,13,78,79,76,46,82,98, | |
1808 77,82,81,90,131,130,92,163,142,53,143,56,144,140,96,15,91,91,86,130,96, | |
1809 146,95,96,93,93,93,161,83,80, | |
1810 145,245, | |
1811 6,6,6,1,6,6,6,6,6,4,28,28,30,6,6,6,6,6,84,30,30,16,16,30,16,29,16,28,1, | |
1812 6,6,6,1,6,6,6,6,6,4,28,28,30,6,6,6,6,6,85,30,30,15,15,30,15,29,15,28,1, | |
1813 137,137,146,146,147,86,149,148,146, | |
1814 150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150, | |
1815 150,150,150,150,150,150,150,150,150,150,150,150,87, | |
1816 156,156,156,156,156,156,156,134,133,192,191,190,189,188,187,186,185,184,183, | |
1817 182,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156, | |
1818 156,156,156,156,156,156,156,156,88,151,151,151,151,151,136,135, | |
1819 6,6,6,1,6,6,6,6,6,4,28,28,30,6,6,6,6,6,89,30,30,21,21,30,21,29,21,28,1, | |
1820 128,128,94,94,128,128,128,87,89,88,84,85,13,90,90,131,130,92,163,15,91,91, | |
1821 86,130,152,93,93,93,161, | |
1822 153,162, | |
1823 128,128,94,94,128,128,128,87,89,88,84,85,13,92,90,131,130,92,163,15,91,91, | |
1824 86,130,155,155,161, | |
1825 154,149, | |
1826 156,157,84,85,155,167,253,158,159, | |
1827 156,157,84,85,155,147,253,158,159, | |
1828 208,208,208,208,160,208,208,208,208,208,208,208,208,208,96,66, | |
1829 68,68,68,68,68,46,51,97,161,98,65, | |
1830 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, | |
1831 280,280,280,280,280,280,280,280,280,14,280,280,280,98,69,162,18,131, | |
1832 100,42,101,63, | |
1833 6,6,6,1,6,6,6,6,6,6,4,28,28,30,6,6,6,6,6,6,6,6,100,30,30,22,22,30,22,29,22, | |
1834 28,1, | |
1835 128,128,94,178,94,128,128,128,87,89,88,84,85,13,78,79,76,101,77,82,81,90, | |
1836 131,130,92,163,97,64,96,15,91,91,86,130,96,146,95,96,93,93,93,161,83,80, | |
1837 100,41,101,40, | |
1838 1,2,111,2,2,1, | |
1839 94,94,104,78,15, | |
1840 163,1,163,2,105,2,2,163,2,1, | |
1841 3,1,3,3,3,3,2,3,3,3,3,3,3,106,2,2,89,2,1, | |
1842 94,94,90,91,15, | |
1843 106,13,108,87,164,109,164,108,107,109, | |
1844 106,13,81,87,83,108,107,93, | |
1845 166,165,110, | |
1846 1,167,111,167,167,167,1, | |
1847 1,168,112,168,168,168,235,1, | |
1848 1,169,113,169,169,169,1, | |
1849 4,28,28,170,51,114,171,170,29,170,28,233,170, | |
1850 4,28,28,170,51,115,172,170,29,170,28,232,170, | |
1851 1,168,116,168,168,168,231,1, | |
1852 1,168,117,168,168,168,230,1, | |
1853 1,168,118,168,168,168,229,1, | |
1854 1,168,119,168,168,168,228,1, | |
1855 1,168,120,168,168,168,227,1, | |
1856 1,168,121,168,168,168,226,1, | |
1857 1,4,28,28,174,122,174,174,173,174,173,29,173,28,1, | |
1858 98,98,98,1,98,98,176,175,123,176,176,175,176,1, | |
1859 94,94,124,220,15, | |
1860 46,219,177, | |
1861 4,5,5,23,126,178,215,6,5, | |
1862 279,127, | |
1863 278,128, | |
1864 179,179,129,179, | |
1865 180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180, | |
1866 180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180, | |
1867 180,130,180, | |
1868 183,183,183,183,183,183,183,183,183,39,183,183,183,183,183,183,183,183,183, | |
1869 183,183,40,183,183,183,183,183,183,183,183,183,131,182,181,183,183, | |
1870 184,132, | |
1871 193,193,133, | |
1872 143,143,144,143,134,185,141, | |
1873 195,195,197, | |
1874 194,194,196, | |
1875 203,203,176, | |
1876 202,202,202,202,175, | |
1877 201,201,201,201,201,134,133,192,191,190,189,188,187,186,185,184,183,182,186, | |
1878 201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201, | |
1879 201,201,201,201,201,139,201,205,181,207,201,136,135, | |
1880 68,68,68,68,68,68,68,46,51,140,161,98,60, | |
1881 187,188,100,68,141,249,189,54, | |
1882 190,100,59,189,54, | |
1883 100,58,189,57, | |
1884 191,75,144,247, | |
1885 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,145,2,2,246,2,1, | |
1886 143,143,144,143,146,192,141, | |
1887 139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, | |
1888 139,139,139,139,139,139,139,147,193, | |
1889 138,138,138,132, | |
1890 1,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,149,2,2,127,2,1, | |
1891 1,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,150,2,2,125,2,1, | |
1892 195,194,151,126, | |
1893 196,84,85,152,158,159,164, | |
1894 197,197,1,197,197,197,197,4,28,28,30,197,197,197,153,30,30,197,197,30,197, | |
1895 29,197,28,1, | |
1896 198,198,198,1,198,198,198,198,198,4,28,28,30,198,198,198,198,198,154,30,30, | |
1897 198,198,30,198,29,198,28,1, | |
1898 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,155,2,2,9,2,1, | |
1899 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,156,2,2,252,2,1, | |
1900 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,157,2,2,251,2,1, | |
1901 128,128,94,94,128,128,128,87,89,88,84,85,13,158,90,131,130,92,163,15,91,91, | |
1902 86,130,199,199,199,161, | |
1903 128,128,94,94,128,128,128,87,89,88,84,85,13,159,90,131,130,92,163,15,91,91, | |
1904 86,130,200,200,200,161, | |
1905 201,1,201,4,28,28,30,160,30,30,201,201,30,201,29,201,28,1, | |
1906 128,128,94,178,94,128,128,128,87,89,88,84,85,13,78,79,76,161,77,82,81,90, | |
1907 131,130,92,163,202,15,91,91,86,130,202,146,95,202,93,93,93,161,83,80, | |
1908 203,162, | |
1909 94,94,163,80,15, | |
1910 196,164,88, | |
1911 3,1,3,2,3,165,2,2,86,2,1, | |
1912 1,3,3,3,2,3,3,3,3,3,3,166,2,2,84,2,1, | |
1913 1,204,2,167,2,2,1, | |
1914 1,2,79,168,2,205,2,1, | |
1915 128,128,94,1,178,94,128,128,128,87,2,89,88,84,85,13,78,79,169,2,82,81,90, | |
1916 131,130,92,163,15,2,91,91,86,130,234,95,234,93,93,93,161,83,80,1, | |
1917 75,170,239, | |
1918 94,94,237,206,15,173, | |
1919 128,128,94,94,128,128,128,87,89,88,237,84,85,13,172,90,131,130,92,163,15,91, | |
1920 91,86,130,207,93,93,93,161, | |
1921 79,173,208, | |
1922 97,97,97,1,97,97,4,28,28,2,103,174,2,2,104,29,104,28,1, | |
1923 46,175,209, | |
1924 99,99,99,1,99,99,2,4,2,2,1, | |
1925 128,128,94,178,94,128,128,128,34,84,85,177,131,130,35,221,35,15,224,86,130, | |
1926 222,80, | |
1927 94,1,111,112,113,116,117,118,119,120,121,94,4,118,12,12,117,122,89,24,178, | |
1928 117,124,125,15,123,117,11,12,117,114,218,218,115,1, | |
1929 277,179, | |
1930 273,273,273,273,273,1,273,273,273,39,273,273,273,273,4,273,273,273,273,273, | |
1931 273,273,273,273,273,273,40,273,275,273,273,273,273,273,130,273,273,273, | |
1932 180,273,129,128,127,273,1, | |
1933 288,181, | |
1934 287,182, | |
1935 283,283,283,283,283,1,283,283,283,283,39,283,283,283,283,283,284,283,283, | |
1936 283,283,283,283,40,283,283,283,283,283,283,283,283,283,281,284,284,182, | |
1937 181,283,1, | |
1938 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,184,2,2,257,2,1, | |
1939 143,143,144,143,198,142, | |
1940 1,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,186,2,2,174,2,1, | |
1941 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,187,2,2,255,2,1, | |
1942 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,188,2,2,250,2,1, | |
1943 128,128,94,178,94,128,128,128,87,89,88,84,85,13,78,79,76,189,77,82,81,90, | |
1944 131,130,92,163,55,140,96,15,91,91,86,130,96,146,95,96,93,93,93,161,83, | |
1945 80, | |
1946 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,190,2,2,254,2,1, | |
1947 1,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,191,2,2,248,2,1, | |
1948 143,143,144,143,136,142, | |
1949 140,140,133, | |
1950 156,156,156,156,156,156,156,134,133,192,191,190,189,188,187,186,185,184,183, | |
1951 182,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156, | |
1952 156,156,156,156,156,156,156,156,194,210,210,210,210,210,136,135, | |
1953 1,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,195,2,2,20,2,1, | |
1954 1,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,196,2,2,19,2,1, | |
1955 128,128,128,128,128,87,211,84,85,197,131,130,166,166,86,130, | |
1956 128,128,94,94,128,128,128,87,89,88,84,85,13,198,90,131,130,92,163,15,91,91, | |
1957 86,130,153,153,161, | |
1958 154,151, | |
1959 154,150, | |
1960 210,210,201,209,212, | |
1961 208,208,208,208,160,208,208,208,208,208,208,208,208,208,202,67, | |
1962 1,3,3,3,3,3,3,3,2,3,3,3,3,203,2,2,70,2,1, | |
1963 1,213,204,213,213,213,1, | |
1964 128,128,94,178,94,128,128,128,87,89,88,84,85,13,78,79,205,82,81,90,131,130, | |
1965 92,163,15,91,91,86,130,243,95,243,93,93,93,161,83,80,214, | |
1966 46,170,215, | |
1967 84,85,241,158,159, | |
1968 94,94,208,206,15,172, | |
1969 178,209,223,80, | |
1970 195,210,165, | |
1971 156,156,156,156,156,156,156,134,133,192,191,190,189,188,187,186,185,184,183, | |
1972 182,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156, | |
1973 156,156,156,156,156,156,156,156,211,216,216,216,216,216,136,135, | |
1974 211,211,211,1,3,3,3,3,211,211,3,3,3,2,3,3,3,3,3,3,212,2,2,212,2,1, | |
1975 1,2,79,213,2,217,2,1, | |
1976 4,28,28,170,51,214,218,170,29,170,28,242,170, | |
1977 128,128,128,128,128,87,211,84,85,215,131,130,171,171,86,130, | |
1978 195,216,126, | |
1979 128,128,94,94,128,128,128,87,89,88,84,85,13,217,90,131,130,92,163,15,91,91, | |
1980 86,130,219,93,93,93,161, | |
1981 128,128,94,178,94,128,128,128,87,89,88,237,84,85,13,78,79,218,82,81,90,131, | |
1982 130,92,163,15,91,91,86,130,244,95,244,93,93,93,161,83,80, | |
1983 84,85,240,158,159, | |
1984 | |
1985 }; | |
1986 | |
1987 | |
1988 static const unsigned short ag_sbt[] = { | |
1989 0, 18, 59, 65, 79, 118, 120, 124, 155, 178, 213, 215, 219, 221, | |
1990 252, 294, 335, 343, 369, 412, 416, 423, 426, 430, 437, 444, 467, 469, | |
1991 471, 473, 478, 528, 530, 570, 581, 587, 602, 604, 626, 629, 667, 705, | |
1992 707, 709, 713, 753, 756, 807, 847, 861, 863, 866, 900, 906, 937, 990, | |
1993 1009,1035,1043,1051,1058,1068,1074,1084,1095,1103,1113,1131,1156,1178, | |
1994 1216,1251,1289,1324,1326,1370,1392,1440,1477,1510,1547,1604,1649,1702, | |
1995 1704,1733,1762,1771,1803,1856,1885,1914,1916,1943,1945,1954,1963,1979, | |
1996 1990,2027,2031,2064,2108,2112,2118,2123,2133,2152,2157,2167,2175,2178, | |
1997 2185,2193,2200,2213,2226,2234,2242,2250,2258,2266,2274,2289,2303,2308, | |
1998 2311,2320,2322,2324,2328,2368,2404,2406,2409,2416,2419,2422,2425,2430, | |
1999 2480,2493,2501,2506,2510,2514,2536,2543,2571,2575,2605,2635,2639,2646, | |
2000 2671,2700,2722,2744,2766,2794,2822,2840,2882,2884,2889,2892,2903,2920, | |
2001 2927,2935,2978,2981,2987,3017,3020,3039,3042,3053,3076,3111,3113,3158, | |
2002 3160,3162,3202,3224,3230,3253,3275,3297,3341,3363,3385,3391,3394,3447, | |
2003 3477,3507,3523,3550,3552,3554,3559,3575,3594,3601,3640,3643,3648,3654, | |
2004 3658,3661,3714,3740,3748,3761,3777,3780,3809,3848,3853 | |
2005 }; | |
2006 | |
2007 | |
2008 static const unsigned short ag_sbe[] = { | |
2009 11, 56, 61, 74, 115, 119, 122, 148, 161, 212, 214, 217, 220, 241, | |
2010 289, 329, 338, 362, 404, 414, 418, 424, 427, 433, 440, 450, 468, 470, | |
2011 472, 475, 520, 529, 567, 577, 585, 598, 603, 621, 627, 663, 701, 706, | |
2012 708, 711, 751, 754, 796, 824, 855, 862, 864, 889, 902, 931, 960,1002, | |
2013 1023,1039,1047,1053,1062,1072,1076,1089,1098,1112,1120,1145,1172,1214, | |
2014 1249,1287,1322,1325,1363,1386,1429,1472,1499,1536,1592,1621,1670,1703, | |
2015 1722,1751,1767,1802,1848,1874,1898,1915,1929,1944,1950,1959,1977,1986, | |
2016 2022,2028,2053,2081,2109,2114,2120,2127,2146,2154,2159,2169,2177,2180, | |
2017 2187,2195,2205,2218,2228,2236,2244,2252,2260,2268,2279,2297,2305,2309, | |
2018 2315,2321,2323,2326,2366,2399,2405,2408,2413,2418,2421,2424,2429,2472, | |
2019 2489,2497,2503,2507,2512,2530,2540,2569,2574,2599,2629,2637,2642,2660, | |
2020 2689,2716,2738,2760,2779,2807,2829,2857,2883,2886,2890,2897,2914,2923, | |
2021 2930,2953,2979,2983,3001,3018,3031,3040,3049,3064,3096,3112,3151,3159, | |
2022 3161,3195,3218,3228,3247,3269,3291,3314,3357,3379,3389,3393,3439,3471, | |
2023 3501,3516,3536,3551,3553,3556,3573,3588,3596,3617,3641,3645,3650,3655, | |
2024 3659,3706,3734,3743,3753,3770,3778,3793,3826,3850,3853 | |
2025 }; | |
2026 | |
2027 | |
2028 static const unsigned char ag_fl[] = { | |
2029 1,1,2,0,1,2,0,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,2,0,1,0,2,4,2,2,1, | |
2030 1,1,2,3,1,2,3,2,1,1,1,1,2,1,3,1,3,4,1,2,2,1,2,1,1,2,1,1,2,2,2,2,4,0,2, | |
2031 4,1,2,0,1,3,1,0,4,0,5,1,1,2,4,2,4,1,3,2,1,2,1,2,1,2,3,3,2,3,2,1,1,1,2, | |
2032 1,2,1,0,1,2,3,1,2,3,3,2,2,2,1,2,0,1,2,1,3,3,3,0,1,1,1,1,2,1,1,2,1,2,0, | |
2033 2,1,2,1,1,1,1,1,1,1,3,3,1,4,1,2,1,1,1,1,1,1,1,1,3,5,4,3,3,3,1,3,4,3,4, | |
2034 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,1,1,2,1,1,2,2,2,1,2,1,2,0,3, | |
2035 1,2,2,3,0,2,3,1,3,1,2,3,3,4,3,1,2,2,2,2,2,2,2,2,3,2,0,1,1,2,6,3,4,1,3, | |
2036 1,3,3,4,3,4,3,3,2,4,4,2,4,3,2,1,2,0,1,2,0,2,1,1,3,2,2,0,2,1,3,1,3,2,2, | |
2037 0,2,1,2,2,1,1,2,2,2,1,2,2,1,1,2,1,2,0,1,2,1,1,2,1,2,0,1,2,1 | |
2038 }; | |
2039 | |
2040 static const unsigned char ag_ptt[] = { | |
2041 0, 4, 4, 5, 5, 1, 9, 9, 6, 10, 12, 14, 16, 18, 20, 22, 24, 26, | |
2042 28, 30, 32, 34, 36, 40, 40, 42, 42, 44, 44, 45, 45, 38, 41, 41, 43, 43, | |
2043 47, 47, 47, 52, 52, 47, 50, 48, 48, 48, 49, 49, 57, 57, 59, 59, 58, 63, | |
2044 63, 65, 66, 66, 68, 68, 64, 53, 53, 53, 51, 70, 69, 69, 67, 67, 67, 62, | |
2045 62, 77, 77, 62, 75, 80, 75, 81, 75, 78, 78, 78, 76, 84, 84, 87, 83, 88, | |
2046 90, 90, 82, 82, 91, 91, 91, 94, 94, 94, 60, 3, 3, 8, 8, 8, 98, 98, | |
2047 102,102,100,100,104,104,104, 39, 39, 39, 39,108,108,109,109, 99,110,110, | |
2048 110,111,117,117,115,115,116,116,123,123,116,118,118,120,120,124,124,128, | |
2049 128, 71, 71,130,130,132,132,132,134,134,135,135,114,114,114,114,114,137, | |
2050 137,137,137,143,143, 54, 54, 54,145,145,146,146,147,149,149,149,148,154, | |
2051 154,154,139,139,139,139,139,139,139,139,139,139,139,167,169,141,140,140, | |
2052 142,151,151,151,151,151,152,152,153,153, 72, 72,175,175,174, 56,178,178, | |
2053 176,177,177,179,179,179,179,179,179,179,180,180,180,180,180,180,180,180, | |
2054 180,180,192,192,192,189,188,188,182,195,195,133,133,133,133,133,133,133, | |
2055 133,133,133,133,131,131, 55,204,205,205,206,206,202,203,203,207,207,207, | |
2056 207,207,208,208,212,212,212,212,212,212,214, 73,215,215,215,216,216,216, | |
2057 216, 97,219,219, 97,225,225,225,226,226,227,227,211,228,228,228,229,229, | |
2058 230,230,210,224 | |
2059 }; | |
2060 | |
2061 static const unsigned char *ag_valid(int ag_k) { | |
2062 const unsigned char *ag_tp = &ag_tstt[ag_sbt[(PCB).sn+1]]; | |
2063 while (*--ag_tp != (unsigned char) ag_k) if (*ag_tp == 0) return NULL; | |
2064 return ag_tp; | |
2065 } | |
2066 | |
2067 int pgg_change_reduction(pgg_token_type ag_k) { | |
2068 if (!ag_valid(ag_k)) return 0; | |
2069 (PCB).reduction_token = ag_k; | |
2070 return 1; | |
2071 } | |
2072 | |
2073 static void near ag_default(const int *ag_tp) { | |
2074 (PCB).ag_dsn = (PCB).sn; | |
2075 (PCB).ag_dtl = ag_tp; | |
2076 while (!ag_valid((pgg_token_type) *ag_tp)) ag_tp++; | |
2077 (PCB).reduction_token = (pgg_token_type) *ag_tp; | |
2078 } | |
2079 | |
2080 | |
2081 | |
2082 static void near ag_ra(void) | |
2083 { | |
2084 switch(ag_rpx[(PCB).ag_ap]) { | |
2085 case 1: ag_rp_1(); break; | |
2086 case 2: ag_rp_3(V(0,(int *))); break; | |
2087 case 3: ag_rp_5(V(0,(int *))); break; | |
2088 case 4: V(0,(int *)) = ag_rp_7(V(0,(int *))); break; | |
2089 case 5: V(0,(int *)) = ag_rp_8(V(0,(int *))); break; | |
2090 case 6: V(0,(int *)) = ag_rp_9(); break; | |
2091 case 7: V(0,(int *)) = ag_rp_10(V(0,(int *))); break; | |
2092 case 8: ag_rp_11(V(0,(int *))); break; | |
2093 case 9: ag_rp_12(V(2,(int *))); break; | |
2094 case 10: V(0,(int *)) = ag_rp_13(); break; | |
2095 case 11: V(0,(int *)) = ag_rp_14(); break; | |
2096 case 12: V(0,(int *)) = ag_rp_15(); break; | |
2097 case 13: ag_rp_16(V(0,(int *))); break; | |
2098 case 14: ag_rp_17(V(1,(int *))); break; | |
2099 case 15: ag_rp_18(V(0,(int *))); break; | |
2100 case 16: V(0,(int *)) = ag_rp_19(V(1,(int *))); break; | |
2101 case 17: ag_rp_20(V(0,(int *))); break; | |
2102 case 18: ag_rp_21(V(0,(int *))); break; | |
2103 case 19: ag_rp_22(V(1,(int *))); break; | |
2104 case 20: V(0,(int *)) = ag_rp_23(V(1,(int *))); break; | |
2105 case 21: ag_rp_24(V(0,(int *)), V(1,(int *))); break; | |
2106 case 22: ag_rp_25(V(2,(int *)), V(3,(int *))); break; | |
2107 case 23: V(0,(int *)) = ag_rp_26(); break; | |
2108 case 24: V(0,(int *)) = ag_rp_27(); break; | |
2109 case 25: V(0,(int *)) = ag_rp_28(); break; | |
2110 case 26: ag_rp_29(); break; | |
2111 case 27: ag_rp_30(); break; | |
2112 case 28: ag_rp_31(); break; | |
2113 case 29: ag_rp_32(); break; | |
2114 case 30: ag_rp_33(); break; | |
2115 case 31: ag_rp_34(); break; | |
2116 case 32: ag_rp_35(); break; | |
2117 case 33: ag_rp_36(); break; | |
2118 case 34: ag_rp_37(); break; | |
2119 case 35: ag_rp_38(); break; | |
2120 case 36: ag_rp_39(); break; | |
2121 case 37: ag_rp_40(); break; | |
2122 case 38: ag_rp_41(); break; | |
2123 case 39: ag_rp_42(); break; | |
2124 case 40: ag_rp_43(V(0,(int *))); break; | |
2125 case 41: ag_rp_44(V(1,(int *))); break; | |
2126 case 42: ag_rp_45(V(2,(int *))); break; | |
2127 case 43: ag_rp_46(V(2,(int *))); break; | |
2128 case 44: ag_rp_47(V(1,(int *))); break; | |
2129 case 45: ag_rp_48(V(2,(int *))); break; | |
2130 case 46: V(0,(int *)) = ag_rp_49(V(1,(int *))); break; | |
2131 case 47: V(0,(int *)) = ag_rp_50(V(1,(int *))); break; | |
2132 case 48: V(0,(int *)) = ag_rp_51(V(0,(int *)), V(1,(int *))); break; | |
2133 case 49: V(0,(int *)) = ag_rp_52(); break; | |
2134 case 50: V(0,(int *)) = ag_rp_53(); break; | |
2135 case 51: V(0,(int *)) = ag_rp_54(V(1,(int *))); break; | |
2136 case 52: V(0,(int *)) = ag_rp_55(V(1,(int *))); break; | |
2137 case 53: V(0,(int *)) = ag_rp_56(V(0,(int *))); break; | |
2138 case 54: V(0,(int *)) = ag_rp_57(V(0,(int *)), V(1,(int *))); break; | |
2139 case 55: V(0,(int *)) = ag_rp_58(); break; | |
2140 case 56: V(0,(int *)) = ag_rp_59(V(0,(int *)), V(1,(int *))); break; | |
2141 case 57: V(0,(int *)) = ag_rp_60(V(0,(int *))); break; | |
2142 case 58: V(0,(int *)) = ag_rp_61(V(0,(int *)), V(1,(int *))); break; | |
2143 case 59: V(0,(int *)) = ag_rp_62(V(0,(int *))); break; | |
2144 case 60: V(0,(int *)) = ag_rp_63(V(0,(int *))); break; | |
2145 case 61: V(0,(int *)) = ag_rp_64(V(0,(int *))); break; | |
2146 case 62: V(0,(int *)) = ag_rp_65(V(0,(node *))); break; | |
2147 case 63: V(0,(node *)) = ag_rp_66(V(0,(node *)), V(2,(node *))); break; | |
2148 case 64: V(0,(node *)) = ag_rp_67(V(0,(node *)), V(2,(node *))); break; | |
2149 case 65: V(0,(node *)) = ag_rp_68(V(0,(node *)), V(3,(node *))); break; | |
2150 case 66: V(0,(node *)) = ag_rp_69(V(1,(node *))); break; | |
2151 case 67: V(0,(int *)) = ag_rp_70(V(0,(int *))); break; | |
2152 case 68: V(0,(node *)) = ag_rp_71(); break; | |
2153 case 69: V(0,(node *)) = ag_rp_72(V(0,(int *))); break; | |
2154 case 70: V(0,(node *)) = ag_rp_73(); break; | |
2155 case 71: V(0,(node *)) = ag_rp_74(V(1,(node *))); break; | |
2156 case 72: ag_rp_75(V(1,(int *)), V(3,(int *))); break; | |
2157 case 73: ag_rp_76(V(0,(int *)), V(3,(int *))); break; | |
2158 case 74: ag_rp_77(V(2,(node *))); break; | |
2159 case 75: ag_rp_78(V(2,(int *))); break; | |
2160 case 76: ag_rp_79(V(2,(int *))); break; | |
2161 case 77: ag_rp_80(); break; | |
2162 case 78: ag_rp_81(V(2,(int *))); break; | |
2163 case 79: ag_rp_82(); break; | |
2164 case 80: V(0,(int *)) = ag_rp_83(V(0,(int *))); break; | |
2165 case 81: V(0,(int *)) = ag_rp_84(); break; | |
2166 case 82: V(0,(int *)) = ag_rp_85(); break; | |
2167 case 83: V(0,(int *)) = ag_rp_86(); break; | |
2168 case 84: V(0,(int *)) = ag_rp_87(); break; | |
2169 case 85: V(0,(int *)) = ag_rp_88(); break; | |
2170 case 86: V(0,(int *)) = ag_rp_89(); break; | |
2171 case 87: V(0,(int *)) = ag_rp_90(); break; | |
2172 case 88: V(0,(int *)) = ag_rp_91(); break; | |
2173 case 89: V(0,(int *)) = ag_rp_92(); break; | |
2174 case 90: V(0,(int *)) = ag_rp_93(); break; | |
2175 case 91: V(0,(int *)) = ag_rp_94(); break; | |
2176 case 92: V(0,(int *)) = ag_rp_95(V(1,(int *))); break; | |
2177 case 93: V(0,(int *)) = ag_rp_96(V(0,(int *)), V(1,(int *))); break; | |
2178 case 94: V(0,(int *)) = ag_rp_97(V(0,(int *)), V(1,(int *))); break; | |
2179 case 95: V(0,(int *)) = ag_rp_98(V(1,(int *))); break; | |
2180 case 96: ag_rp_99(V(0,(int *))); break; | |
2181 case 97: ag_rp_100(V(0,(int *))); break; | |
2182 case 98: ag_rp_101(V(1,(int *))); break; | |
2183 case 99: ag_rp_102(V(1,(int *))); break; | |
2184 case 100: ag_rp_103(V(1,(int *))); break; | |
2185 case 101: ag_rp_104(V(0,(int *))); break; | |
2186 case 102: ag_rp_105(V(1,(int *))); break; | |
2187 case 103: ag_rp_106(V(0,(int *))); break; | |
2188 case 104: ag_rp_107(V(1,(int *))); break; | |
2189 case 105: V(0,(int *)) = ag_rp_108(); break; | |
2190 case 106: V(0,(int *)) = ag_rp_109(); break; | |
2191 case 107: ag_rp_110(V(0,(int *))); break; | |
2192 case 108: ag_rp_111(V(1,(int *))); break; | |
2193 case 109: ag_rp_112(); break; | |
2194 case 110: ag_rp_113(); break; | |
2195 case 111: ag_rp_114(); break; | |
2196 case 112: ag_rp_115(); break; | |
2197 case 113: ag_rp_116(); break; | |
2198 case 114: ag_rp_117(V(2,(int *))); break; | |
2199 case 115: ag_rp_118(); break; | |
2200 case 116: ag_rp_119(); break; | |
2201 case 117: ag_rp_120(); break; | |
2202 case 118: ag_rp_121(); break; | |
2203 case 119: ag_rp_122(); break; | |
2204 case 120: ag_rp_123(); break; | |
2205 case 121: ag_rp_124(); break; | |
2206 case 122: ag_rp_125(V(2,(int *))); break; | |
2207 case 123: ag_rp_126(); break; | |
2208 case 124: ag_rp_127(V(5,(node *))); break; | |
2209 case 125: ag_rp_128(V(2,(node *))); break; | |
2210 case 126: ag_rp_129(V(0,(int *))); break; | |
2211 case 127: ag_rp_130(V(2,(int *))); break; | |
2212 case 128: V(0,(int *)) = ag_rp_131(); break; | |
2213 case 129: V(0,(int *)) = ag_rp_132(); break; | |
2214 case 130: V(0,(int *)) = ag_rp_133(); break; | |
2215 case 131: V(0,(int *)) = ag_rp_134(); break; | |
2216 case 132: V(0,(int *)) = ag_rp_135(); break; | |
2217 case 133: V(0,(int *)) = ag_rp_136(); break; | |
2218 case 134: V(0,(int *)) = ag_rp_137(V(0,(node *))); break; | |
2219 case 135: V(0,(int *)) = ag_rp_138(V(0,(node *))); break; | |
2220 case 136: V(0,(int *)) = ag_rp_139(V(0,(node *))); break; | |
2221 case 137: V(0,(int *)) = ag_rp_140(); break; | |
2222 case 138: V(0,(int *)) = ag_rp_141(); break; | |
2223 case 139: V(0,(int *)) = ag_rp_142(); break; | |
2224 case 140: V(0,(int *)) = ag_rp_143(); break; | |
2225 case 141: ag_rp_144(); break; | |
2226 case 142: ag_rp_145(); break; | |
2227 case 143: ag_rp_146(); break; | |
2228 case 144: ag_rp_147(); break; | |
2229 case 145: ag_rp_148(); break; | |
2230 case 146: ag_default(&ag_rtt[0]); ag_rp_149(); break; | |
2231 } | |
2232 (PCB).la_ptr = (PCB).pointer; | |
2233 } | |
2234 | |
2235 | |
2236 static const unsigned char ag_ctn[] = { | |
2237 0,0, 97,1, 0,0, 0,0, 99,1, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, | |
2238 0,0, 0,0,202,1, 60,1, 58,1, 56,1, 55,1, 0,0, 49,1, 57,1, 47,1, 0,0, | |
2239 0,0, 0,0, 0,0, 0,0, 0,0, 98,1, 0,0, 0,0, 0,0, 0,0, 75,1, 0,0, | |
2240 58,2,176,1, 56,2,211,1,210,1,207,1,207,1,207,1, 0,0, 55,2, 0,0, 54,2, | |
2241 0,0, 0,0, 57,1, 0,0, 57,2, 50,1, 50,1, 0,0, 0,0, 0,0, 0,0, 0,0, | |
2242 75,2, 75,2, 0,0, 84,1, 0,0, 0,0, 58,3,176,2, 0,0, 0,0, 0,0, 0,0, | |
2243 0,0,207,2, 0,0, 0,0,131,1,131,1,133,1, 0,0,147,1,133,1,133,1,133,1, | |
2244 0,0, 0,0,111,1,110,1,143,1, 0,0, 0,0,143,1, 0,0, 0,0,133,1,133,1, | |
2245 69,1, 0,0, 67,1, 0,0, 0,0, 0,0, 0,0, 0,0, 75,3, 75,3, 0,0, 0,0, | |
2246 0,0, 0,0, 0,0,180,1,180,1,180,1,180,1,180,1,180,1,180,1,180,1,180,1, | |
2247 180,1,180,1,179,1,179,1,179,1,179,1, 0,0, 0,0, 0,0, 0,0, 0,0, 73,1, | |
2248 131,2,140,1,142,1, 0,0,140,1,149,1,149,1,149,1, 64,1, 0,0, 68,1, 68,1, | |
2249 133,2,133,2, 0,0, 0,0,118,1,111,2,110,2,143,2, 0,0,143,2, 0,0, 0,0, | |
2250 133,2,133,2, 0,0, 0,0, 72,1, 69,2, 67,2, 75,4, 0,0, 84,3, 0,0, 0,0, | |
2251 182,1, 0,0, 0,0,146,2,180,2,146,2, 0,0,179,2, 0,0,179,2, 0,0, 0,0, | |
2252 0,0, 0,0, 0,0, 0,0,131,3,124,1,147,3,133,3,133,3, 0,0,133,3,133,3, | |
2253 124,1,120,1,143,3, 0,0, 0,0,143,3, 0,0, 0,0, 0,0, 72,2, 69,3, 67,3, | |
2254 180,3,182,2,145,1, 0,0,146,3,179,3,143,4,110,1, 0,0, 0,0,195,1,145,2, | |
2255 110,2,180,5,195,2, 0,0 | |
2256 }; | |
2257 | |
2258 #ifndef MISSING_FORMAT | |
2259 #define MISSING_FORMAT "Missing %s" | |
2260 #endif | |
2261 #ifndef UNEXPECTED_FORMAT | |
2262 #define UNEXPECTED_FORMAT "Unexpected %s" | |
2263 #endif | |
2264 #ifndef UNNAMED_TOKEN | |
2265 #define UNNAMED_TOKEN "input" | |
2266 #endif | |
2267 | |
2268 | |
2269 static void near ag_diagnose(void) { | |
2270 int ag_snd = (PCB).sn; | |
2271 int ag_k = ag_sbt[ag_snd]; | |
2272 | |
2273 if (*TOKEN_NAMES[ag_tstt[ag_k]] && ag_astt[ag_k + 1] == ag_action_8) { | |
2274 sprintf((PCB).ag_msg, MISSING_FORMAT, TOKEN_NAMES[ag_tstt[ag_k]]); | |
2275 } | |
2276 else if (ag_astt[ag_sbe[(PCB).sn]] == ag_action_8 | |
2277 && (ag_k = (int) ag_sbe[(PCB).sn] + 1) == (int) ag_sbt[(PCB).sn+1] - 1 | |
2278 && *TOKEN_NAMES[ag_tstt[ag_k]]) { | |
2279 sprintf((PCB).ag_msg, MISSING_FORMAT, TOKEN_NAMES[ag_tstt[ag_k]]); | |
2280 } | |
2281 else if ((PCB).token_number && *TOKEN_NAMES[(PCB).token_number]) { | |
2282 sprintf((PCB).ag_msg, UNEXPECTED_FORMAT, TOKEN_NAMES[(PCB).token_number]); | |
2283 } | |
2284 else if (isprint(INPUT_CODE((*(PCB).pointer))) && INPUT_CODE((*(PCB).pointer)) != '\\') { | |
2285 char buf[20]; | |
2286 sprintf(buf, "\'%c\'", (char) INPUT_CODE((*(PCB).pointer))); | |
2287 sprintf((PCB).ag_msg, UNEXPECTED_FORMAT, buf); | |
2288 } | |
2289 else sprintf((PCB).ag_msg, UNEXPECTED_FORMAT, UNNAMED_TOKEN); | |
2290 (PCB).error_message = (PCB).ag_msg; | |
2291 | |
2292 | |
2293 { | |
2294 int ag_sx, ag_t; | |
2295 | |
2296 ag_sx = (PCB).ssx; | |
2297 (PCB).ss[ag_sx] = (PCB).sn; | |
2298 do { | |
2299 while (ag_sx && ag_ctn[2*(ag_snd = (PCB).ss[ag_sx])] == 0) ag_sx--; | |
2300 if (ag_sx) { | |
2301 ag_t = ag_ctn[2*ag_snd]; | |
2302 ag_sx -= ag_ctn[2*ag_snd +1]; | |
2303 ag_snd = (PCB).ss[ag_sx]; | |
2304 } | |
2305 else { | |
2306 ag_snd = 0; | |
2307 ag_t = ag_ptt[0]; | |
2308 } | |
2309 } while (ag_sx && *TOKEN_NAMES[ag_t]==0); | |
2310 if (*TOKEN_NAMES[ag_t] == 0) ag_t = 0; | |
2311 (PCB).error_frame_ssx = ag_sx; | |
2312 (PCB).error_frame_token = (pgg_token_type) ag_t; | |
2313 } | |
2314 | |
2315 | |
2316 } | |
2317 static int near ag_action_1_r_proc(void); | |
2318 static int near ag_action_2_r_proc(void); | |
2319 static int near ag_action_3_r_proc(void); | |
2320 static int near ag_action_4_r_proc(void); | |
2321 static int near ag_action_1_s_proc(void); | |
2322 static int near ag_action_3_s_proc(void); | |
2323 static int near ag_action_1_proc(void); | |
2324 static int near ag_action_2_proc(void); | |
2325 static int near ag_action_3_proc(void); | |
2326 static int near ag_action_4_proc(void); | |
2327 static int near ag_action_5_proc(void); | |
2328 static int near ag_action_6_proc(void); | |
2329 static int near ag_action_7_proc(void); | |
2330 static int near ag_action_8_proc(void); | |
2331 static int near ag_action_9_proc(void); | |
2332 static int near ag_action_10_proc(void); | |
2333 static int near ag_action_11_proc(void); | |
2334 static int near ag_action_8_proc(void); | |
2335 | |
2336 | |
2337 static int (near *const ag_r_procs_scan[])(void) = { | |
2338 ag_action_1_r_proc, | |
2339 ag_action_2_r_proc, | |
2340 ag_action_3_r_proc, | |
2341 ag_action_4_r_proc | |
2342 }; | |
2343 | |
2344 static int (near *const ag_s_procs_scan[])(void) = { | |
2345 ag_action_1_s_proc, | |
2346 ag_action_2_r_proc, | |
2347 ag_action_3_s_proc, | |
2348 ag_action_4_r_proc | |
2349 }; | |
2350 | |
2351 static int (near *const ag_gt_procs_scan[])(void) = { | |
2352 ag_action_1_proc, | |
2353 ag_action_2_proc, | |
2354 ag_action_3_proc, | |
2355 ag_action_4_proc, | |
2356 ag_action_5_proc, | |
2357 ag_action_6_proc, | |
2358 ag_action_7_proc, | |
2359 ag_action_8_proc, | |
2360 ag_action_9_proc, | |
2361 ag_action_10_proc, | |
2362 ag_action_11_proc, | |
2363 ag_action_8_proc | |
2364 }; | |
2365 | |
2366 | |
2367 static int near ag_rns(int ag_t, int *ag_sx, int ag_snd) { | |
2368 while (1) { | |
2369 int ag_act, ag_k = ag_sbt[ag_snd], ag_lim = ag_sbt[ag_snd+1]; | |
2370 int ag_p; | |
2371 | |
2372 while (ag_k < ag_lim && ag_tstt[ag_k] != ag_t) ag_k++; | |
2373 if (ag_k == ag_lim) break; | |
2374 ag_act = ag_astt[ag_k]; | |
2375 ag_p = ag_pstt[ag_k]; | |
2376 if (ag_act == ag_action_2) return ag_p; | |
2377 if (ag_act == ag_action_10 || ag_act == ag_action_11) { | |
2378 (*ag_sx)--; | |
2379 return ag_snd; | |
2380 } | |
2381 if (ag_act != ag_action_3 && | |
2382 ag_act != ag_action_4) break; | |
2383 *ag_sx -= (ag_fl[ag_p] - 1); | |
2384 ag_snd = (PCB).ss[*ag_sx]; | |
2385 ag_t = ag_ptt[ag_p]; | |
2386 } | |
2387 return 0; | |
2388 } | |
2389 | |
2390 static int near ag_jns(int ag_t) { | |
2391 int ag_k; | |
2392 | |
2393 ag_k = ag_sbt[(PCB).sn]; | |
2394 while (ag_tstt[ag_k] != ag_t && ag_tstt[ag_k]) ag_k++; | |
2395 while (1) { | |
2396 int ag_p = ag_pstt[ag_k]; | |
2397 int ag_sd; | |
2398 | |
2399 switch (ag_astt[ag_k]) { | |
2400 case ag_action_2: | |
2401 GET_CONTEXT; | |
2402 (PCB).ss[(PCB).ssx] = (PCB).sn; | |
2403 return ag_p; | |
2404 case ag_action_10: | |
2405 case ag_action_11: | |
2406 return (PCB).ss[(PCB).ssx--]; | |
2407 case ag_action_9: | |
2408 GET_CONTEXT; | |
2409 (PCB).ss[(PCB).ssx] = (PCB).sn; | |
2410 (PCB).ssx++; | |
2411 (PCB).sn = ag_p; | |
2412 ag_k = ag_sbt[(PCB).sn]; | |
2413 while (ag_tstt[ag_k] != ag_t && ag_tstt[ag_k]) ag_k++; | |
2414 continue; | |
2415 case ag_action_3: | |
2416 case ag_action_4: | |
2417 ag_sd = ag_fl[ag_p] - 1; | |
2418 if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; | |
2419 else GET_CONTEXT; | |
2420 (PCB).ss[(PCB).ssx] = (PCB).sn; | |
2421 ag_t = ag_ptt[ag_p]; | |
2422 ag_k = ag_sbt[(PCB).sn+1]; | |
2423 while (ag_tstt[--ag_k] != ag_t); | |
2424 continue; | |
2425 case ag_action_5: | |
2426 case ag_action_6: | |
2427 if (ag_fl[ag_p]) break; | |
2428 (PCB).sn = ag_rns(ag_ptt[ag_p],&(PCB).ssx, (PCB).sn); | |
2429 (PCB).ss[++(PCB).ssx] = (PCB).sn; | |
2430 ag_k = ag_sbt[(PCB).sn]; | |
2431 while (ag_tstt[ag_k] != ag_t && ag_tstt[ag_k]) ag_k++; | |
2432 continue; | |
2433 } | |
2434 break; | |
2435 } | |
2436 return 0; | |
2437 } | |
2438 | |
2439 | |
2440 static int near ag_atx(int ag_t, int *ag_sx, int ag_snd) { | |
2441 int ag_k, ag_f; | |
2442 int ag_save_btsx = (PCB).btsx; | |
2443 int ag_flag = 1; | |
2444 | |
2445 while (1) { | |
2446 int ag_a; | |
2447 | |
2448 (PCB).bts[53 - ++(PCB).btsx] = *ag_sx; | |
2449 (PCB).ss[53 - (PCB).btsx] = (PCB).ss[*ag_sx]; | |
2450 (PCB).ss[*ag_sx] = ag_snd; | |
2451 ag_k = ag_sbt[ag_snd]; | |
2452 while (ag_tstt[ag_k] != ag_t && ag_tstt[ag_k]) ag_k++; | |
2453 ag_a = ag_astt[ag_k]; | |
2454 if (ag_a == ag_action_2 || | |
2455 ag_a == ag_action_3 || | |
2456 ag_a == ag_action_10 || | |
2457 ag_a == ag_action_11 || | |
2458 ag_a == ag_action_1 || | |
2459 ag_a == ag_action_4) break; | |
2460 if ((ag_a == ag_action_5 || | |
2461 ag_a == ag_action_6) && | |
2462 (ag_k = ag_fl[ag_f = ag_pstt[ag_k]]) == 0) { | |
2463 ag_snd = ag_rns(ag_ptt[ag_f],ag_sx, (PCB).ss[*ag_sx]); | |
2464 (*ag_sx)++; | |
2465 continue; | |
2466 } | |
2467 if (ag_a == ag_action_9) { | |
2468 ag_snd = ag_pstt[ag_k]; | |
2469 (*ag_sx)++; | |
2470 continue; | |
2471 } | |
2472 ag_flag = 0; | |
2473 break; | |
2474 } | |
2475 while ((PCB).btsx > ag_save_btsx) { | |
2476 *ag_sx = (PCB).bts[53 - (PCB).btsx]; | |
2477 (PCB).ss[*ag_sx] = (PCB).ss[53 - (PCB).btsx--]; | |
2478 } | |
2479 return ag_flag; | |
2480 } | |
2481 | |
2482 | |
2483 static int near ag_tst_tkn(void) { | |
2484 int ag_rk, ag_sx, ag_snd = (PCB).sn; | |
2485 | |
2486 (PCB).token_number = (pgg_token_type) AG_TCV(INPUT_CODE(*(PCB).la_ptr)); | |
2487 (PCB).la_ptr++; | |
2488 if (ag_key_index[(PCB).sn]) { | |
2489 unsigned ag_k = ag_key_index[(PCB).sn]; | |
2490 int ag_ch = CONVERT_CASE(INPUT_CODE(*(PCB).pointer)); | |
2491 if (ag_ch <= 255) { | |
2492 while (ag_key_ch[ag_k] < ag_ch) ag_k++; | |
2493 if (ag_key_ch[ag_k] == ag_ch) ag_get_key_word(ag_k); | |
2494 } | |
2495 } | |
2496 for (ag_rk = 0; ag_rk < (PCB).ag_lrss; ag_rk += 2) { | |
2497 ag_sx = (PCB).ag_rss[ag_rk]; | |
2498 if (ag_sx > (PCB).ssx || ag_sx > (PCB).ag_min_depth) continue; | |
2499 (PCB).sn = (PCB).ag_rss[ag_rk + 1]; | |
2500 if (ag_atx((PCB).token_number, &ag_sx, (PCB).sn)) break; | |
2501 } | |
2502 (PCB).sn = ag_snd; | |
2503 return ag_rk; | |
2504 } | |
2505 | |
2506 static void near ag_set_error_procs(void); | |
2507 | |
2508 static void near ag_auto_resynch(void) { | |
2509 int ag_sx, ag_rk; | |
2510 int ag_rk1, ag_rk2, ag_tk1; | |
2511 (PCB).ss[(PCB).ssx] = (PCB).sn; | |
2512 if ((PCB).ag_error_depth && (PCB).ag_min_depth >= (PCB).ag_error_depth) { | |
2513 (PCB).ssx = (PCB).ag_error_depth; | |
2514 (PCB).sn = (PCB).ss[(PCB).ssx]; | |
2515 } | |
2516 else { | |
2517 ag_diagnose(); | |
2518 SYNTAX_ERROR; | |
2519 if ((PCB).exit_flag != AG_RUNNING_CODE) return; | |
2520 (PCB).ag_error_depth = (PCB).ag_min_depth = 0; | |
2521 (PCB).ag_lrss = 0; | |
2522 (PCB).ss[ag_sx = (PCB).ssx] = (PCB).sn; | |
2523 (PCB).ag_min_depth = (PCB).ag_rss[(PCB).ag_lrss++] = ag_sx; | |
2524 (PCB).ag_rss[(PCB).ag_lrss++] = (PCB).sn; | |
2525 while (ag_sx && (PCB).ag_lrss < 2*53) { | |
2526 int ag_t = 0, ag_x, ag_s, ag_sxs = ag_sx; | |
2527 | |
2528 while (ag_sx && (ag_t = ag_ctn[2*(PCB).sn]) == 0) (PCB).sn = (PCB).ss[--ag_sx]; | |
2529 if (ag_t) (PCB).sn = (PCB).ss[ag_sx -= ag_ctn[2*(PCB).sn +1]]; | |
2530 else { | |
2531 if (ag_sx == 0) (PCB).sn = 0; | |
2532 ag_t = ag_ptt[0]; | |
2533 } | |
2534 if ((ag_s = ag_rns(ag_t, &ag_sx, (PCB).sn)) == 0) break; | |
2535 for (ag_x = 0; ag_x < (PCB).ag_lrss; ag_x += 2) | |
2536 if ((PCB).ag_rss[ag_x] == ag_sx + 1 && (PCB).ag_rss[ag_x+1] == ag_s) break; | |
2537 if (ag_x == (PCB).ag_lrss) { | |
2538 (PCB).ag_rss[(PCB).ag_lrss++] = ++ag_sx; | |
2539 (PCB).ag_rss[(PCB).ag_lrss++] = (PCB).sn = ag_s; | |
2540 } | |
2541 else if (ag_sx >= ag_sxs) ag_sx--; | |
2542 } | |
2543 ag_set_error_procs(); | |
2544 } | |
2545 (PCB).la_ptr = (PCB).pointer; | |
2546 if ((PCB).ssx > (PCB).ag_min_depth) (PCB).ag_min_depth = (PCB).ssx; | |
2547 while (1) { | |
2548 ag_rk1 = ag_tst_tkn(); | |
2549 if ((PCB).token_number == 46) | |
2550 {(PCB).exit_flag = AG_SYNTAX_ERROR_CODE; return;} | |
2551 if (ag_rk1 < (PCB).ag_lrss) break; | |
2552 {(PCB).la_ptr = (PCB).pointer + 1; ag_track();} | |
2553 } | |
2554 ag_tk1 = (PCB).token_number; | |
2555 ag_track(); | |
2556 ag_rk2 = ag_tst_tkn(); | |
2557 if (ag_rk2 < ag_rk1) {ag_rk = ag_rk2; ag_track();} | |
2558 else {ag_rk = ag_rk1; (PCB).token_number = (pgg_token_type) ag_tk1; (PCB).la_ptr = (PCB).pointer;} | |
2559 (PCB).ag_min_depth = (PCB).ssx = (PCB).ag_rss[ag_rk++]; | |
2560 (PCB).sn = (PCB).ss[(PCB).ssx] = (PCB).ag_rss[ag_rk]; | |
2561 (PCB).sn = ag_jns((PCB).token_number); | |
2562 if ((PCB).ag_error_depth == 0 || (PCB).ag_error_depth > (PCB).ssx) | |
2563 (PCB).ag_error_depth = (PCB).ssx; | |
2564 if (++(PCB).ssx >= 53) { | |
2565 (PCB).exit_flag = AG_STACK_ERROR_CODE; | |
2566 PARSER_STACK_OVERFLOW; | |
2567 return; | |
2568 } | |
2569 GET_CONTEXT; | |
2570 (PCB).ss[(PCB).ssx] = (PCB).sn; | |
2571 (PCB).ag_tmp_depth = (PCB).ag_min_depth; | |
2572 (PCB).la_ptr = (PCB).pointer; | |
2573 return; | |
2574 } | |
2575 | |
2576 | |
2577 static int near ag_action_10_proc(void) { | |
2578 int ag_t = (PCB).token_number; | |
2579 (PCB).btsx = 0, (PCB).drt = -1; | |
2580 do { | |
2581 ag_track(); | |
2582 (PCB).token_number = (pgg_token_type) AG_TCV(INPUT_CODE(*(PCB).la_ptr)); | |
2583 (PCB).la_ptr++; | |
2584 if (ag_key_index[(PCB).sn]) { | |
2585 unsigned ag_k = ag_key_index[(PCB).sn]; | |
2586 int ag_ch = CONVERT_CASE(INPUT_CODE(*(PCB).pointer)); | |
2587 if (ag_ch <= 255) { | |
2588 while (ag_key_ch[ag_k] < ag_ch) ag_k++; | |
2589 if (ag_key_ch[ag_k] == ag_ch) ag_get_key_word(ag_k); | |
2590 } | |
2591 } | |
2592 } while ((PCB).token_number == (pgg_token_type) ag_t); | |
2593 (PCB).la_ptr = (PCB).pointer; | |
2594 return 1; | |
2595 } | |
2596 | |
2597 static int near ag_action_11_proc(void) { | |
2598 int ag_t = (PCB).token_number; | |
2599 | |
2600 (PCB).btsx = 0, (PCB).drt = -1; | |
2601 do { | |
2602 (*(int *) &(PCB).vs[(PCB).ssx]) = *(PCB).pointer; | |
2603 (PCB).ssx--; | |
2604 ag_track(); | |
2605 ag_ra(); | |
2606 if ((PCB).exit_flag != AG_RUNNING_CODE) return 0; | |
2607 (PCB).ssx++; | |
2608 (PCB).token_number = (pgg_token_type) AG_TCV(INPUT_CODE(*(PCB).la_ptr)); | |
2609 (PCB).la_ptr++; | |
2610 if (ag_key_index[(PCB).sn]) { | |
2611 unsigned ag_k = ag_key_index[(PCB).sn]; | |
2612 int ag_ch = CONVERT_CASE(INPUT_CODE(*(PCB).pointer)); | |
2613 if (ag_ch <= 255) { | |
2614 while (ag_key_ch[ag_k] < ag_ch) ag_k++; | |
2615 if (ag_key_ch[ag_k] == ag_ch) ag_get_key_word(ag_k); | |
2616 } | |
2617 } | |
2618 } | |
2619 while ((PCB).token_number == (pgg_token_type) ag_t); | |
2620 (PCB).la_ptr = (PCB).pointer; | |
2621 return 1; | |
2622 } | |
2623 | |
2624 static int near ag_action_3_r_proc(void) { | |
2625 int ag_sd = ag_fl[(PCB).ag_ap] - 1; | |
2626 if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; | |
2627 (PCB).btsx = 0, (PCB).drt = -1; | |
2628 (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap]; | |
2629 ag_ra(); | |
2630 return (PCB).exit_flag == AG_RUNNING_CODE; | |
2631 } | |
2632 | |
2633 static int near ag_action_3_s_proc(void) { | |
2634 int ag_sd = ag_fl[(PCB).ag_ap] - 1; | |
2635 if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; | |
2636 (PCB).btsx = 0, (PCB).drt = -1; | |
2637 (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap]; | |
2638 ag_ra(); | |
2639 return (PCB).exit_flag == AG_RUNNING_CODE; | |
2640 } | |
2641 | |
2642 static int near ag_action_4_r_proc(void) { | |
2643 int ag_sd = ag_fl[(PCB).ag_ap] - 1; | |
2644 if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; | |
2645 (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap]; | |
2646 return 1; | |
2647 } | |
2648 | |
2649 static int near ag_action_2_proc(void) { | |
2650 (PCB).btsx = 0, (PCB).drt = -1; | |
2651 if ((PCB).ssx >= 53) { | |
2652 (PCB).exit_flag = AG_STACK_ERROR_CODE; | |
2653 PARSER_STACK_OVERFLOW; | |
2654 } | |
2655 (*(int *) &(PCB).vs[(PCB).ssx]) = *(PCB).pointer; | |
2656 GET_CONTEXT; | |
2657 (PCB).ss[(PCB).ssx] = (PCB).sn; | |
2658 (PCB).ssx++; | |
2659 (PCB).sn = (PCB).ag_ap; | |
2660 ag_track(); | |
2661 return 0; | |
2662 } | |
2663 | |
2664 static int near ag_action_9_proc(void) { | |
2665 if ((PCB).drt == -1) { | |
2666 (PCB).drt=(PCB).token_number; | |
2667 (PCB).dssx=(PCB).ssx; | |
2668 (PCB).dsn=(PCB).sn; | |
2669 } | |
2670 ag_prot(); | |
2671 (PCB).vs[(PCB).ssx] = ag_null_value; | |
2672 GET_CONTEXT; | |
2673 (PCB).ss[(PCB).ssx] = (PCB).sn; | |
2674 (PCB).ssx++; | |
2675 (PCB).sn = (PCB).ag_ap; | |
2676 (PCB).la_ptr = (PCB).pointer; | |
2677 return (PCB).exit_flag == AG_RUNNING_CODE; | |
2678 } | |
2679 | |
2680 static int near ag_action_2_r_proc(void) { | |
2681 (PCB).ssx++; | |
2682 (PCB).sn = (PCB).ag_ap; | |
2683 return 0; | |
2684 } | |
2685 | |
2686 static int near ag_action_7_proc(void) { | |
2687 --(PCB).ssx; | |
2688 (PCB).la_ptr = (PCB).pointer; | |
2689 (PCB).exit_flag = AG_SUCCESS_CODE; | |
2690 return 0; | |
2691 } | |
2692 | |
2693 static int near ag_action_1_proc(void) { | |
2694 ag_track(); | |
2695 (PCB).exit_flag = AG_SUCCESS_CODE; | |
2696 return 0; | |
2697 } | |
2698 | |
2699 static int near ag_action_1_r_proc(void) { | |
2700 (PCB).exit_flag = AG_SUCCESS_CODE; | |
2701 return 0; | |
2702 } | |
2703 | |
2704 static int near ag_action_1_s_proc(void) { | |
2705 (PCB).exit_flag = AG_SUCCESS_CODE; | |
2706 return 0; | |
2707 } | |
2708 | |
2709 static int near ag_action_4_proc(void) { | |
2710 int ag_sd = ag_fl[(PCB).ag_ap] - 1; | |
2711 (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap]; | |
2712 (PCB).btsx = 0, (PCB).drt = -1; | |
2713 (*(int *) &(PCB).vs[(PCB).ssx]) = *(PCB).pointer; | |
2714 if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; | |
2715 else GET_CONTEXT; | |
2716 (PCB).ss[(PCB).ssx] = (PCB).sn; | |
2717 ag_track(); | |
2718 while ((PCB).exit_flag == AG_RUNNING_CODE) { | |
2719 unsigned ag_t1 = ag_sbe[(PCB).sn] + 1; | |
2720 unsigned ag_t2 = ag_sbt[(PCB).sn+1] - 1; | |
2721 do { | |
2722 unsigned ag_tx = (ag_t1 + ag_t2)/2; | |
2723 if (ag_tstt[ag_tx] < (unsigned char)(PCB).reduction_token) ag_t1 = ag_tx + 1; | |
2724 else ag_t2 = ag_tx; | |
2725 } while (ag_t1 < ag_t2); | |
2726 if (ag_tstt[ag_t1] != (PCB).reduction_token) { | |
2727 (PCB).exit_flag = AG_REDUCTION_ERROR_CODE; | |
2728 REDUCTION_TOKEN_ERROR; break;} | |
2729 (PCB).ag_ap = ag_pstt[ag_t1]; | |
2730 if ((*(PCB).s_procs[ag_astt[ag_t1]])() == 0) break; | |
2731 } | |
2732 return 0; | |
2733 } | |
2734 | |
2735 static int near ag_action_3_proc(void) { | |
2736 int ag_sd = ag_fl[(PCB).ag_ap] - 1; | |
2737 (PCB).btsx = 0, (PCB).drt = -1; | |
2738 (*(int *) &(PCB).vs[(PCB).ssx]) = *(PCB).pointer; | |
2739 if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; | |
2740 else GET_CONTEXT; | |
2741 (PCB).ss[(PCB).ssx] = (PCB).sn; | |
2742 ag_track(); | |
2743 (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap]; | |
2744 ag_ra(); | |
2745 while ((PCB).exit_flag == AG_RUNNING_CODE) { | |
2746 unsigned ag_t1 = ag_sbe[(PCB).sn] + 1; | |
2747 unsigned ag_t2 = ag_sbt[(PCB).sn+1] - 1; | |
2748 do { | |
2749 unsigned ag_tx = (ag_t1 + ag_t2)/2; | |
2750 if (ag_tstt[ag_tx] < (unsigned char)(PCB).reduction_token) ag_t1 = ag_tx + 1; | |
2751 else ag_t2 = ag_tx; | |
2752 } while (ag_t1 < ag_t2); | |
2753 if (ag_tstt[ag_t1] != (PCB).reduction_token) { | |
2754 (PCB).exit_flag = AG_REDUCTION_ERROR_CODE; | |
2755 REDUCTION_TOKEN_ERROR; break;} | |
2756 (PCB).ag_ap = ag_pstt[ag_t1]; | |
2757 if ((*(PCB).s_procs[ag_astt[ag_t1]])() == 0) break; | |
2758 } | |
2759 return 0; | |
2760 } | |
2761 | |
2762 static int near ag_action_8_proc(void) { | |
2763 ag_undo(); | |
2764 (PCB).la_ptr = (PCB).pointer; | |
2765 ag_auto_resynch(); | |
2766 return (PCB).exit_flag == AG_RUNNING_CODE; | |
2767 } | |
2768 | |
2769 static int near ag_action_5_proc(void) { | |
2770 int ag_sd = ag_fl[(PCB).ag_ap]; | |
2771 (PCB).btsx = 0, (PCB).drt = -1; | |
2772 if (ag_sd) (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; | |
2773 else { | |
2774 GET_CONTEXT; | |
2775 (PCB).ss[(PCB).ssx] = (PCB).sn; | |
2776 } | |
2777 (PCB).la_ptr = (PCB).pointer; | |
2778 (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap]; | |
2779 ag_ra(); | |
2780 while ((PCB).exit_flag == AG_RUNNING_CODE) { | |
2781 unsigned ag_t1 = ag_sbe[(PCB).sn] + 1; | |
2782 unsigned ag_t2 = ag_sbt[(PCB).sn+1] - 1; | |
2783 do { | |
2784 unsigned ag_tx = (ag_t1 + ag_t2)/2; | |
2785 if (ag_tstt[ag_tx] < (unsigned char)(PCB).reduction_token) ag_t1 = ag_tx + 1; | |
2786 else ag_t2 = ag_tx; | |
2787 } while (ag_t1 < ag_t2); | |
2788 if (ag_tstt[ag_t1] != (PCB).reduction_token) { | |
2789 (PCB).exit_flag = AG_REDUCTION_ERROR_CODE; | |
2790 REDUCTION_TOKEN_ERROR; break;} | |
2791 (PCB).ag_ap = ag_pstt[ag_t1]; | |
2792 if ((*(PCB).r_procs[ag_astt[ag_t1]])() == 0) break; | |
2793 } | |
2794 return (PCB).exit_flag == AG_RUNNING_CODE; | |
2795 } | |
2796 | |
2797 static int near ag_action_6_proc(void) { | |
2798 int ag_sd = ag_fl[(PCB).ag_ap]; | |
2799 (PCB).reduction_token = (pgg_token_type) ag_ptt[(PCB).ag_ap]; | |
2800 if ((PCB).drt == -1) { | |
2801 (PCB).drt=(PCB).token_number; | |
2802 (PCB).dssx=(PCB).ssx; | |
2803 (PCB).dsn=(PCB).sn; | |
2804 } | |
2805 if (ag_sd) { | |
2806 (PCB).sn = (PCB).ss[(PCB).ssx -= ag_sd]; | |
2807 } | |
2808 else { | |
2809 ag_prot(); | |
2810 (PCB).vs[(PCB).ssx] = ag_null_value; | |
2811 GET_CONTEXT; | |
2812 (PCB).ss[(PCB).ssx] = (PCB).sn; | |
2813 } | |
2814 (PCB).la_ptr = (PCB).pointer; | |
2815 while ((PCB).exit_flag == AG_RUNNING_CODE) { | |
2816 unsigned ag_t1 = ag_sbe[(PCB).sn] + 1; | |
2817 unsigned ag_t2 = ag_sbt[(PCB).sn+1] - 1; | |
2818 do { | |
2819 unsigned ag_tx = (ag_t1 + ag_t2)/2; | |
2820 if (ag_tstt[ag_tx] < (unsigned char)(PCB).reduction_token) ag_t1 = ag_tx + 1; | |
2821 else ag_t2 = ag_tx; | |
2822 } while (ag_t1 < ag_t2); | |
2823 if (ag_tstt[ag_t1] != (PCB).reduction_token) { | |
2824 (PCB).exit_flag = AG_REDUCTION_ERROR_CODE; | |
2825 REDUCTION_TOKEN_ERROR; break;} | |
2826 (PCB).ag_ap = ag_pstt[ag_t1]; | |
2827 if ((*(PCB).r_procs[ag_astt[ag_t1]])() == 0) break; | |
2828 } | |
2829 return (PCB).exit_flag == AG_RUNNING_CODE; | |
2830 } | |
2831 | |
2832 | |
2833 static void near ag_check_depth(int ag_fl) { | |
2834 int ag_sx = (PCB).ssx - ag_fl; | |
2835 if ((PCB).ag_error_depth && ag_sx < (PCB).ag_tmp_depth) (PCB).ag_tmp_depth = ag_sx; | |
2836 } | |
2837 | |
2838 static int near ag_action_3_er_proc(void) { | |
2839 ag_check_depth(ag_fl[(PCB).ag_ap] - 1); | |
2840 return ag_action_4_r_proc(); | |
2841 } | |
2842 | |
2843 static int near ag_action_2_e_proc(void) { | |
2844 ag_action_2_proc(); | |
2845 (PCB).ag_min_depth = (PCB).ag_tmp_depth; | |
2846 return 0; | |
2847 } | |
2848 | |
2849 static int near ag_action_4_e_proc(void) { | |
2850 ag_check_depth(ag_fl[(PCB).ag_ap] - 1); | |
2851 (PCB).ag_min_depth = (PCB).ag_tmp_depth; | |
2852 return ag_action_4_proc(); | |
2853 } | |
2854 | |
2855 static int near ag_action_6_e_proc(void) { | |
2856 ag_check_depth(ag_fl[(PCB).ag_ap]); | |
2857 return ag_action_6_proc(); | |
2858 } | |
2859 | |
2860 static int near ag_action_11_e_proc(void) { | |
2861 return ag_action_10_proc(); | |
2862 } | |
2863 | |
2864 static int (near *ag_r_procs_error[])(void) = { | |
2865 ag_action_1_r_proc, | |
2866 ag_action_2_r_proc, | |
2867 ag_action_3_er_proc, | |
2868 ag_action_3_er_proc | |
2869 }; | |
2870 | |
2871 static int (near *ag_s_procs_error[])(void) = { | |
2872 ag_action_1_s_proc, | |
2873 ag_action_2_r_proc, | |
2874 ag_action_3_er_proc, | |
2875 ag_action_3_er_proc | |
2876 }; | |
2877 | |
2878 static int (near *ag_gt_procs_error[])(void) = { | |
2879 ag_action_1_proc, | |
2880 ag_action_2_e_proc, | |
2881 ag_action_4_e_proc, | |
2882 ag_action_4_e_proc, | |
2883 ag_action_6_e_proc, | |
2884 ag_action_6_e_proc, | |
2885 ag_action_7_proc, | |
2886 ag_action_8_proc, | |
2887 ag_action_9_proc, | |
2888 ag_action_10_proc, | |
2889 ag_action_11_e_proc, | |
2890 ag_action_8_proc | |
2891 }; | |
2892 | |
2893 static void near ag_set_error_procs(void) { | |
2894 (PCB).gt_procs = ag_gt_procs_error; | |
2895 (PCB).r_procs = ag_r_procs_error; | |
2896 (PCB).s_procs = ag_s_procs_error; | |
2897 } | |
2898 | |
2899 | |
2900 void init_pgg(void) { | |
2901 (PCB).la_ptr = (PCB).pointer; | |
2902 (PCB).gt_procs = ag_gt_procs_scan; | |
2903 (PCB).r_procs = ag_r_procs_scan; | |
2904 (PCB).s_procs = ag_s_procs_scan; | |
2905 (PCB).ag_error_depth = (PCB).ag_min_depth = (PCB).ag_tmp_depth = 0; | |
2906 (PCB).ag_resynch_active = 0; | |
2907 (PCB).ss[0] = (PCB).sn = (PCB).ssx = 0; | |
2908 (PCB).exit_flag = AG_RUNNING_CODE; | |
2909 (PCB).line = FIRST_LINE; | |
2910 (PCB).column = FIRST_COLUMN; | |
2911 (PCB).btsx = 0, (PCB).drt = -1; | |
2912 } | |
2913 | |
2914 void pgg(void) { | |
2915 init_pgg(); | |
2916 (PCB).exit_flag = AG_RUNNING_CODE; | |
2917 while ((PCB).exit_flag == AG_RUNNING_CODE) { | |
2918 unsigned ag_t1 = ag_sbt[(PCB).sn]; | |
2919 if (ag_tstt[ag_t1]) { | |
2920 unsigned ag_t2 = ag_sbe[(PCB).sn] - 1; | |
2921 (PCB).token_number = (pgg_token_type) AG_TCV(INPUT_CODE(*(PCB).la_ptr)); | |
2922 (PCB).la_ptr++; | |
2923 if (ag_key_index[(PCB).sn]) { | |
2924 unsigned ag_k = ag_key_index[(PCB).sn]; | |
2925 int ag_ch = CONVERT_CASE(INPUT_CODE(*(PCB).pointer)); | |
2926 if (ag_ch <= 255) { | |
2927 while (ag_key_ch[ag_k] < ag_ch) ag_k++; | |
2928 if (ag_key_ch[ag_k] == ag_ch) ag_get_key_word(ag_k); | |
2929 } | |
2930 } | |
2931 do { | |
2932 unsigned ag_tx = (ag_t1 + ag_t2)/2; | |
2933 if (ag_tstt[ag_tx] > (unsigned char)(PCB).token_number) | |
2934 ag_t1 = ag_tx + 1; | |
2935 else ag_t2 = ag_tx; | |
2936 } while (ag_t1 < ag_t2); | |
2937 if (ag_tstt[ag_t1] != (unsigned char)(PCB).token_number) | |
2938 ag_t1 = ag_sbe[(PCB).sn]; | |
2939 } | |
2940 (PCB).ag_ap = ag_pstt[ag_t1]; | |
2941 (*(PCB).gt_procs[ag_astt[ag_t1]])(); | |
2942 } | |
2943 } | |
2944 | |
2945 |