home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / NGAWK1.ZIP / GRAM.C < prev    next >
C/C++ Source or Header  |  1988-07-16  |  51KB  |  1,103 lines

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