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