home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / AWK.ZIP / GRAM.C < prev    next >
Encoding:
C/C++ Source or Header  |  1988-09-09  |  50.1 KB  |  1,106 lines

  1. /**
  2.  * $Revision:   1.1  $
  3.  * $Log:   C:/AWK/GRAM.C_V  $
  4.  * 
  5.  *    Rev 1.1   09 Sep 1988 18:30:56   vince
  6.  * MC 5.1 version
  7.  * 
  8.  *    Rev 1.0   09 Sep 1988 18:03:12   vince
  9.  * Original source
  10.  */
  11.  
  12. #define IDENTIFIER      258
  13. #define CONSTANT        259
  14. #define STRING_LITERAL  260
  15. #define SIZEOF          261
  16. #define PTR_OP          262
  17. #define INC_OP          263
  18. #define DEC_OP          264
  19. #define LEFT_OP         265
  20. #define RIGHT_OP        266
  21. #define LE_OP           267
  22. #define GE_OP           268
  23. #define EQ_OP           269
  24. #define NE_OP           270
  25. #define AND_OP          271
  26. #define OR_OP           272
  27. #define MUL_ASSIGN      273
  28. #define DIV_ASSIGN      274
  29. #define MOD_ASSIGN      275
  30. #define ADD_ASSIGN      276
  31. #define SUB_ASSIGN      277
  32. #define LEFT_ASSIGN     278
  33. #define RIGHT_ASSIGN    279
  34. #define AND_ASSIGN      280
  35. #define XOR_ASSIGN      281
  36. #define OR_ASSIGN       282
  37. #define TYPE_NAME       283
  38. #define TYPEDEF         284
  39. #define EXTERN          285
  40. #define STATIC          286
  41. #define AUTO            287
  42. #define REGISTER        288
  43. #define CHAR            289
  44. #define SHORT           290
  45. #define INT             291
  46. #define LONG            292
  47. #define SIGNED          293
  48. #define UNSIGNED        294
  49. #define FLOAT           295
  50. #define DOUBLE          296
  51. #define CONST           297
  52. #define VOLATILE        298
  53. #define VOID            299
  54. #define STRUCT          300
  55. #define UNION           301
  56. #define ENUM            302
  57. #define ELIPSIS         303
  58. #define RANGE           304
  59. #define CASE            305
  60. #define DEFAULT         306
  61. #define IF              307
  62. #define ELSE            308
  63. #define SWITCH          309
  64. #define WHILE           310
  65. #define DO              311
  66. #define FOR             312
  67. #define GOTO            313
  68. #define CONTINUE        314
  69. #define BREAK           315
  70. #define RETURN          316
  71.  
  72. #ifndef YYLTYPE
  73. typedef struct yyltype
  74. {
  75.    int timestamp;
  76.    int first_line;
  77.    int first_column;
  78.    int last_line;
  79.    int last_column;
  80.    char *text;
  81. } yyltype;
  82.  
  83. #define YYLTYPE yyltype
  84. #endif
  85.  
  86. #define YYACCEPT return(0)
  87. #define YYABORT return(1)
  88. #define YYERROR return(1)
  89. #ifndef YYSTYPE
  90. #define YYSTYPE int
  91. #endif
  92. #include <stdio.h>
  93.  
  94. #define YYFINAL         368
  95. #define YYFLAG          -32768
  96. #define YYNTBASE        86
  97.  
  98. #define YYTRANSLATE(x) (yytranslate[x])
  99.  
  100. static char yytranslate[] = {0,
  101.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  102.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  103.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  104.                              2, 2, 73, 2, 2, 2, 75, 68, 2, 62,
  105.                              63, 69, 70, 67, 71, 66, 74, 2, 2, 2,
  106.                              2, 2, 2, 2, 2, 2, 2, 81, 83, 76,
  107.                              82, 77, 80, 2, 2, 2, 2, 2, 2, 2,
  108.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  109.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  110.                              64, 2, 65, 78, 2, 2, 2, 2, 2, 2,
  111.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  112.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  113.                              2, 2, 84, 79, 85, 72, 2, 2, 2, 2,
  114.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  115.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  116.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  117.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  118.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  119.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  120.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  121.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  122.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  123.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  124.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  125.                              2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  126.                              2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
  127.                              6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  128.                              16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
  129.                              26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
  130.                              36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
  131.                              46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
  132.                              56, 57, 58, 59, 60, 61
  133. };
  134.  
  135. static short yyrline[] = {0,
  136.                           17, 18, 19, 20, 24, 25, 26, 27, 28, 29,
  137.                           30, 31, 35, 36, 40, 41, 42, 43, 44, 45,
  138.                           49, 50, 51, 52, 53, 54, 58, 59, 63, 64,
  139.                           65, 66, 70, 71, 72, 76, 77, 78, 82, 83,
  140.                           84, 85, 86, 90, 91, 92, 96, 97, 101, 102,
  141.                           106, 107, 111, 112, 116, 117, 121, 122, 126, 127,
  142.                           131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
  143.                           141, 145, 146, 150, 154, 155, 159, 160, 161, 162,
  144.                           166, 167, 171, 172, 176, 177, 178, 179, 180, 184,
  145.                           185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
  146.                           195, 196, 197, 201, 202, 203, 207, 208, 212, 213,
  147.                           217, 221, 222, 226, 227, 228, 232, 233, 234, 238,
  148.                           239, 243, 244, 248, 249, 253, 254, 255, 256, 257,
  149.                           258, 259, 263, 264, 265, 266, 270, 271, 275, 276,
  150.                           280, 281, 285, 286, 290, 291, 295, 296, 300, 301,
  151.                           305, 306, 307, 311, 312, 313, 314, 315, 316, 317,
  152.                           318, 319, 323, 324, 325, 329, 330, 334, 335, 336,
  153.                           337, 338, 339, 343, 344, 345, 349, 350, 351, 352,
  154.                           356, 357, 361, 362, 366, 367, 371, 372, 373, 377,
  155.                           378, 379, 380, 381, 382, 383, 384, 385, 386, 390,
  156.                           391, 392, 393, 394, 398, 399, 403, 404, 408, 409,
  157.                           413, 414, 418
  158. };
  159.  
  160. static char *yytname[] = {0,
  161.               "error", "$illegal.", "IDENTIFIER", "CONSTANT", "STRING_LITERAL", "SIZEOF", "PTR_OP", "INC_OP", "DEC_OP", "LEFT_OP",
  162.                       "RIGHT_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "MOD_ASSIGN",
  163.                           "ADD_ASSIGN", "SUB_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "TYPE_NAME", "TYPEDEF", "EXTERN",
  164.                           "STATIC", "AUTO", "REGISTER", "CHAR", "SHORT", "INT", "LONG", "SIGNED", "UNSIGNED", "FLOAT",
  165.                           "DOUBLE", "CONST", "VOLATILE", "VOID", "STRUCT", "UNION", "ENUM", "ELIPSIS", "RANGE", "CASE",
  166.                           "DEFAULT", "IF", "ELSE", "SWITCH", "WHILE", "DO", "FOR", "GOTO", "CONTINUE", "BREAK",
  167.                           "RETURN", "'('", "')'", "'['", "']'", "'.'", "','", "'&'", "'*'", "'+'",
  168.                           "'-'", "'~'", "'!'", "'/'", "'%'", "'<'", "'>'", "'^'", "'|'", "'?'",
  169.                           "':'", "'='", "';'", "'{'", "'}'", "primary_expr"
  170. };
  171.  
  172. static short yyr1[] = {0,
  173.                        86, 86, 86, 86, 87, 87, 87, 87, 87, 87,
  174.                        87, 87, 88, 88, 89, 89, 89, 89, 89, 89,
  175.                        90, 90, 90, 90, 90, 90, 91, 91, 92, 92,
  176.                        92, 92, 93, 93, 93, 94, 94, 94, 95, 95,
  177.                        95, 95, 95, 96, 96, 96, 97, 97, 98, 98,
  178.                        99, 99, 100, 100, 101, 101, 102, 102, 103, 103,
  179.                        104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
  180.                        104, 105, 105, 106, 107, 107, 108, 108, 108, 108,
  181.                        109, 109, 110, 110, 111, 111, 111, 111, 111, 112,
  182.                        112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
  183.                        112, 112, 112, 113, 113, 113, 114, 114, 115, 115,
  184.                        116, 117, 117, 118, 118, 118, 119, 119, 119, 120,
  185.                        120, 121, 121, 122, 122, 123, 123, 123, 123, 123,
  186.                        123, 123, 124, 124, 124, 124, 125, 125, 126, 126,
  187.                        127, 127, 128, 128, 129, 129, 130, 130, 131, 131,
  188.                        132, 132, 132, 133, 133, 133, 133, 133, 133, 133,
  189.                        133, 133, 134, 134, 134, 135, 135, 136, 136, 136,
  190.                        136, 136, 136, 137, 137, 137, 138, 138, 138, 138,
  191.                        139, 139, 140, 140, 141, 141, 142, 142, 142, 143,
  192.                        143, 143, 143, 143, 143, 143, 143, 143, 143, 144,
  193.                        144, 144, 144, 144, 145, 145, 146, 146, 147, 147,
  194.                        148, 148, 149
  195. };
  196.  
  197. static short yyr2[] = {0,
  198.                        1, 1, 1, 3, 1, 4, 3, 4, 3, 3,
  199.                        2, 2, 1, 3, 1, 2, 2, 2, 2, 4,
  200.                        1, 1, 1, 1, 1, 1, 1, 4, 1, 3,
  201.                        3, 3, 1, 3, 3, 1, 3, 3, 1, 3,
  202.                        3, 3, 3, 1, 3, 3, 1, 3, 1, 3,
  203.                        1, 3, 1, 3, 1, 3, 1, 5, 1, 3,
  204.                        1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  205.                        1, 1, 3, 1, 2, 3, 1, 2, 1, 2,
  206.                        1, 3, 1, 3, 1, 1, 1, 1, 1, 1,
  207.                        1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  208.                        1, 1, 1, 5, 4, 2, 1, 1, 1, 2,
  209.                        3, 1, 3, 1, 2, 3, 4, 5, 2, 1,
  210.                        3, 1, 3, 1, 2, 1, 3, 3, 4, 3,
  211.                        4, 4, 1, 2, 2, 3, 1, 2, 1, 3,
  212.                        1, 3, 1, 3, 1, 3, 2, 1, 1, 2,
  213.                        1, 1, 2, 3, 2, 3, 3, 4, 2, 3,
  214.                        3, 4, 1, 3, 4, 1, 3, 1, 1, 1,
  215.                        1, 1, 1, 3, 4, 3, 2, 3, 3, 4,
  216.                        1, 2, 1, 2, 1, 2, 5, 7, 5, 5,
  217.                        7, 6, 7, 7, 8, 7, 8, 8, 9, 3,
  218.                        2, 2, 2, 3, 1, 2, 1, 1, 2, 3,
  219.                        1, 2, 1
  220. };
  221.  
  222. static short yydefact[] = {0,
  223.                            213, 103, 85, 86, 87, 88, 89, 90, 91, 92,
  224.                            93, 94, 95, 96, 97, 98, 99, 100, 107, 108,
  225.                            0, 0, 133, 208, 0, 77, 79, 101, 0, 102,
  226.                            0, 124, 0, 0, 205, 207, 126, 0, 119, 0,
  227.                            137, 135, 134, 75, 0, 81, 83, 78, 80, 0,
  228.                            106, 0, 181, 0, 211, 0, 209, 0, 0, 125,
  229.                            206, 0, 120, 122, 0, 127, 138, 136, 0, 76,
  230.                            0, 210, 0, 109, 0, 0, 2, 3, 0, 0,
  231.                            0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  232.                            0, 0, 0, 21, 22, 23, 24, 25, 26, 185,
  233.                            177, 5, 15, 27, 0, 29, 33, 36, 39, 44,
  234.                            47, 49, 51, 53, 55, 57, 59, 72, 0, 183,
  235.                            168, 169, 0, 0, 170, 171, 172, 173, 1, 83,
  236.                            182, 212, 130, 149, 0, 139, 0, 143, 145, 148,
  237.                            141, 128, 27, 74, 0, 1, 0, 117, 0, 0,
  238.                            82, 0, 163, 84, 105, 110, 0, 0, 112, 114,
  239.                            0, 0, 19, 0, 16, 17, 0, 0, 0, 0,
  240.                            0, 0, 0, 0, 201, 202, 203, 0, 0, 149,
  241.                            0, 0, 11, 12, 0, 0, 0, 62, 63, 64,
  242.                            65, 66, 67, 68, 69, 70, 71, 61, 0, 18,
  243.                            0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  244.                            0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  245.                            186, 179, 0, 178, 184, 0, 0, 0, 147, 151,
  246.                            150, 152, 132, 0, 131, 0, 129, 121, 123, 118,
  247.                            166, 0, 115, 0, 111, 0, 104, 0, 0, 176,
  248.                            0, 0, 0, 0, 0, 0, 200, 204, 4, 0,
  249.                            151, 0, 10, 7, 0, 13, 0, 9, 60, 30,
  250.                            31, 32, 34, 35, 37, 38, 42, 43, 40, 41,
  251.                            45, 46, 48, 50, 52, 54, 56, 0, 73, 180,
  252.                            174, 159, 0, 0, 155, 0, 153, 0, 0, 140,
  253.                            142, 144, 146, 0, 164, 113, 116, 20, 175, 0,
  254.                            0, 0, 0, 0, 0, 0, 28, 8, 0, 6,
  255.                            0, 160, 154, 156, 161, 0, 157, 0, 165, 167,
  256.                            187, 189, 190, 0, 0, 0, 0, 0, 0, 14,
  257.                            58, 162, 158, 0, 0, 192, 0, 0, 0, 0,
  258.                            0, 0, 188, 191, 193, 194, 0, 196, 0, 0,
  259.                            0, 195, 197, 198, 0, 199, 0, 0
  260. };
  261.  
  262. static short yydefgoto[] = {102,
  263.                             103, 265, 104, 105, 106, 107, 108, 109, 110, 111,
  264.                             112, 113, 114, 115, 116, 117, 118, 199, 119, 145,
  265.                             53, 54, 45, 46, 26, 41, 28, 29, 73, 74,
  266.                             158, 159, 30, 62, 63, 31, 32, 33, 134, 135,
  267.                             136, 293, 138, 139, 140, 231, 232, 154, 242, 120,
  268.                             121, 122, 56, 124, 125, 126, 127, 128, 34, 35,
  269.                             36, 57, 146
  270. };
  271.  
  272. static short yypact[] = {1183,
  273.                          -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
  274.                          -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
  275.                          6, 14, 1484, -32768, 15, 1504, 1504, -32768, 11, -32768,
  276.                          1387, 53, 43, 1138, -32768, -32768, -32768, 38, -22, 4,
  277.                          -32768, -32768, 1484, -32768, -47, -32768, 1330, -32768, -32768, 1524,
  278.                          -14, 402, -32768, 15, -32768, 1387, -32768, 339, 855, 53,
  279.                          -32768, -37, -32768, -1, 38, -32768, -32768, -32768, 14, -32768,
  280.                          325, -32768, 526, -32768, 793, 1524, -32768, -32768, 1052, 1080,
  281.                          1080, 1092, 22, 48, 77, 92, 651, 186, 38, 30,
  282.                          80, 670, 841, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
  283.                          -32768, -32768, 354, 274, 1092, -32768, 51, 101, 181, 32,
  284.                          232, 110, 28, 145, 248, 2, -32768, -32768, -27, -32768,
  285.                          -32768, -32768, 473, 544, -32768, -32768, -32768, -32768, 184, 185,
  286.                          -32768, -32768, -32768, 1273, 203, 201, 207, 204, -32768, -32768,
  287.                          -32768, -32768, -32768, -32768, 209, -32768, 38, -32768, 1092, -35,
  288.                          -32768, 325, -32768, -32768, -32768, -32768, 1092, 44, -32768, 195,
  289.                          1310, 841, -32768, 1092, -32768, -32768, 196, 651, 1092, 1092,
  290.                          1092, 223, 686, 205, -32768, -32768, -32768, 49, -20, 1447,
  291.                          216, 38, -32768, -32768, 886, 1092, 38, -32768, -32768, -32768,
  292.                          -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, 1092, -32768,
  293.                          1092, 1092, 1092, 1092, 1092, 1092, 1092, 1092, 1092, 1092,
  294.                          1092, 1092, 1092, 1092, 1092, 1092, 1092, 1092, 1092, 1092,
  295.                          -32768, -32768, 580, -32768, -32768, 651, 1228, 926, -32768, 50,
  296.                          -32768, 102, -32768, 20, -32768, 1362, -32768, -32768, -32768, -32768,
  297.                          -32768, -30, -32768, 23, -32768, 1092, -32768, 224, 651, -32768,
  298.                          106, 114, 116, 240, 722, 76, -32768, -32768, -32768, 1410,
  299.                          152, 1092, -32768, -32768, 117, -32768, 166, -32768, -32768, -32768,
  300.                          -32768, -32768, 51, 51, 101, 101, 181, 181, 181, 181,
  301.                          32, 32, 232, 110, 28, 145, 248, -2, -32768, -32768,
  302.                          -32768, -32768, 243, 244, -32768, 221, 102, 736, 938, -32768,
  303.                          -32768, -32768, -32768, 615, -32768, -32768, -32768, -32768, -32768, 651,
  304.                          651, 651, 1092, 957, 79, 741, -32768, -32768, 1092, -32768,
  305.                          1092, -32768, -32768, -32768, -32768, 245, -32768, 238, -32768, -32768,
  306.                          256, -32768, -32768, 122, 651, 123, 969, 981, 93, -32768,
  307.                          -32768, -32768, -32768, 651, 231, -32768, 651, 651, 154, 651,
  308.                          162, 1009, -32768, -32768, -32768, -32768, 651, -32768, 651, 651,
  309.                          176, -32768, -32768, -32768, 651, -32768, 317, -32768
  310. };
  311.  
  312. static short yypgoto[] = {-32768,
  313.                           -32768, -32768, -8, -32768, -101, 52, 55, 42, 46, 104,
  314.                           107, 105, 108, 109, 119, -58, -64, -32768, -33, -71,
  315.                           5, 118, -32768, 255, -32768, 289, -32768, -32768, 250, -67,
  316.                           -32768, 95, -32768, 272, 193, -12, -17, -15, 57, -32768,
  317.                           -32768, -56, -32768, 113, -66, -196, -195, -149, -32768, -75,
  318.                           -32768, 111, 291, 228, -32768, -32768, -32768, -32768, -32768, 312,
  319.                           -32768, 305, 0
  320. };
  321.  
  322.  
  323. #define YYLAST          1571
  324.  
  325.  
  326. static short yytable[] = {37,
  327.                           144, 137, 241, 200, 24, 156, 153, 42, 1, 40,
  328.                           167, 172, 47, 1, 218, 60, 1, 1, 218, 69,
  329.                           39, 37, 1, 144, 37, 1, 181, 68, 51, 147,
  330.                           294, 147, 37, 37, 297, 70, 304, 64, 24, 220,
  331.                           1, 130, 259, 208, 209, 1, 220, 148, 225, 240,
  332.                           143, 129, 1, 37, 305, 221, 130, 141, 178, 179,
  333.                           131, 65, 160, 294, 64, 297, 66, 300, 37, 76,
  334.                           163, 165, 166, 143, 37, 22, 22, 239, 321, 43,
  335.                           149, 219, 23, 23, 22, 243, 129, 153, 174, 38,
  336.                           144, 23, 250, 156, 50, 248, 143, 44, 144, 270,
  337.                           271, 272, 168, 157, 22, 215, 75, 210, 211, 169,
  338.                           244, 227, 175, 228, 58, 220, 59, 25, 230, 201,
  339.                           266, 229, 129, 129, 202, 203, 245, 131, 179, 75,
  340.                           179, 258, 75, 37, 269, 251, 252, 253, 170, 256,
  341.                           143, 55, 220, 48, 49, 220, 64, 225, 143, 180,
  342.                           291, 25, 267, 171, 330, 289, 296, 55, 316, 220,
  343.                           317, 337, 176, 298, 261, 299, 132, 129, 310, 144,
  344.                           204, 205, 220, 309, 307, 352, 311, 214, 312, 318,
  345.                           220, 263, 220, 319, 345, 347, 268, 144, 220, 220,
  346.                           206, 207, 143, 143, 143, 143, 143, 143, 143, 143,
  347.                           143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
  348.                           143, 230, 60, 260, 40, 228, 357, 75, 180, 143,
  349.                           220, 315, 129, 216, 359, 129, 37, 328, 220, 37,
  350.                           320, 160, 220, 301, 331, 332, 333, 143, 365, 153,
  351.                           144, 326, 220, 37, 261, 212, 213, 173, 129, 277,
  352.                           278, 279, 280, 143, 340, 273, 274, 281, 282, 346,
  353.                           275, 276, 341, 217, 226, 233, 71, 234, 353, 235,
  354.                           236, 355, 356, 237, 358, 246, 249, 254, 262, 334,
  355.                           336, 362, 339, 363, 364, 324, 308, 257, 27, 366,
  356.                           143, 188, 189, 190, 191, 192, 193, 194, 195, 196,
  357.                           197, 313, 343, 349, 351, 322, 323, 342, 344, 129,
  358.                           129, 129, 143, 354, 27, 27, 368, 283, 361, 27,
  359.                           285, 284, 27, 151, 286, 161, 287, 1, 77, 78,
  360.                           79, 67, 80, 81, 129, 27, 150, 288, 306, 238,
  361.                           27, 1, 123, 129, 27, 61, 129, 129, 303, 129,
  362.                           223, 72, 0, 0, 0, 198, 129, 0, 129, 129,
  363.                           182, 183, 184, 67, 129, 0, 2, 0, 0, 0,
  364.                           0, 0, 8, 9, 10, 11, 12, 13, 14, 15,
  365.                           16, 17, 18, 19, 20, 21, 93, 0, 0, 0,
  366.                           0, 0, 94, 95, 96, 97, 98, 99, 0, 0,
  367.                           0, 133, 0, 0, 1, 77, 78, 79, 152, 80,
  368.                           81, 27, 0, 0, 0, 185, 0, 186, 0, 187,
  369.                           0, 0, 67, 0, 0, 0, 0, 0, 0, 2,
  370.                           3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
  371.                           13, 14, 15, 16, 17, 18, 19, 20, 21, 0,
  372.                           0, 82, 83, 84, 0, 85, 86, 87, 88, 89,
  373.                           90, 91, 92, 93, 0, 0, 0, 0, 67, 94,
  374.                           95, 96, 97, 98, 99, 1, 77, 78, 79, 0,
  375.                           80, 81, 0, 0, 100, 52, 101, 0, 0, 0,
  376.                           0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  377.                           2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
  378.                           12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
  379.                           0, 0, 82, 83, 84, 0, 85, 86, 87, 88,
  380.                           89, 90, 91, 92, 93, 0, 0, 0, 0, 0,
  381.                           94, 95, 96, 97, 98, 99, 1, 77, 78, 79,
  382.                           0, 80, 81, 2, 0, 100, 52, 222, 0, 8,
  383.                           9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
  384.                           19, 20, 21, 0, 0, 0, 0, 0, 0, 0,
  385.                           0, 0, 1, 77, 78, 79, 0, 80, 81, 0,
  386.                           0, 0, 0, 82, 83, 84, 0, 85, 86, 87,
  387.                           88, 89, 90, 91, 92, 93, 0, 0, 0, 0,
  388.                           155, 94, 95, 96, 97, 98, 99, 1, 77, 78,
  389.                           79, 0, 80, 81, 0, 0, 100, 52, 224, 82,
  390.                           83, 84, 0, 85, 86, 87, 88, 89, 90, 91,
  391.                           92, 93, 0, 0, 0, 0, 0, 94, 95, 96,
  392.                           97, 98, 99, 1, 77, 78, 79, 0, 80, 81,
  393.                           0, 0, 100, 52, 290, 0, 0, 0, 0, 0,
  394.                           0, 0, 1, 77, 78, 79, 93, 80, 81, 0,
  395.                           0, 0, 94, 95, 96, 97, 98, 99, 1, 77,
  396.                           78, 79, 0, 80, 81, 0, 0, 0, 152, 329,
  397.                           82, 83, 84, 0, 85, 86, 87, 88, 89, 90,
  398.                           91, 92, 93, 0, 0, 0, 0, 0, 94, 95,
  399.                           96, 97, 98, 99, 1, 77, 78, 79, 0, 80,
  400.                           81, 93, 0, 100, 52, 0, 0, 94, 95, 96,
  401.                           97, 98, 99, 1, 77, 78, 79, 93, 80, 81,
  402.                           0, 0, 177, 94, 95, 96, 97, 98, 99, 0,
  403.                           0, 0, 0, 2, 0, 0, 0, 0, 255, 8,
  404.                           9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
  405.                           19, 20, 21, 93, 0, 0, 0, 0, 0, 94,
  406.                           95, 96, 97, 98, 99, 1, 0, 0, 325, 0,
  407.                           0, 0, 93, 0, 314, 0, 0, 0, 94, 95,
  408.                           96, 97, 98, 99, 0, 0, 0, 0, 0, 0,
  409.                           2, 0, 0, 338, 0, 0, 8, 9, 10, 11,
  410.                           12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
  411.                           0, 0, 0, 1, 77, 78, 79, 0, 80, 81,
  412.                           0, 0, 0, 0, 22, 0, 0, 1, 77, 78,
  413.                           79, 23, 80, 81, 0, 0, 0, 0, 2, 0,
  414.                           0, 0, 0, 157, 8, 9, 10, 11, 12, 13,
  415.                           14, 15, 16, 17, 18, 19, 20, 21, 1, 77,
  416.                           78, 79, 0, 80, 81, 0, 0, 0, 0, 0,
  417.                           0, 0, 93, 0, 0, 0, 0, 0, 94, 95,
  418.                           96, 97, 98, 99, 0, 0, 93, 0, 0, 142,
  419.                           0, 0, 94, 95, 96, 97, 98, 99, 1, 77,
  420.                           78, 79, 0, 80, 81, 0, 0, 0, 0, 0,
  421.                           1, 77, 78, 79, 0, 80, 81, 93, 264, 0,
  422.                           0, 0, 0, 94, 95, 96, 97, 98, 99, 1,
  423.                           77, 78, 79, 0, 80, 81, 0, 0, 0, 0,
  424.                           0, 1, 77, 78, 79, 0, 80, 81, 0, 0,
  425.                           0, 0, 0, 1, 77, 78, 79, 93, 80, 81,
  426.                           295, 0, 0, 94, 95, 96, 97, 98, 99, 93,
  427.                           0, 0, 327, 0, 0, 94, 95, 96, 97, 98,
  428.                           99, 1, 77, 78, 79, 0, 80, 81, 93, 335,
  429.                           0, 0, 0, 0, 94, 95, 96, 97, 98, 99,
  430.                           93, 348, 0, 0, 0, 0, 94, 95, 96, 97,
  431.                           98, 99, 93, 350, 0, 0, 0, 0, 94, 95,
  432.                           96, 97, 98, 99, 1, 77, 78, 79, 0, 80,
  433.                           81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  434.                           93, 360, 0, 0, 0, 0, 94, 95, 96, 97,
  435.                           98, 99, 1, 77, 78, 79, 0, 80, 81, 0,
  436.                           0, 0, 0, 0, 1, 77, 78, 79, 0, 80,
  437.                           81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  438.                           0, 0, 0, 162, 0, 0, 0, 0, 0, 94,
  439.                           95, 96, 97, 98, 99, 0, 0, 0, 0, 0,
  440.                           0, 0, 0, 0, 0, 0, 0, 367, 0, 0,
  441.                           1, 164, 0, 0, 0, 0, 0, 94, 95, 96,
  442.                           97, 98, 99, 93, 0, 0, 0, 0, 0, 94,
  443.                           95, 96, 97, 98, 99, 2, 3, 4, 5, 6,
  444.                           7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
  445.                           17, 18, 19, 20, 21, 1, 0, 0, 0, 0,
  446.                           0, 0, 0, 0, 0, 0, 0, 0, 0, 22,
  447.                           0, 0, 0, 0, 0, 0, 23, 0, 0, 0,
  448.                           2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
  449.                           12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
  450.                           1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  451.                           0, 0, 0, 0, 22, 0, 0, 0, 0, 0,
  452.                           0, 23, 0, 0, 0, 2, 0, 0, 0, 0,
  453.                           0, 8, 9, 10, 11, 12, 13, 14, 15, 16,
  454.                           17, 18, 19, 20, 21, 1, 0, 0, 0, 0,
  455.                           0, 0, 0, 0, 0, 0, 0, 0, 0, 227,
  456.                           292, 228, 0, 0, 0, 0, 23, 0, 0, 0,
  457.                           2, 0, 0, 0, 0, 0, 8, 9, 10, 11,
  458.                           12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
  459.                           0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  460.                           0, 0, 0, 0, 227, 0, 228, 2, 0, 0,
  461.                           0, 23, 0, 8, 9, 10, 11, 12, 13, 14,
  462.                           15, 16, 17, 18, 19, 20, 21, 2, 3, 4,
  463.                           5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  464.                           15, 16, 17, 18, 19, 20, 21, 0, 0, 0,
  465.                           0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
  466.                           0, 0, 0, 0, 247, 8, 9, 10, 11, 12,
  467.                           13, 14, 15, 16, 17, 18, 19, 20, 21, 302,
  468.                           0, 71, 0, 52, 2, 3, 4, 5, 6, 7,
  469.                           8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
  470.                           18, 19, 20, 21, 0, 0, 0, 2, 0, 0,
  471.                           0, 0, 0, 8, 9, 10, 11, 12, 13, 14,
  472.                           15, 16, 17, 18, 19, 20, 21, 0, 0, 0,
  473.                           0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  474.                           52, 260, 292, 228, 2, 0, 0, 0, 23, 0,
  475.                           8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
  476.                           18, 19, 20, 21, 0, 0, 0, 0, 0, 0,
  477.                           0, 0, 0, 0, 0, 0, 0, 0, 260, 0,
  478.                           228, 2, 0, 0, 0, 23, 0, 8, 9, 10,
  479.                           11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  480.                           21, 2, 3, 4, 5, 6, 7, 8, 9, 10,
  481.                           11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  482.                           21, 2, 23, 0, 0, 0, 0, 8, 9, 10,
  483.                           11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  484.                           21
  485. };
  486.  
  487. static short yycheck[] = {0,
  488.                           59, 58, 152, 105, 0, 73, 71, 23, 3, 22,
  489.                           82, 87, 25, 3, 17, 33, 3, 3, 17, 67,
  490.                           21, 22, 3, 82, 25, 3, 93, 43, 29, 67,
  491.                           227, 67, 33, 34, 230, 83, 67, 38, 34, 67,
  492.                           3, 54, 63, 12, 13, 3, 67, 85, 124, 85,
  493.                           59, 52, 3, 54, 85, 83, 69, 58, 92, 93,
  494.                           56, 84, 75, 260, 65, 261, 63, 48, 69, 84,
  495.                           79, 80, 81, 82, 75, 62, 62, 149, 81, 23,
  496.                           82, 80, 69, 69, 62, 157, 87, 152, 89, 84,
  497.                           149, 69, 168, 161, 84, 162, 105, 83, 157, 201,
  498.                           202, 203, 81, 81, 62, 78, 50, 76, 77, 62,
  499.                           67, 62, 83, 64, 62, 67, 64, 0, 134, 69,
  500.                           185, 134, 123, 124, 74, 75, 83, 123, 162, 73,
  501.                           164, 83, 76, 134, 199, 169, 170, 171, 62, 173,
  502.                           149, 31, 67, 26, 27, 67, 147, 223, 157, 93,
  503.                           226, 34, 186, 62, 304, 220, 228, 47, 83, 67,
  504.                           262, 83, 83, 62, 180, 64, 56, 168, 63, 228,
  505.                           70, 71, 67, 249, 246, 83, 63, 68, 63, 63,
  506.                           67, 182, 67, 67, 63, 63, 187, 246, 67, 67,
  507.                           10, 11, 201, 202, 203, 204, 205, 206, 207, 208,
  508.                           209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
  509.                           219, 227, 230, 62, 227, 64, 63, 161, 162, 228,
  510.                           67, 255, 223, 79, 63, 226, 227, 299, 67, 230,
  511.                           65, 244, 67, 234, 310, 311, 312, 246, 63, 304,
  512.                           299, 298, 67, 244, 260, 14, 15, 62, 249, 208,
  513.                           209, 210, 211, 262, 319, 204, 205, 212, 213, 335,
  514.                           206, 207, 321, 16, 81, 63, 82, 67, 344, 63,
  515.                           67, 347, 348, 65, 350, 81, 81, 55, 63, 313,
  516.                           314, 357, 316, 359, 360, 65, 63, 83, 0, 365,
  517.                           299, 18, 19, 20, 21, 22, 23, 24, 25, 26,
  518.                           27, 62, 65, 337, 338, 63, 63, 63, 53, 310,
  519.                           311, 312, 321, 83, 26, 27, 0, 214, 352, 31,
  520.                           216, 215, 34, 69, 217, 76, 218, 3, 4, 5,
  521.                           6, 43, 8, 9, 335, 47, 65, 219, 244, 147,
  522.                           52, 3, 52, 344, 56, 34, 347, 348, 236, 350,
  523.                           123, 47, -1, -1, -1, 82, 357, -1, 359, 360,
  524.                           7, 8, 9, 75, 365, -1, 28, -1, -1, -1,
  525.                           -1, -1, 34, 35, 36, 37, 38, 39, 40, 41,
  526.                           42, 43, 44, 45, 46, 47, 62, -1, -1, -1,
  527.                           -1, -1, 68, 69, 70, 71, 72, 73, -1, -1,
  528.                           -1, 63, -1, -1, 3, 4, 5, 6, 84, 8,
  529.                           9, 123, -1, -1, -1, 62, -1, 64, -1, 66,
  530.                           -1, -1, 134, -1, -1, -1, -1, -1, -1, 28,
  531.                           29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
  532.                           39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
  533.                           -1, 50, 51, 52, -1, 54, 55, 56, 57, 58,
  534.                           59, 60, 61, 62, -1, -1, -1, -1, 180, 68,
  535.                           69, 70, 71, 72, 73, 3, 4, 5, 6, -1,
  536.                           8, 9, -1, -1, 83, 84, 85, -1, -1, -1,
  537.                           -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  538.                           28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
  539.                           38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  540.                           -1, -1, 50, 51, 52, -1, 54, 55, 56, 57,
  541.                           58, 59, 60, 61, 62, -1, -1, -1, -1, -1,
  542.                           68, 69, 70, 71, 72, 73, 3, 4, 5, 6,
  543.                           -1, 8, 9, 28, -1, 83, 84, 85, -1, 34,
  544.                           35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
  545.                           45, 46, 47, -1, -1, -1, -1, -1, -1, -1,
  546.                           -1, -1, 3, 4, 5, 6, -1, 8, 9, -1,
  547.                           -1, -1, -1, 50, 51, 52, -1, 54, 55, 56,
  548.                           57, 58, 59, 60, 61, 62, -1, -1, -1, -1,
  549.                           85, 68, 69, 70, 71, 72, 73, 3, 4, 5,
  550.                           6, -1, 8, 9, -1, -1, 83, 84, 85, 50,
  551.                           51, 52, -1, 54, 55, 56, 57, 58, 59, 60,
  552.                           61, 62, -1, -1, -1, -1, -1, 68, 69, 70,
  553.                           71, 72, 73, 3, 4, 5, 6, -1, 8, 9,
  554.                           -1, -1, 83, 84, 85, -1, -1, -1, -1, -1,
  555.                           -1, -1, 3, 4, 5, 6, 62, 8, 9, -1,
  556.                           -1, -1, 68, 69, 70, 71, 72, 73, 3, 4,
  557.                           5, 6, -1, 8, 9, -1, -1, -1, 84, 85,
  558.                           50, 51, 52, -1, 54, 55, 56, 57, 58, 59,
  559.                           60, 61, 62, -1, -1, -1, -1, -1, 68, 69,
  560.                           70, 71, 72, 73, 3, 4, 5, 6, -1, 8,
  561.                           9, 62, -1, 83, 84, -1, -1, 68, 69, 70,
  562.                           71, 72, 73, 3, 4, 5, 6, 62, 8, 9,
  563.                           -1, -1, 83, 68, 69, 70, 71, 72, 73, -1,
  564.                           -1, -1, -1, 28, -1, -1, -1, -1, 83, 34,
  565.                           35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
  566.                           45, 46, 47, 62, -1, -1, -1, -1, -1, 68,
  567.                           69, 70, 71, 72, 73, 3, -1, -1, 63, -1,
  568.                           -1, -1, 62, -1, 83, -1, -1, -1, 68, 69,
  569.                           70, 71, 72, 73, -1, -1, -1, -1, -1, -1,
  570.                           28, -1, -1, 83, -1, -1, 34, 35, 36, 37,
  571.                           38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  572.                           -1, -1, -1, 3, 4, 5, 6, -1, 8, 9,
  573.                           -1, -1, -1, -1, 62, -1, -1, 3, 4, 5,
  574.                           6, 69, 8, 9, -1, -1, -1, -1, 28, -1,
  575.                           -1, -1, -1, 81, 34, 35, 36, 37, 38, 39,
  576.                           40, 41, 42, 43, 44, 45, 46, 47, 3, 4,
  577.                           5, 6, -1, 8, 9, -1, -1, -1, -1, -1,
  578.                           -1, -1, 62, -1, -1, -1, -1, -1, 68, 69,
  579.                           70, 71, 72, 73, -1, -1, 62, -1, -1, 65,
  580.                           -1, -1, 68, 69, 70, 71, 72, 73, 3, 4,
  581.                           5, 6, -1, 8, 9, -1, -1, -1, -1, -1,
  582.                           3, 4, 5, 6, -1, 8, 9, 62, 63, -1,
  583.                           -1, -1, -1, 68, 69, 70, 71, 72, 73, 3,
  584.                           4, 5, 6, -1, 8, 9, -1, -1, -1, -1,
  585.                           -1, 3, 4, 5, 6, -1, 8, 9, -1, -1,
  586.                           -1, -1, -1, 3, 4, 5, 6, 62, 8, 9,
  587.                           65, -1, -1, 68, 69, 70, 71, 72, 73, 62,
  588.                           -1, -1, 65, -1, -1, 68, 69, 70, 71, 72,
  589.                           73, 3, 4, 5, 6, -1, 8, 9, 62, 63,
  590.                           -1, -1, -1, -1, 68, 69, 70, 71, 72, 73,
  591.                           62, 63, -1, -1, -1, -1, 68, 69, 70, 71,
  592.                           72, 73, 62, 63, -1, -1, -1, -1, 68, 69,
  593.                           70, 71, 72, 73, 3, 4, 5, 6, -1, 8,
  594.                           9, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  595.                           62, 63, -1, -1, -1, -1, 68, 69, 70, 71,
  596.                           72, 73, 3, 4, 5, 6, -1, 8, 9, -1,
  597.                           -1, -1, -1, -1, 3, 4, 5, 6, -1, 8,
  598.                           9, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  599.                           -1, -1, -1, 62, -1, -1, -1, -1, -1, 68,
  600.                           69, 70, 71, 72, 73, -1, -1, -1, -1, -1,
  601.                           -1, -1, -1, -1, -1, -1, -1, 0, -1, -1,
  602.                           3, 62, -1, -1, -1, -1, -1, 68, 69, 70,
  603.                           71, 72, 73, 62, -1, -1, -1, -1, -1, 68,
  604.                           69, 70, 71, 72, 73, 28, 29, 30, 31, 32,
  605.                           33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
  606.                           43, 44, 45, 46, 47, 3, -1, -1, -1, -1,
  607.                           -1, -1, -1, -1, -1, -1, -1, -1, -1, 62,
  608.                           -1, -1, -1, -1, -1, -1, 69, -1, -1, -1,
  609.                           28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
  610.                           38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  611.                           3, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  612.                           -1, -1, -1, -1, 62, -1, -1, -1, -1, -1,
  613.                           -1, 69, -1, -1, -1, 28, -1, -1, -1, -1,
  614.                           -1, 34, 35, 36, 37, 38, 39, 40, 41, 42,
  615.                           43, 44, 45, 46, 47, 3, -1, -1, -1, -1,
  616.                           -1, -1, -1, -1, -1, -1, -1, -1, -1, 62,
  617.                           63, 64, -1, -1, -1, -1, 69, -1, -1, -1,
  618.                           28, -1, -1, -1, -1, -1, 34, 35, 36, 37,
  619.                           38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  620.                           -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  621.                           -1, -1, -1, -1, 62, -1, 64, 28, -1, -1,
  622.                           -1, 69, -1, 34, 35, 36, 37, 38, 39, 40,
  623.                           41, 42, 43, 44, 45, 46, 47, 28, 29, 30,
  624.                           31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
  625.                           41, 42, 43, 44, 45, 46, 47, -1, -1, -1,
  626.                           -1, -1, -1, -1, -1, -1, -1, -1, -1, 28,
  627.                           -1, -1, -1, -1, 85, 34, 35, 36, 37, 38,
  628.                           39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
  629.                           -1, 82, -1, 84, 28, 29, 30, 31, 32, 33,
  630.                           34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
  631.                           44, 45, 46, 47, -1, -1, -1, 28, -1, -1,
  632.                           -1, -1, -1, 34, 35, 36, 37, 38, 39, 40,
  633.                           41, 42, 43, 44, 45, 46, 47, -1, -1, -1,
  634.                           -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  635.                           84, 62, 63, 64, 28, -1, -1, -1, 69, -1,
  636.                           34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
  637.                           44, 45, 46, 47, -1, -1, -1, -1, -1, -1,
  638.                           -1, -1, -1, -1, -1, -1, -1, -1, 62, -1,
  639.                           64, 28, -1, -1, -1, 69, -1, 34, 35, 36,
  640.                           37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
  641.                           47, 28, 29, 30, 31, 32, 33, 34, 35, 36,
  642.                           37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
  643.                           47, 28, 69, -1, -1, -1, -1, 34, 35, 36,
  644.                           37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
  645.                           47
  646. };
  647. #define YYPURE 1
  648.  
  649. /*
  650.  * Skeleton output parser for bison, copyright (C) 1984 Bob Corbett and Richard Stallman 
  651.  *
  652.  * Permission is granted to anyone to make or distribute verbatim copies of this program provided that the copyright notice and this
  653.  * permission notice are preserved; and provided that the recipient is not asked to waive or limit his right to redistribute copies
  654.  * as permitted by this permission notice; and provided that anyone possessing an executable copy is granted access to copy the
  655.  * source code, in machine-readable form, in some reasonable manner. 
  656.  *
  657.  * Permission is granted to distribute derived works or enhanced versions of this program under the above conditions with the
  658.  * additional condition that the entire derivative or enhanced work must be covered by a permission notice identical to this one. 
  659.  *
  660.  * Anything distributed as part of a package containing portions derived from this program, which cannot in current practice perform
  661.  * its function usefully in the absense of what was derived directly from this program, is to be considered as forming, together
  662.  * with the latter, a single work derived from this program, which must be entirely covered by a permission notice identical to
  663.  * this one in order for distribution of the package to be permitted. 
  664.  *
  665.  * In other words, you are welcome to use, share and improve this program. You are forbidden to forbid anyone else to use, share and
  666.  * improve what you give them.   Help stamp out software-hoarding!  
  667.  */
  668.  
  669. /*
  670.  * This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the
  671.  * grammar. It was written by Richard Stallman by simplifying the hairy parser used when %semantic_parser is specified.  
  672.  */
  673.  
  674. /*
  675.  * Note: there must be only one dollar sign in this file. It is replaced by the list of actions, each action as one case of the
  676.  * switch.  
  677.  */
  678.  
  679. /* #include <malloc.h>  *//* WG */
  680. #include <string.h>
  681.  
  682. #define yyerrok         (yyerrstatus = 0)
  683. #define yyclearin       (yychar = YYEMPTY)
  684. #define YYEMPTY         -2
  685. #define YYEOF           0
  686. #define YYFAIL          goto yyerrlab;
  687.  
  688. #define YYTERROR        1
  689.  
  690. #ifndef YYIMPURE
  691. #define YYLEX           yylex()
  692. int yylex(void);                       /* WG */
  693. #endif
  694.  
  695. #ifndef YYPURE
  696. #define YYLEX           yylex(&yylval, &yylloc)
  697. int yylex(int, int);                   /* WG */
  698. #endif
  699.  
  700. /* If nonreentrant, generate the variables here */
  701.  
  702. #ifndef YYIMPURE
  703.  
  704. int yychar;                            /* the lookahead symbol                */
  705. YYSTYPE yylval;                        /* the semantic value of the           */
  706. /* lookahead symbol                    */
  707.  
  708. YYLTYPE yylloc;                        /* location data for the lookahead     */
  709. /* symbol                              */
  710.  
  711. int yydebug = 0;                       /* nonzero means print parse trace     */
  712.  
  713. #endif
  714.  
  715.  
  716. /* YYMAXDEPTH indicates the initial size of the parser's stacks        */
  717.  
  718. #ifndef YYMAXDEPTH
  719. #define YYMAXDEPTH 200
  720. #endif
  721.  
  722. /*
  723.  * YYMAXLIMIT is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used).  
  724.  */
  725.  
  726. #ifndef YYMAXLIMIT
  727. #define YYMAXLIMIT 10000
  728. #endif
  729.  
  730.  
  731. #line 91 "bison.sim"
  732. int
  733.  yyparse()
  734. {
  735.    register int yystate;
  736.    register int yyn;
  737.    register short *yyssp;
  738.    register YYSTYPE *yyvsp;
  739.    void yyerror(char *,...);           /* WG  [ ',...' - added ADE ] */
  740.    YYLTYPE *yylsp;
  741.    int yyerrstatus;                    /* number of tokens to shift before error messages enabled */
  742.    int yychar1;                        /* lookahead token as an internal (translated) token number */
  743.  
  744.    short yyssa[YYMAXDEPTH];            /* the state stack                     */
  745.    YYSTYPE yyvsa[YYMAXDEPTH];          /* the semantic value stack            */
  746.    YYLTYPE yylsa[YYMAXDEPTH];          /* the location stack                  */
  747.  
  748.    short *yyss = yyssa;                /* refer to the stacks thru separate pointers */
  749.    YYSTYPE *yyvs = yyvsa;              /* to allow yyoverflow to reallocate them elsewhere */
  750.    YYLTYPE *yyls = yylsa;
  751.  
  752.    int yymaxdepth = YYMAXDEPTH;
  753.  
  754. #ifndef YYPURE
  755.  
  756.    int yychar;
  757.    YYSTYPE yylval;
  758.    YYLTYPE yylloc;
  759.  
  760.    extern int yydebug;
  761.  
  762. #endif
  763.  
  764.  
  765.    YYSTYPE yyval;                      /* the variable used to return         */
  766.    /* semantic values from the action     */
  767.    /* routines                            */
  768.  
  769.    int yylen;
  770.  
  771.    if (yydebug)
  772.       fprintf(stderr, "Starting parse\n");
  773.  
  774.    yystate = 0;
  775.    yyerrstatus = 0;
  776.    yychar = YYEMPTY;                   /* Cause a token to be read.  */
  777.  
  778.    /*
  779.     * Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state
  780.     * stack.  
  781.     */
  782.  
  783.    yyssp = yyss - 1;
  784.    yyvsp = yyvs;
  785.    yylsp = yyls;
  786.  
  787.    /* Push a new state, which is found in  yystate  .  */
  788.    /*
  789.     * In all cases, when you get here, the value and location stacks have just been pushed. so pushing a state here evens the
  790.     * stacks.  
  791.     */
  792. yynewstate:
  793.  
  794.    *++yyssp = yystate;
  795.  
  796.    if (yyssp >= yyss + yymaxdepth - 1)
  797.    {
  798.       /* Give user a chance to reallocate the stack */
  799.       /* Use copies of these so that the &'s don't force the real ones into memory. */
  800.       YYSTYPE *yyvs1 = yyvs;
  801.       YYLTYPE *yyls1 = yyls;
  802.       short *yyss1 = yyss;
  803.  
  804.       /* Get the current used size of the three stacks, in elements.  */
  805.       int size = yyssp - yyss + 1;
  806.  
  807. #ifdef yyoverflow
  808.       /*
  809.        * Each stack pointer address is followed by the size of the data in use in that stack, in bytes.  
  810.        */
  811.       yyoverflow("parser stack overflow",
  812.                  &yyss1, size * sizeof(*yyssp),
  813.                  &yyvs1, size * sizeof(*yyvsp),
  814.                  &yyls1, size * sizeof(*yylsp),
  815.                  &yymaxdepth);
  816.  
  817.       yyss = yyss1;
  818.       yyvs = yyvs1;
  819.       yyls = yyls1;
  820. #else
  821.       /* Extend the stack our own way.  */
  822.         if (yymaxdepth >= YYMAXLIMIT)
  823.          yyerror("parser stack overflow");
  824.       yymaxdepth *= 2;
  825.       if (yymaxdepth > YYMAXLIMIT)
  826.          yymaxdepth = YYMAXLIMIT;
  827.       yyss = (short *) alloca(yymaxdepth * sizeof(*yyssp));
  828.       memcpy((char *) yyss, (char *) yyss1, size * sizeof(*yyssp));     /* WG */
  829.       yyls = (YYLTYPE *) alloca(yymaxdepth * sizeof(*yylsp));
  830.       memcpy((char *) yyls, (char *) yyls1, size * sizeof(*yylsp));     /* WG */
  831.       yyvs = (YYSTYPE *) alloca(yymaxdepth * sizeof(*yyvsp));
  832.       memcpy((char *) yyvs, (char *) yyvs1, size * sizeof(*yyvsp));     /* WG */
  833. #endif
  834.  
  835.         yyssp = yyss + size - 1;
  836.       yylsp = yyls + size - 1;
  837.       yyvsp = yyvs + size - 1;
  838.  
  839.       if (yydebug)
  840.          fprintf(stderr, "Stack size increased to %d\n", yymaxdepth);
  841.  
  842.       if (yyssp >= yyss + yymaxdepth - 1)
  843.          YYERROR;
  844.    }
  845.  
  846.    if (yydebug)
  847.       fprintf(stderr, "Entering state %d\n", yystate);
  848.  
  849.    /* Do appropriate processing given the current state.  */
  850.    /* Read a lookahead token if we need one and don't already have one.  */
  851. yyresume:
  852.  
  853.    /* First try to decide what to do without reference to lookahead token.  */
  854.  
  855.    yyn = (int) yypact[yystate];        /* WG */
  856.    if (yyn == YYFLAG)
  857.       goto yydefault;
  858.  
  859.    /* Not known => get a lookahead token if don't already have one.  */
  860.  
  861.    /*
  862.     * yychar is either YYEMPTY or YYEOF or a valid token in external form.  
  863.     */
  864.  
  865.    if (yychar == YYEMPTY)
  866.    {
  867.       yychar = YYLEX;
  868.    }
  869.  
  870.    /* Convert token to internal form (in yychar1) for indexing tables with */
  871.  
  872.    if (yychar <= 0)                    /* This means end of input. */
  873.    {
  874.       yychar1 = 0;
  875.       yychar = YYEOF;                  /* Don't call YYLEX any more */
  876.  
  877.       if (yydebug)
  878.          fprintf(stderr, "Now at end of input.\n");
  879.    }
  880.    else
  881.    {
  882.       yychar1 = YYTRANSLATE(yychar);
  883.  
  884.       if (yydebug)
  885.          fprintf(stderr, "Parsing next token; it is %d (%s)\n", yychar, yytname[yychar1]);
  886.    }
  887.  
  888.    yyn += yychar1;
  889.    if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
  890.       goto yydefault;
  891.  
  892.    yyn = yytable[yyn];
  893.  
  894.    /*
  895.     * yyn is what to do for this token type in this state. Negative => reduce, -yyn is rule number. Positive => shift, yyn is new
  896.     * state. New state is final state => don't bother to shift, just return success. 0, or most negative number => error.  
  897.     */
  898.  
  899.    if (yyn < 0)
  900.    {
  901.       if (yyn == (int) YYFLAG)         /* WG */
  902.          goto yyerrlab;
  903.       yyn = -yyn;
  904.       goto yyreduce;
  905.    }
  906.    else
  907.    if (yyn == 0)
  908.       goto yyerrlab;
  909.  
  910.    if (yyn == YYFINAL)
  911.       YYACCEPT;
  912.  
  913.    /* Shift the lookahead token.  */
  914.  
  915.    if (yydebug)
  916.       fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
  917.  
  918.    /* Discard the token being shifted unless it is eof.  */
  919.    if (yychar != YYEOF)
  920.       yychar = YYEMPTY;
  921.  
  922.    *++yyvsp = yylval;
  923.    *++yylsp = yylloc;
  924.  
  925.    /* count tokens shifted since error; after three, turn off error status.  */
  926.    if (yyerrstatus)
  927.       yyerrstatus--;
  928.  
  929.    yystate = yyn;
  930.    goto yynewstate;
  931.  
  932.    /* Do the default action for the current state.  */
  933. yydefault:
  934.  
  935.    yyn = yydefact[yystate];
  936.    if (yyn == 0)
  937.       goto yyerrlab;
  938.  
  939.    /* Do a reduction.  yyn is the number of a rule to reduce with.  */
  940. yyreduce:
  941.    yylen = yyr2[yyn];
  942.    yyval = yyvsp[1 - yylen];           /* implement default value of the action */
  943.  
  944.    if (yydebug)
  945.    {
  946.       if (yylen == 1)
  947.          fprintf(stderr, "Reducing 1 value via line %d, ",
  948.                  yyrline[yyn]);
  949.       else
  950.          fprintf(stderr, "Reducing %d values via line %d, ",
  951.                  yylen, yyrline[yyn]);
  952.    }
  953.    /* the action file follows */
  954.  
  955.    switch (yyn)
  956.    {
  957.  
  958.    }
  959.    /* the action file gets copied in in place of this dollarsign */
  960.    /* the action file ends */
  961.  
  962.    yyvsp -= yylen;
  963.    yylsp -= yylen;
  964.    yyssp -= yylen;
  965.  
  966.    if (yydebug)
  967.    {
  968.       short *ssp1 = yyss - 1;
  969.       fprintf(stderr, "state stack now", yyssp - yyss);
  970.       while (ssp1 != yyssp)
  971.          fprintf(stderr, " %d", *++ssp1);
  972.       fprintf(stderr, "\n");
  973.    }
  974.  
  975.    *++yyvsp = yyval;
  976.  
  977.    yylsp++;
  978.    if (yylen == 0)
  979.    {
  980.       yylsp->first_line = yylloc.first_line;
  981.       yylsp->first_column = yylloc.first_column;
  982.       yylsp->last_line = (yylsp - 1)->last_line;
  983.       yylsp->last_column = (yylsp - 1)->last_column;
  984.       yylsp->text = 0;
  985.    }
  986.    else
  987.    {
  988.       yylsp->last_line = (yylsp + yylen - 1)->last_line;
  989.       yylsp->last_column = (yylsp + yylen - 1)->last_column;
  990.    }
  991.  
  992.    /*
  993.     * Now "shift" the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule
  994.     * number reduced by.  
  995.     */
  996.  
  997.    yyn = yyr1[yyn];
  998.  
  999.    yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  1000.    if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  1001.       yystate = yytable[yystate];
  1002.    else
  1003.       yystate = yydefgoto[yyn - YYNTBASE];
  1004.  
  1005.    goto yynewstate;
  1006.  
  1007. yyerrlab:                             /* here on detecting error */
  1008.  
  1009.    if (!yyerrstatus)
  1010.       /* If not already recovering from an error, report this error.  */
  1011.    {
  1012.       yyerror("parse error");
  1013.    }
  1014.  
  1015.    if (yyerrstatus == 3)
  1016.    {
  1017.       /* if just tried and failed to reuse lookahead token after an error, discard it.  */
  1018.  
  1019.       /* return failure if at end of input */
  1020.       if (yychar == YYEOF)
  1021.          YYERROR;
  1022.  
  1023.       if (yydebug)
  1024.          fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
  1025.  
  1026.       yychar = YYEMPTY;
  1027.    }
  1028.  
  1029.    /*
  1030.     * Else will try to reuse lookahead token after shifting the error token.  
  1031.     */
  1032.  
  1033.    yyerrstatus = 3;                    /* Each real token shifted decrements this */
  1034.  
  1035.    goto yyerrhandle;
  1036.  
  1037. yyerrdefault:                         /* current state does not do anything special for the error token. */
  1038.  
  1039.    yyn = yydefact[yystate];            /* If its default is to accept any token, ok.  Otherwise pop it. */
  1040.    if (yyn)
  1041.       goto yydefault;
  1042.  
  1043. yyerrpop:                             /* pop the current state because it cannot handle the error token */
  1044.  
  1045.    if (yyssp == yyss)
  1046.       YYERROR;
  1047.    yyvsp--;
  1048.    yylsp--;
  1049.    yystate = *--yyssp;
  1050.  
  1051.    if (yydebug)
  1052.    {
  1053.       short *ssp1 = yyss - 1;
  1054.       fprintf(stderr, "Error: state stack now", yyssp - yyss);
  1055.       while (ssp1 != yyssp)
  1056.          fprintf(stderr, " %d", *++ssp1);
  1057.       fprintf(stderr, "\n");
  1058.    }
  1059.  
  1060. yyerrhandle:
  1061.  
  1062.    yyn = yypact[yystate];
  1063.    if (yyn == (int) YYFLAG)            /* WG */
  1064.       goto yyerrdefault;
  1065.  
  1066.    yyn += YYTERROR;
  1067.    if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
  1068.       goto yyerrdefault;
  1069.  
  1070.    yyn = yytable[yyn];
  1071.    if (yyn < 0)
  1072.    {
  1073.       if (yyn == YYFLAG)
  1074.          goto yyerrpop;
  1075.       yyn = -yyn;
  1076.       goto yyreduce;
  1077.    }
  1078.    else
  1079.    if (yyn == 0)
  1080.       goto yyerrpop;
  1081.  
  1082.    if (yyn == YYFINAL)
  1083.       YYACCEPT;
  1084.  
  1085.    if (yydebug)
  1086.       fprintf(stderr, "Shifting error token, ");
  1087.  
  1088.    *++yyvsp = yylval;
  1089.    *++yylsp = yylloc;
  1090.  
  1091.    yystate = yyn;
  1092.    goto yynewstate;
  1093. }
  1094.  
  1095. #include <stdio.h>
  1096.  
  1097. extern char yytext[];
  1098. extern int column;
  1099.  
  1100. void yyerror(s)
  1101. char *s;
  1102. {
  1103.    fflush(stdout);
  1104.    printf("\n%*s\n%*s\n", column, "^", column, s);
  1105. }
  1106.