home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / gnusmalltalk / mst.tab.c < prev    next >
C/C++ Source or Header  |  1992-03-01  |  40KB  |  1,278 lines

  1.  
  2. /*  A Bison parser, made from mst.y  */
  3.  
  4. #define    BANG    258
  5. #define    COLON    259
  6. #define    UPARROW    260
  7. #define    DOT    261
  8. #define    ASSIGN    262
  9. #define    SHARP    263
  10. #define    SEMICOLON    264
  11. #define    OPEN_PAREN    265
  12. #define    CLOSE_PAREN    266
  13. #define    OPEN_BRACKET    267
  14. #define    CLOSE_BRACKET    268
  15. #define    PRIMITIVE_START    269
  16. #define    INTERNAL_TOKEN    270
  17. #define    IDENTIFIER    271
  18. #define    KEYWORD    272
  19. #define    STRING_LITERAL    273
  20. #define    SYMBOL_KEYWORD    274
  21. #define    BINOP    275
  22. #define    VERTICAL_BAR    276
  23. #define    INTEGER_LITERAL    277
  24. #define    FLOATING_LITERAL    278
  25. #define    CHAR_LITERAL    279
  26.  
  27. #line 26 "mst.y"
  28.  
  29. #include "mst.h"
  30. #include "mstsym.h"
  31. #include "msttree.h"
  32. #include "mstdict.h"
  33. #include "mstcomp.h"
  34. #include <stdio.h>
  35. #ifdef HAS_ALLOCA_H
  36. #include <alloca.h>
  37. #endif
  38.  
  39. #define YYDEBUG 1
  40.  
  41. extern Boolean        quietExecution;
  42.  
  43.  
  44. #line 45 "mst.y"
  45. typedef union{
  46.   char        cval;
  47.   double    fval;
  48.   long        ival;
  49.   char        *sval;
  50.   TreeNode    node;
  51. } YYSTYPE;
  52.  
  53. #ifndef YYLTYPE
  54. typedef
  55.   struct yyltype
  56.     {
  57.       int timestamp;
  58.       int first_line;
  59.       int first_column;
  60.       int last_line;
  61.       int last_column;
  62.       char *text;
  63.    }
  64.   yyltype;
  65.  
  66. #define YYLTYPE yyltype
  67. #endif
  68.  
  69. #include <stdio.h>
  70.  
  71. #ifndef __STDC__
  72. #define const
  73. #endif
  74.  
  75.  
  76.  
  77. #define    YYFINAL        148
  78. #define    YYFLAG        -32768
  79. #define    YYNTBASE    25
  80.  
  81. #define YYTRANSLATE(x) ((unsigned)(x) <= 279 ? yytranslate[x] : 72)
  82.  
  83. static const char yytranslate[] = {     0,
  84.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  85.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  86.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  87.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  88.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  89.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  90.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  91.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  92.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  93.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  94.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  95.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  96.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  97.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  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,     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,     2,     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.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  108.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  109.      2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
  110.      6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
  111.     16,    17,    18,    19,    20,    21,    22,    23,    24
  112. };
  113.  
  114. static const short yyprhs[] = {     0,
  115.      0,     2,     5,     6,     8,    10,    13,    17,    20,    23,
  116.     27,    30,    34,    36,    39,    43,    46,    50,    54,    59,
  117.     61,    64,    66,    68,    70,    72,    74,    76,    79,    83,
  118.     85,    89,    92,    96,    98,   101,   102,   104,   108,   110,
  119.    114,   118,   119,   121,   123,   126,   129,   133,   135,   137,
  120.    139,   141,   143,   145,   149,   151,   153,   155,   157,   159,
  121.    161,   163,   166,   168,   170,   172,   174,   176,   178,   181,
  122.    184,   188,   190,   193,   195,   197,   199,   201,   203,   208,
  123.    209,   212,   215,   219,   221,   223,   225,   228,   230,   232,
  124.    236,   238,   240,   243,   246,   250,   253,   256,   260,   262,
  125.    265
  126. };
  127.  
  128. static const short yyrhs[] = {    27,
  129.      0,    26,    32,     0,     0,    15,     0,    28,     0,    27,
  130.     28,     0,    29,    31,     3,     0,    29,     3,     0,    43,
  131.      3,     0,    40,    43,     3,     0,     1,     3,     0,     3,
  132.     30,     3,     0,    47,     0,    32,     3,     0,    31,    32,
  133.      3,     0,    33,    42,     0,    33,    40,    42,     0,    33,
  134.     39,    42,     0,    33,    40,    39,    42,     0,    34,     0,
  135.     35,    36,     0,    37,     0,     1,     0,    16,     0,    20,
  136.      0,    21,     0,    16,     0,    38,    36,     0,    37,    38,
  137.     36,     0,    17,     0,    14,    22,    20,     0,    21,    21,
  138.      0,    21,    41,    21,     0,    36,     0,    41,    36,     0,
  139.      0,    43,     0,     5,    45,    44,     0,    45,     0,    45,
  140.      6,    42,     0,     1,     6,    42,     0,     0,     6,     0,
  141.     47,     0,    46,    47,     0,    36,     7,     0,    46,    36,
  142.      7,     0,    48,     0,    62,     0,    69,     0,    36,     0,
  143.     49,     0,    59,     0,    10,    45,    11,     0,    50,     0,
  144.     51,     0,    53,     0,    54,     0,    55,     0,    22,     0,
  145.     23,     0,     8,    52,     0,    16,     0,    35,     0,    19,
  146.      0,    17,     0,    24,     0,    18,     0,     8,    56,     0,
  147.     10,    11,     0,    10,    57,    11,     0,    58,     0,    57,
  148.     58,     0,    50,     0,    52,     0,    54,     0,    53,     0,
  149.     56,     0,    12,    60,    42,    13,     0,     0,    61,    21,
  150.      0,     4,    36,     0,    61,     4,    36,     0,    63,     0,
  151.     65,     0,    67,     0,    64,    34,     0,    48,     0,    63,
  152.      0,    66,    35,    64,     0,    64,     0,    65,     0,    66,
  153.     68,     0,    38,    66,     0,    68,    38,    66,     0,    62,
  154.     70,     0,     9,    71,     0,    70,     9,    71,     0,    34,
  155.      0,    35,    64,     0,    68,     0
  156. };
  157.  
  158. #if YYDEBUG != 0
  159. static const short yyrline[] = { 0,
  160.     80,    82,    83,    86,    89,    91,    94,    96,    97,   103,
  161.    110,   114,   118,   159,   171,   184,   187,   189,   191,   196,
  162.    198,   200,   201,   207,   211,   213,   216,   220,   222,   227,
  163.    231,   239,   241,   245,   247,   251,   253,   256,   260,   261,
  164.    264,   271,   273,   276,   278,   281,   283,   288,   290,   291,
  165.    294,   296,   297,   298,   301,   303,   304,   305,   306,   309,
  166.    311,   314,   318,   320,   321,   322,   326,   330,   334,   338,
  167.    340,   344,   346,   351,   353,   354,   355,   356,   359,   364,
  168.    366,   372,   374,   379,   381,   382,   385,   389,   391,   394,
  169.    399,   401,   404,   409,   412,   417,   422,   424,   429,   431,
  170.    433
  171. };
  172.  
  173. static const char * const yytname[] = {   "$",
  174. "error","$illegal.","BANG","COLON","UPARROW","DOT","ASSIGN","SHARP","SEMICOLON","OPEN_PAREN",
  175. "CLOSE_PAREN","OPEN_BRACKET","CLOSE_BRACKET","PRIMITIVE_START","INTERNAL_TOKEN","IDENTIFIER","KEYWORD","STRING_LITERAL","SYMBOL_KEYWORD","BINOP",
  176. "VERTICAL_BAR","INTEGER_LITERAL","FLOATING_LITERAL","CHAR_LITERAL","program","internal_marker","class_definition_list","class_definition","class_header","class_specification",
  177. "method_list","method","message_pattern","unary_selector","binary_selector","variable_name","keyword_variable_list","keyword","primitive","temporaries",
  178. "variable_names","statements","non_empty_statements","optional_dot","expression","assigns","simple_expression","primary","literal","number",
  179. "symbol_constant","symbol","character_constant","string","array_constant","array","array_constant_list","array_constant_elt","block","opt_block_variables",
  180. "block_variable_list","message_expression","unary_expression","unary_object_description","binary_expression","binary_object_description","keyword_expression","keyword_binary_object_description_list","cascaded_message_expression","semi_message_list",
  181. "message_elt",""
  182. };
  183. #endif
  184.  
  185. static const short yyr1[] = {     0,
  186.     25,    25,    25,    26,    27,    27,    28,    28,    28,    28,
  187.     28,    29,    30,    31,    31,    32,    32,    32,    32,    33,
  188.     33,    33,    33,    34,    35,    35,    36,    37,    37,    38,
  189.     39,    40,    40,    41,    41,    42,    42,    43,    43,    43,
  190.     43,    44,    44,    45,    45,    46,    46,    47,    47,    47,
  191.     48,    48,    48,    48,    49,    49,    49,    49,    49,    50,
  192.     50,    51,    52,    52,    52,    52,    53,    54,    55,    56,
  193.     56,    57,    57,    58,    58,    58,    58,    58,    59,    60,
  194.     60,    61,    61,    62,    62,    62,    63,    64,    64,    65,
  195.     66,    66,    67,    68,    68,    69,    70,    70,    71,    71,
  196.     71
  197. };
  198.  
  199. static const short yyr2[] = {     0,
  200.      1,     2,     0,     1,     1,     2,     3,     2,     2,     3,
  201.      2,     3,     1,     2,     3,     2,     3,     3,     4,     1,
  202.      2,     1,     1,     1,     1,     1,     1,     2,     3,     1,
  203.      3,     2,     3,     1,     2,     0,     1,     3,     1,     3,
  204.      3,     0,     1,     1,     2,     2,     3,     1,     1,     1,
  205.      1,     1,     1,     3,     1,     1,     1,     1,     1,     1,
  206.      1,     2,     1,     1,     1,     1,     1,     1,     2,     2,
  207.      3,     1,     2,     1,     1,     1,     1,     1,     4,     0,
  208.      2,     2,     3,     1,     1,     1,     2,     1,     1,     3,
  209.      1,     1,     2,     2,     3,     2,     2,     3,     1,     2,
  210.      1
  211. };
  212.  
  213. static const short yydefact[] = {     0,
  214.      0,     0,     0,     0,     0,    80,     4,    27,    68,     0,
  215.     60,    61,    67,     0,     0,     5,     0,    51,     0,     0,
  216.     39,     0,    44,    48,    52,    55,    56,    57,    58,    59,
  217.     53,    49,    84,    91,    85,     0,    86,    50,    11,     0,
  218.      0,    51,    13,    42,     0,    63,    66,    65,    25,    26,
  219.     64,    62,    69,     0,     0,     0,     0,    32,    34,     0,
  220.     23,    24,    30,     2,     0,    20,     0,    22,     0,     6,
  221.      8,     0,     0,    46,     0,     0,     9,     0,    51,    45,
  222.      0,    96,    87,     0,     0,    93,    41,    37,    12,    43,
  223.     38,    70,    74,    75,    77,    76,    78,     0,    72,    54,
  224.     82,     0,     0,    81,    33,    35,     0,     0,     0,    16,
  225.     21,     0,    28,     7,     0,    14,    10,    40,    47,    99,
  226.      0,   101,    97,     0,    88,    89,    90,    92,    94,     0,
  227.     71,    73,    79,    83,     0,    18,     0,    17,    29,    15,
  228.    100,    98,    95,    31,    19,     0,     0,     0
  229. };
  230.  
  231. static const short yydefgoto[] = {   146,
  232.     14,    15,    16,    17,    41,    72,    64,    65,    66,    51,
  233.     18,    68,    69,   108,    19,    60,    87,    88,    91,    21,
  234.     22,    23,    24,    25,    26,    27,    94,    28,    29,    30,
  235.     97,    98,    99,    31,    56,    57,    32,    33,    34,    35,
  236.     36,    37,   122,    38,    82,   123
  237. };
  238.  
  239. static const short yypact[] = {   125,
  240.     70,   293,   293,   338,   293,    12,-32768,-32768,-32768,    30,
  241. -32768,-32768,-32768,    96,   175,-32768,    20,    11,   290,    42,
  242.     66,   293,-32768,    22,-32768,-32768,-32768,-32768,-32768,-32768,
  243. -32768,    74,    58,    76,    64,   101,-32768,-32768,-32768,   200,
  244.     90,-32768,-32768,    92,   308,-32768,-32768,-32768,-32768,-32768,
  245. -32768,-32768,-32768,    93,    85,   270,     7,-32768,-32768,    33,
  246. -32768,-32768,-32768,-32768,   150,-32768,    85,    94,    85,-32768,
  247. -32768,    79,   106,-32768,   113,   117,-32768,   200,   120,-32768,
  248.     86,   115,-32768,   293,   293,    94,-32768,-32768,-32768,-32768,
  249. -32768,-32768,-32768,-32768,-32768,-32768,-32768,   323,-32768,-32768,
  250. -32768,   118,    85,-32768,-32768,-32768,   112,   250,   225,-32768,
  251. -32768,    85,-32768,-32768,   133,-32768,-32768,-32768,-32768,-32768,
  252.    293,    94,-32768,    86,-32768,-32768,    76,-32768,     6,   293,
  253. -32768,-32768,-32768,-32768,   119,-32768,   250,-32768,-32768,-32768,
  254.     76,-32768,     6,-32768,-32768,   138,   142,-32768
  255. };
  256.  
  257. static const short yypgoto[] = {-32768,
  258. -32768,-32768,   129,-32768,-32768,-32768,    -8,-32768,   -33,   -14,
  259.      2,-32768,   -34,    36,    87,-32768,   -48,    14,-32768,    50,
  260. -32768,    13,   -65,-32768,   -39,-32768,   152,   -35,   -32,-32768,
  261.    153,-32768,    56,-32768,-32768,-32768,-32768,   -53,   -77,   -80,
  262.    -60,-32768,   123,-32768,-32768,    37
  263. };
  264.  
  265.  
  266. #define    YYLAST        359
  267.  
  268.  
  269. static const short yytable[] = {    67,
  270.     83,    85,    67,    42,   128,    93,   127,   102,    73,    95,
  271.    103,    59,    96,    20,    43,    55,   110,    74,   125,   125,
  272.     61,    84,    71,    79,   129,    49,    50,   104,    20,   118,
  273.    126,   126,    76,   112,    80,    62,    63,   -88,   -88,    49,
  274.     50,   -88,   -88,   141,    77,     8,    85,   120,     8,   128,
  275.     58,   130,    44,   105,    54,   125,   101,    67,    93,   136,
  276.    138,   106,    95,   115,   125,    96,   121,   126,   111,   143,
  277.    113,    78,    39,   -89,   -89,    40,   126,   -89,   -89,    61,
  278.    -92,   114,    81,   -92,   -92,    42,    42,   130,   145,    85,
  279.    120,    62,    89,    83,    62,    63,    61,    90,    49,    50,
  280.      8,    62,    63,   100,   134,    49,    50,    83,   116,   121,
  281.     63,    62,    63,   139,    84,    49,    50,    63,    40,   117,
  282.     49,    50,    42,   124,    -3,     1,   119,     2,    84,     3,
  283.    133,    42,     4,   135,     5,   140,     6,   147,   144,     7,
  284.      8,   148,     9,    70,   137,    10,    11,    12,    13,   -36,
  285.     75,   109,   -36,   132,     3,    52,    53,     4,    86,     5,
  286.    142,     6,     0,   107,     0,     8,     0,     9,     0,     0,
  287.     10,    11,    12,    13,    -1,     1,     0,     2,     0,     3,
  288.      0,     0,     4,     0,     5,     0,     6,     0,     0,     0,
  289.      8,     0,     9,     0,     0,    10,    11,    12,    13,   -36,
  290.     75,     0,   -36,     0,     3,     0,     0,     4,     0,     5,
  291.      0,     6,   -36,     0,     0,     8,     0,     9,     0,     0,
  292.      0,    11,    12,    13,   -36,    75,     0,   -36,     0,     3,
  293.      0,     0,     4,     0,     5,     0,     6,     0,   107,     0,
  294.      8,     0,     9,     0,     0,     0,    11,    12,    13,   -36,
  295.     75,     0,   -36,     0,     3,     0,     0,     4,     0,     5,
  296.      0,     6,     0,     0,     0,     8,     0,     9,     0,     0,
  297.     75,    11,    12,    13,     3,     0,     0,     4,     0,     5,
  298.      0,     6,   -36,     0,     0,     8,     0,     9,     0,     0,
  299.     75,    11,    12,    13,     3,     0,     0,     4,     0,     5,
  300.      4,     6,     5,     0,     6,     8,     0,     9,     8,     0,
  301.      9,    11,    12,    13,    11,    12,    13,    45,    92,     0,
  302.      0,     0,     0,    46,    47,     9,    48,    49,    50,    11,
  303.     12,    13,    45,   131,     0,     0,     0,     0,    46,    47,
  304.      9,    48,    49,    50,    11,    12,    13,    45,     0,     0,
  305.      0,     0,     0,    46,    47,     0,    48,    49,    50
  306. };
  307.  
  308. static const short yycheck[] = {    14,
  309.     34,    36,    17,     2,    85,    45,    84,    56,    17,    45,
  310.      4,    10,    45,     0,     2,     4,    65,     7,    84,    85,
  311.      1,    36,     3,    22,    85,    20,    21,    21,    15,    78,
  312.     84,    85,    19,    68,    22,    16,    17,    16,    17,    20,
  313.     21,    20,    21,   121,     3,    16,    81,    81,    16,   130,
  314.     21,    86,     3,    21,     5,   121,    55,    72,    98,   108,
  315.    109,    60,    98,    72,   130,    98,    81,   121,    67,   130,
  316.     69,     6,     3,    16,    17,     6,   130,    20,    21,     1,
  317.     17,     3,     9,    20,    21,    84,    85,   122,   137,   124,
  318.    124,    16,     3,   127,    16,    17,     1,     6,    20,    21,
  319.     16,    16,    17,    11,   103,    20,    21,   141,     3,   124,
  320.     17,    16,    17,   112,   129,    20,    21,    17,     6,     3,
  321.     20,    21,   121,     9,     0,     1,     7,     3,   143,     5,
  322.     13,   130,     8,    22,    10,     3,    12,     0,    20,    15,
  323.     16,     0,    18,    15,   109,    21,    22,    23,    24,     0,
  324.      1,    65,     3,    98,     5,     4,     4,     8,    36,    10,
  325.    124,    12,    -1,    14,    -1,    16,    -1,    18,    -1,    -1,
  326.     21,    22,    23,    24,     0,     1,    -1,     3,    -1,     5,
  327.     -1,    -1,     8,    -1,    10,    -1,    12,    -1,    -1,    -1,
  328.     16,    -1,    18,    -1,    -1,    21,    22,    23,    24,     0,
  329.      1,    -1,     3,    -1,     5,    -1,    -1,     8,    -1,    10,
  330.     -1,    12,    13,    -1,    -1,    16,    -1,    18,    -1,    -1,
  331.     -1,    22,    23,    24,     0,     1,    -1,     3,    -1,     5,
  332.     -1,    -1,     8,    -1,    10,    -1,    12,    -1,    14,    -1,
  333.     16,    -1,    18,    -1,    -1,    -1,    22,    23,    24,     0,
  334.      1,    -1,     3,    -1,     5,    -1,    -1,     8,    -1,    10,
  335.     -1,    12,    -1,    -1,    -1,    16,    -1,    18,    -1,    -1,
  336.      1,    22,    23,    24,     5,    -1,    -1,     8,    -1,    10,
  337.     -1,    12,    13,    -1,    -1,    16,    -1,    18,    -1,    -1,
  338.      1,    22,    23,    24,     5,    -1,    -1,     8,    -1,    10,
  339.      8,    12,    10,    -1,    12,    16,    -1,    18,    16,    -1,
  340.     18,    22,    23,    24,    22,    23,    24,    10,    11,    -1,
  341.     -1,    -1,    -1,    16,    17,    18,    19,    20,    21,    22,
  342.     23,    24,    10,    11,    -1,    -1,    -1,    -1,    16,    17,
  343.     18,    19,    20,    21,    22,    23,    24,    10,    -1,    -1,
  344.     -1,    -1,    -1,    16,    17,    -1,    19,    20,    21
  345. };
  346. #define YYPURE 1
  347.  
  348. /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
  349. #line 3 "/home/sbb/gnu/lib/bison.simple"
  350.  
  351. /* Skeleton output parser for bison,
  352.    Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
  353.  
  354.    This program is free software; you can redistribute it and/or modify
  355.    it under the terms of the GNU General Public License as published by
  356.    the Free Software Foundation; either version 1, or (at your option)
  357.    any later version.
  358.  
  359.    This program is distributed in the hope that it will be useful,
  360.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  361.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  362.    GNU General Public License for more details.
  363.  
  364.    You should have received a copy of the GNU General Public License
  365.    along with this program; if not, write to the Free Software
  366.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  367.  
  368.  
  369. #ifndef alloca
  370. #ifdef __GNUC__
  371. #define alloca __builtin_alloca
  372. #else /* Not GNU C.  */
  373. #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__)
  374. #include <alloca.h>
  375. #else /* Not sparc */
  376. #ifdef MSDOS
  377. #include <malloc.h>
  378. #endif /* MSDOS */
  379. #endif /* Not sparc.  */
  380. #endif /* Not GNU C.  */
  381. #endif /* alloca not defined.  */
  382.  
  383. /* This is the parser code that is written into each bison parser
  384.   when the %semantic_parser declaration is not specified in the grammar.
  385.   It was written by Richard Stallman by simplifying the hairy parser
  386.   used when %semantic_parser is specified.  */
  387.  
  388. /* Note: there must be only one dollar sign in this file.
  389.    It is replaced by the list of actions, each action
  390.    as one case of the switch.  */
  391.  
  392. #define yyerrok        (yyerrstatus = 0)
  393. #define yyclearin    (yychar = YYEMPTY)
  394. #define YYEMPTY        -2
  395. #define YYEOF        0
  396. #define YYACCEPT    return(0)
  397. #define YYABORT     return(1)
  398. #define YYERROR        goto yyerrlab1
  399. /* Like YYERROR except do call yyerror.
  400.    This remains here temporarily to ease the
  401.    transition to the new meaning of YYERROR, for GCC.
  402.    Once GCC version 2 has supplanted version 1, this can go.  */
  403. #define YYFAIL        goto yyerrlab
  404. #define YYRECOVERING()  (!!yyerrstatus)
  405. #define YYBACKUP(token, value) \
  406. do                                \
  407.   if (yychar == YYEMPTY && yylen == 1)                \
  408.     { yychar = (token), yylval = (value);            \
  409.       yychar1 = YYTRANSLATE (yychar);                \
  410.       YYPOPSTACK;                        \
  411.       goto yybackup;                        \
  412.     }                                \
  413.   else                                \
  414.     { yyerror ("syntax error: cannot back up"); YYERROR; }    \
  415. while (0)
  416.  
  417. #define YYTERROR    1
  418. #define YYERRCODE    256
  419.  
  420. #ifndef YYPURE
  421. #define YYLEX        yylex()
  422. #endif
  423.  
  424. #ifdef YYPURE
  425. #ifdef YYLSP_NEEDED
  426. #define YYLEX        yylex(&yylval, &yylloc)
  427. #else
  428. #define YYLEX        yylex(&yylval)
  429. #endif
  430. #endif
  431.  
  432. /* If nonreentrant, generate the variables here */
  433.  
  434. #ifndef YYPURE
  435.  
  436. int    yychar;            /*  the lookahead symbol        */
  437. YYSTYPE    yylval;            /*  the semantic value of the        */
  438.                 /*  lookahead symbol            */
  439.  
  440. #ifdef YYLSP_NEEDED
  441. YYLTYPE yylloc;            /*  location data for the lookahead    */
  442.                 /*  symbol                */
  443. #endif
  444.  
  445. int yynerrs;            /*  number of parse errors so far       */
  446. #endif  /* not YYPURE */
  447.  
  448. #if YYDEBUG != 0
  449. int yydebug;            /*  nonzero means print parse trace    */
  450. /* Since this is uninitialized, it does not stop multiple parsers
  451.    from coexisting.  */
  452. #endif
  453.  
  454. /*  YYINITDEPTH indicates the initial size of the parser's stacks    */
  455.  
  456. #ifndef    YYINITDEPTH
  457. #define YYINITDEPTH 200
  458. #endif
  459.  
  460. /*  YYMAXDEPTH is the maximum size the stacks can grow to
  461.     (effective only if the built-in stack extension method is used).  */
  462.  
  463. #if YYMAXDEPTH == 0
  464. #undef YYMAXDEPTH
  465. #endif
  466.  
  467. #ifndef YYMAXDEPTH
  468. #define YYMAXDEPTH 10000
  469. #endif
  470.  
  471. #ifndef __cplusplus
  472.  
  473. /* This is the most reliable way to avoid incompatibilities
  474.    in available built-in functions on various systems.  */
  475. static void
  476. __yy_bcopy (from, to, count)
  477.      char *from;
  478.      char *to;
  479.      int count;
  480. {
  481.   register char *f = from;
  482.   register char *t = to;
  483.   register int i = count;
  484.  
  485.   while (i-- > 0)
  486.     *t++ = *f++;
  487. }
  488.  
  489. #else /* __cplusplus */
  490.  
  491. /* This is the most reliable way to avoid incompatibilities
  492.    in available built-in functions on various systems.  */
  493. static void
  494. __yy_bcopy (char *from, char *to, int count)
  495. {
  496.   register char *f = from;
  497.   register char *t = to;
  498.   register int i = count;
  499.  
  500.   while (i-- > 0)
  501.     *t++ = *f++;
  502. }
  503.  
  504. #endif
  505.  
  506. #line 160 "/home/sbb/gnu/lib/bison.simple"
  507. int
  508. yyparse()
  509. {
  510.   register int yystate;
  511.   register int yyn;
  512.   register short *yyssp;
  513.   register YYSTYPE *yyvsp;
  514.   int yyerrstatus;    /*  number of tokens to shift before error messages enabled */
  515.   int yychar1;        /*  lookahead token as an internal (translated) token number */
  516.  
  517.   short    yyssa[YYINITDEPTH];    /*  the state stack            */
  518.   YYSTYPE yyvsa[YYINITDEPTH];    /*  the semantic value stack        */
  519.  
  520.   short *yyss = yyssa;        /*  refer to the stacks thru separate pointers */
  521.   YYSTYPE *yyvs = yyvsa;    /*  to allow yyoverflow to reallocate them elsewhere */
  522.  
  523. #ifdef YYLSP_NEEDED
  524.   YYLTYPE *yyls = yylsa;
  525.   YYLTYPE *yylsp;
  526.   YYLTYPE yylsa[YYINITDEPTH];    /*  the location stack            */
  527.  
  528. #define YYPOPSTACK   (yyvsp--, yysp--, yylsp--)
  529. #else
  530. #define YYPOPSTACK   (yyvsp--, yysp--)
  531. #endif
  532.  
  533.   int yystacksize = YYINITDEPTH;
  534.  
  535. #ifdef YYPURE
  536.   int yychar;
  537.   YYSTYPE yylval;
  538.   int yynerrs;
  539. #ifdef YYLSP_NEEDED
  540.   YYLTYPE yylloc;
  541. #endif
  542. #endif
  543.  
  544.   YYSTYPE yyval;        /*  the variable used to return        */
  545.                 /*  semantic values from the action    */
  546.                 /*  routines                */
  547.  
  548.   int yylen;
  549.  
  550. #if YYDEBUG != 0
  551.   if (yydebug)
  552.     fprintf(stderr, "Starting parse\n");
  553. #endif
  554.  
  555.   yystate = 0;
  556.   yyerrstatus = 0;
  557.   yynerrs = 0;
  558.   yychar = YYEMPTY;        /* Cause a token to be read.  */
  559.  
  560.   /* Initialize stack pointers.
  561.      Waste one element of value and location stack
  562.      so that they stay on the same level as the state stack.  */
  563.  
  564.   yyssp = yyss - 1;
  565.   yyvsp = yyvs;
  566. #ifdef YYLSP_NEEDED
  567.   yylsp = yyls;
  568. #endif
  569.  
  570. /* Push a new state, which is found in  yystate  .  */
  571. /* In all cases, when you get here, the value and location stacks
  572.    have just been pushed. so pushing a state here evens the stacks.  */
  573. yynewstate:
  574.  
  575.   *++yyssp = yystate;
  576.  
  577.   if (yyssp >= yyss + yystacksize - 1)
  578.     {
  579.       /* Give user a chance to reallocate the stack */
  580.       /* Use copies of these so that the &'s don't force the real ones into memory. */
  581.       YYSTYPE *yyvs1 = yyvs;
  582.       short *yyss1 = yyss;
  583. #ifdef YYLSP_NEEDED
  584.       YYLTYPE *yyls1 = yyls;
  585. #endif
  586.  
  587.       /* Get the current used size of the three stacks, in elements.  */
  588.       int size = yyssp - yyss + 1;
  589.  
  590. #ifdef yyoverflow
  591.       /* Each stack pointer address is followed by the size of
  592.      the data in use in that stack, in bytes.  */
  593.       yyoverflow("parser stack overflow",
  594.          &yyss1, size * sizeof (*yyssp),
  595.          &yyvs1, size * sizeof (*yyvsp),
  596. #ifdef YYLSP_NEEDED
  597.          &yyls1, size * sizeof (*yylsp),
  598. #endif
  599.          &yystacksize);
  600.  
  601.       yyss = yyss1; yyvs = yyvs1;
  602. #ifdef YYLSP_NEEDED
  603.       yyls = yyls1;
  604. #endif
  605. #else /* no yyoverflow */
  606.       /* Extend the stack our own way.  */
  607.       if (yystacksize >= YYMAXDEPTH)
  608.     {
  609.       yyerror("parser stack overflow");
  610.       return 2;
  611.     }
  612.       yystacksize *= 2;
  613.       if (yystacksize > YYMAXDEPTH)
  614.     yystacksize = YYMAXDEPTH;
  615.       yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
  616.       __yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
  617.       yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
  618.       __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
  619. #ifdef YYLSP_NEEDED
  620.       yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
  621.       __yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
  622. #endif
  623. #endif /* no yyoverflow */
  624.  
  625.       yyssp = yyss + size - 1;
  626.       yyvsp = yyvs + size - 1;
  627. #ifdef YYLSP_NEEDED
  628.       yylsp = yyls + size - 1;
  629. #endif
  630.  
  631. #if YYDEBUG != 0
  632.       if (yydebug)
  633.     fprintf(stderr, "Stack size increased to %d\n", yystacksize);
  634. #endif
  635.  
  636.       if (yyssp >= yyss + yystacksize - 1)
  637.     YYABORT;
  638.     }
  639.  
  640. #if YYDEBUG != 0
  641.   if (yydebug)
  642.     fprintf(stderr, "Entering state %d\n", yystate);
  643. #endif
  644.  
  645.  yybackup:
  646.  
  647. /* Do appropriate processing given the current state.  */
  648. /* Read a lookahead token if we need one and don't already have one.  */
  649. /* yyresume: */
  650.  
  651.   /* First try to decide what to do without reference to lookahead token.  */
  652.  
  653.   yyn = yypact[yystate];
  654.   if (yyn == YYFLAG)
  655.     goto yydefault;
  656.  
  657.   /* Not known => get a lookahead token if don't already have one.  */
  658.  
  659.   /* yychar is either YYEMPTY or YYEOF
  660.      or a valid token in external form.  */
  661.  
  662.   if (yychar == YYEMPTY)
  663.     {
  664. #if YYDEBUG != 0
  665.       if (yydebug)
  666.     fprintf(stderr, "Reading a token: ");
  667. #endif
  668.       yychar = YYLEX;
  669.     }
  670.  
  671.   /* Convert token to internal form (in yychar1) for indexing tables with */
  672.  
  673.   if (yychar <= 0)        /* This means end of input. */
  674.     {
  675.       yychar1 = 0;
  676.       yychar = YYEOF;        /* Don't call YYLEX any more */
  677.  
  678. #if YYDEBUG != 0
  679.       if (yydebug)
  680.     fprintf(stderr, "Now at end of input.\n");
  681. #endif
  682.     }
  683.   else
  684.     {
  685.       yychar1 = YYTRANSLATE(yychar);
  686.  
  687. #if YYDEBUG != 0
  688.       if (yydebug)
  689.     fprintf(stderr, "Next token is %d (%s)\n", yychar, yytname[yychar1]);
  690. #endif
  691.     }
  692.  
  693.   yyn += yychar1;
  694.   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
  695.     goto yydefault;
  696.  
  697.   yyn = yytable[yyn];
  698.  
  699.   /* yyn is what to do for this token type in this state.
  700.      Negative => reduce, -yyn is rule number.
  701.      Positive => shift, yyn is new state.
  702.        New state is final state => don't bother to shift,
  703.        just return success.
  704.      0, or most negative number => error.  */
  705.  
  706.   if (yyn < 0)
  707.     {
  708.       if (yyn == YYFLAG)
  709.     goto yyerrlab;
  710.       yyn = -yyn;
  711.       goto yyreduce;
  712.     }
  713.   else if (yyn == 0)
  714.     goto yyerrlab;
  715.  
  716.   if (yyn == YYFINAL)
  717.     YYACCEPT;
  718.  
  719.   /* Shift the lookahead token.  */
  720.  
  721. #if YYDEBUG != 0
  722.   if (yydebug)
  723.     fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
  724. #endif
  725.  
  726.   /* Discard the token being shifted unless it is eof.  */
  727.   if (yychar != YYEOF)
  728.     yychar = YYEMPTY;
  729.  
  730.   *++yyvsp = yylval;
  731. #ifdef YYLSP_NEEDED
  732.   *++yylsp = yylloc;
  733. #endif
  734.  
  735.   /* count tokens shifted since error; after three, turn off error status.  */
  736.   if (yyerrstatus) yyerrstatus--;
  737.  
  738.   yystate = yyn;
  739.   goto yynewstate;
  740.  
  741. /* Do the default action for the current state.  */
  742. yydefault:
  743.  
  744.   yyn = yydefact[yystate];
  745.   if (yyn == 0)
  746.     goto yyerrlab;
  747.  
  748. /* Do a reduction.  yyn is the number of a rule to reduce with.  */
  749. yyreduce:
  750.   yylen = yyr2[yyn];
  751.   yyval = yyvsp[1-yylen]; /* implement default value of the action */
  752.  
  753. #if YYDEBUG != 0
  754.   if (yydebug)
  755.     {
  756.       int i;
  757.  
  758.       fprintf (stderr, "Reducing via rule %d (line %d), ",
  759.            yyn, yyrline[yyn]);
  760.  
  761.       /* Print the symboles being reduced, and their result.  */
  762.       for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
  763.     fprintf (stderr, "%s ", yytname[yyrhs[i]]);
  764.       fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
  765.     }
  766. #endif
  767.  
  768.  
  769.   switch (yyn) {
  770.  
  771. case 2:
  772. #line 82 "mst.y"
  773. { compileMethod(yyvsp[0].node); ;
  774.     break;}
  775. case 4:
  776. #line 87 "mst.y"
  777. { clearMethodStartPos(); ;
  778.     break;}
  779. case 7:
  780. #line 95 "mst.y"
  781. { skipCompilation = false; ;
  782.     break;}
  783. case 8:
  784. #line 96 "mst.y"
  785. { skipCompilation = false; ;
  786.     break;}
  787. case 9:
  788. #line 97 "mst.y"
  789. { if (!hadError) {
  790.                         executeStatements(nil, yyvsp[-1].node,
  791.                                 quietExecution); 
  792.                       }
  793.                       hadError = false;
  794.                     ;
  795.     break;}
  796. case 10:
  797. #line 104 "mst.y"
  798. { if (!hadError) {
  799.                         executeStatements(yyvsp[-2].node, yyvsp[-1].node,
  800.                                 quietExecution); 
  801.                                           }
  802.                       hadError = false;
  803.                                         ;
  804.     break;}
  805. case 11:
  806. #line 110 "mst.y"
  807. { hadError = false;
  808.                       yyerrok; ;
  809.     break;}
  810. case 12:
  811. #line 115 "mst.y"
  812. { clearMethodStartPos(); ;
  813.     break;}
  814. case 13:
  815. #line 119 "mst.y"
  816. { executeStatements(nil, 
  817.                     makeStatementList(yyvsp[0].node, nil), true); ;
  818.     break;}
  819. case 14:
  820. #line 160 "mst.y"
  821. { if (!hadError) {
  822.                         if (skipCompilation) {
  823.                           freeTree(yyvsp[-1].node);
  824.                         } else {
  825.                           compileMethod(yyvsp[-1].node);
  826.                           clearMethodStartPos();
  827.                         }
  828.                       } else {
  829.                         hadError = false;
  830.                       }
  831.                     ;
  832.     break;}
  833. case 15:
  834. #line 171 "mst.y"
  835. { if (!hadError) {
  836.                         if (skipCompilation) {
  837.                           freeTree(yyvsp[-1].node);
  838.                         } else {
  839.                           compileMethod(yyvsp[-1].node);
  840.                           clearMethodStartPos();
  841.                         }
  842.                       } else {
  843.                         hadError = false;
  844.                       }
  845.                     ;
  846.     break;}
  847. case 16:
  848. #line 186 "mst.y"
  849. { yyval.node = makeMethod(yyvsp[-1].node, nil, 0, yyvsp[0].node); ;
  850.     break;}
  851. case 17:
  852. #line 188 "mst.y"
  853. { yyval.node = makeMethod(yyvsp[-2].node, yyvsp[-1].node, 0, yyvsp[0].node); ;
  854.     break;}
  855. case 18:
  856. #line 190 "mst.y"
  857. { yyval.node = makeMethod(yyvsp[-2].node, nil, yyvsp[-1].ival, yyvsp[0].node); ;
  858.     break;}
  859. case 19:
  860. #line 192 "mst.y"
  861. { yyval.node = makeMethod(yyvsp[-3].node, yyvsp[-2].node, yyvsp[-1].ival, yyvsp[0].node); ;
  862.     break;}
  863. case 20:
  864. #line 197 "mst.y"
  865. { yyval.node = makeUnaryExpr(nil, yyvsp[0].sval); ;
  866.     break;}
  867. case 21:
  868. #line 198 "mst.y"
  869. { yyval.node = makeBinaryExpr(nil, yyvsp[-1].sval,
  870.                                       yyvsp[0].node); ;
  871.     break;}
  872. case 22:
  873. #line 200 "mst.y"
  874. { yyval.node = makeKeywordExpr(nil, yyvsp[0].node); ;
  875.     break;}
  876. case 23:
  877. #line 201 "mst.y"
  878. { errorf("Invalid message pattern");
  879.                       hadError = true;
  880.                       yyerrok;
  881.                       yyval.node = nil; ;
  882.     break;}
  883. case 27:
  884. #line 217 "mst.y"
  885. { yyval.node = makeVariable(yyvsp[0].sval); ;
  886.     break;}
  887. case 28:
  888. #line 221 "mst.y"
  889. { yyval.node = makeKeywordList(yyvsp[-1].sval, yyvsp[0].node); ;
  890.     break;}
  891. case 29:
  892. #line 223 "mst.y"
  893. { addNode(yyvsp[-2].node, makeKeywordList(yyvsp[-1].sval, yyvsp[0].node));
  894.                       yyval.node = yyvsp[-2].node; ;
  895.     break;}
  896. case 31:
  897. #line 233 "mst.y"
  898. { yyval.ival = yyvsp[-1].ival;
  899.                       if (strcmp(yyvsp[0].sval, ">") != 0) {
  900.                         YYERROR;
  901.                       }
  902.                     ;
  903.     break;}
  904. case 32:
  905. #line 240 "mst.y"
  906. { yyval.node = nil; ;
  907.     break;}
  908. case 33:
  909. #line 242 "mst.y"
  910. { yyval.node = yyvsp[-1].node; ;
  911.     break;}
  912. case 34:
  913. #line 246 "mst.y"
  914. { yyval.node = makeVariableList(yyvsp[0].node); ;
  915.     break;}
  916. case 35:
  917. #line 247 "mst.y"
  918. { addNode(yyvsp[-1].node, makeVariableList(yyvsp[0].node));
  919.                       yyval.node = yyvsp[-1].node; ;
  920.     break;}
  921. case 36:
  922. #line 252 "mst.y"
  923. { yyval.node = nil; ;
  924.     break;}
  925. case 38:
  926. #line 258 "mst.y"
  927. { yyval.node = makeStatementList(makeReturn(yyvsp[-1].node),
  928.                                    nil); ;
  929.     break;}
  930. case 39:
  931. #line 260 "mst.y"
  932. { yyval.node = makeStatementList(yyvsp[0].node, nil); ;
  933.     break;}
  934. case 40:
  935. #line 263 "mst.y"
  936. { yyval.node = makeStatementList(yyvsp[-2].node, yyvsp[0].node); ;
  937.     break;}
  938. case 41:
  939. #line 264 "mst.y"
  940. { yyval.node = yyvsp[0].node;
  941.                   yyerrok;
  942.                   errorf("Error in expression");
  943.                   hadError = true;
  944.                 ;
  945.     break;}
  946. case 45:
  947. #line 278 "mst.y"
  948. { yyval.node = makeAssign(yyvsp[-1].node, yyvsp[0].node); ;
  949.     break;}
  950. case 46:
  951. #line 282 "mst.y"
  952. { yyval.node = makeVariableList(yyvsp[-1].node); ;
  953.     break;}
  954. case 47:
  955. #line 284 "mst.y"
  956. { addNode(yyvsp[-2].node, makeVariableList(yyvsp[-1].node));
  957.                       yyval.node = yyvsp[-2].node; ;
  958.     break;}
  959. case 54:
  960. #line 298 "mst.y"
  961. { yyval.node = yyvsp[-1].node; ;
  962.     break;}
  963. case 60:
  964. #line 310 "mst.y"
  965. { yyval.node = makeIntConstant(yyvsp[0].ival); ;
  966.     break;}
  967. case 61:
  968. #line 311 "mst.y"
  969. { yyval.node = makeFloatConstant(yyvsp[0].fval); ;
  970.     break;}
  971. case 62:
  972. #line 315 "mst.y"
  973. { yyval.node = makeSymbolConstant(yyvsp[0].node); ;
  974.     break;}
  975. case 63:
  976. #line 319 "mst.y"
  977. { yyval.node = internIdent(yyvsp[0].sval); ;
  978.     break;}
  979. case 64:
  980. #line 320 "mst.y"
  981. { yyval.node = internBinOP(yyvsp[0].sval); ;
  982.     break;}
  983. case 65:
  984. #line 321 "mst.y"
  985. { yyval.node = internIdent(yyvsp[0].sval); ;
  986.     break;}
  987. case 66:
  988. #line 322 "mst.y"
  989. { yyval.node = internIdent(yyvsp[0].sval); ;
  990.     break;}
  991. case 67:
  992. #line 327 "mst.y"
  993. { yyval.node = makeCharConstant(yyvsp[0].cval); ;
  994.     break;}
  995. case 68:
  996. #line 331 "mst.y"
  997. { yyval.node = makeStringConstant(yyvsp[0].sval); ;
  998.     break;}
  999. case 69:
  1000. #line 335 "mst.y"
  1001. { yyval.node = makeArrayConstant(yyvsp[0].node); ;
  1002.     break;}
  1003. case 70:
  1004. #line 339 "mst.y"
  1005. { yyval.node = nil; ;
  1006.     break;}
  1007. case 71:
  1008. #line 341 "mst.y"
  1009. { yyval.node = yyvsp[-1].node; ;
  1010.     break;}
  1011. case 72:
  1012. #line 345 "mst.y"
  1013. { yyval.node = makeArrayElt(yyvsp[0].node); ;
  1014.     break;}
  1015. case 73:
  1016. #line 347 "mst.y"
  1017. { addNode(yyvsp[-1].node, makeArrayElt(yyvsp[0].node));
  1018.                       yyval.node = yyvsp[-1].node; ;
  1019.     break;}
  1020. case 79:
  1021. #line 361 "mst.y"
  1022. { yyval.node = makeBlock(yyvsp[-2].node, yyvsp[-1].node); ;
  1023.     break;}
  1024. case 80:
  1025. #line 365 "mst.y"
  1026. { yyval.node = nil; ;
  1027.     break;}
  1028. case 82:
  1029. #line 373 "mst.y"
  1030. { yyval.node = makeVariableList(yyvsp[0].node); ;
  1031.     break;}
  1032. case 83:
  1033. #line 375 "mst.y"
  1034. { addNode(yyvsp[-2].node, makeVariableList(yyvsp[0].node));
  1035.                       yyval.node = yyvsp[-2].node; ;
  1036.     break;}
  1037. case 87:
  1038. #line 386 "mst.y"
  1039. { yyval.node = makeUnaryExpr(yyvsp[-1].node, yyvsp[0].sval); ;
  1040.     break;}
  1041. case 90:
  1042. #line 396 "mst.y"
  1043. { yyval.node = makeBinaryExpr(yyvsp[-2].node, yyvsp[-1].sval, yyvsp[0].node); ;
  1044.     break;}
  1045. case 93:
  1046. #line 406 "mst.y"
  1047. { yyval.node = makeKeywordExpr(yyvsp[-1].node, yyvsp[0].node); ;
  1048.     break;}
  1049. case 94:
  1050. #line 411 "mst.y"
  1051. { yyval.node = makeKeywordList(yyvsp[-1].sval, yyvsp[0].node); ;
  1052.     break;}
  1053. case 95:
  1054. #line 413 "mst.y"
  1055. { addNode(yyvsp[-2].node, makeKeywordList(yyvsp[-1].sval, yyvsp[0].node));
  1056.                       yyval.node = yyvsp[-2].node; ;
  1057.     break;}
  1058. case 96:
  1059. #line 419 "mst.y"
  1060. { yyval.node = makeCascadedMessage(yyvsp[-1].node, yyvsp[0].node); ;
  1061.     break;}
  1062. case 97:
  1063. #line 423 "mst.y"
  1064. { yyval.node = makeMessageList(yyvsp[0].node); ;
  1065.     break;}
  1066. case 98:
  1067. #line 425 "mst.y"
  1068. { addNode(yyvsp[-2].node, makeMessageList(yyvsp[0].node));
  1069.                       yyval.node = yyvsp[-2].node; ;
  1070.     break;}
  1071. case 99:
  1072. #line 430 "mst.y"
  1073. { yyval.node = makeUnaryExpr(nil, yyvsp[0].sval); ;
  1074.     break;}
  1075. case 100:
  1076. #line 432 "mst.y"
  1077. { yyval.node = makeBinaryExpr(nil, yyvsp[-1].sval, yyvsp[0].node); ;
  1078.     break;}
  1079. case 101:
  1080. #line 434 "mst.y"
  1081. { yyval.node = makeKeywordExpr(nil, yyvsp[0].node); ;
  1082.     break;}
  1083. }
  1084.    /* the action file gets copied in in place of this dollarsign */
  1085. #line 423 "/home/sbb/gnu/lib/bison.simple"
  1086.  
  1087.   yyvsp -= yylen;
  1088.   yyssp -= yylen;
  1089. #ifdef YYLSP_NEEDED
  1090.   yylsp -= yylen;
  1091. #endif
  1092.  
  1093. #if YYDEBUG != 0
  1094.   if (yydebug)
  1095.     {
  1096.       short *ssp1 = yyss - 1;
  1097.       fprintf (stderr, "state stack now");
  1098.       while (ssp1 != yyssp)
  1099.     fprintf (stderr, " %d", *++ssp1);
  1100.       fprintf (stderr, "\n");
  1101.     }
  1102. #endif
  1103.  
  1104.   *++yyvsp = yyval;
  1105.  
  1106. #ifdef YYLSP_NEEDED
  1107.   yylsp++;
  1108.   if (yylen == 0)
  1109.     {
  1110.       yylsp->first_line = yylloc.first_line;
  1111.       yylsp->first_column = yylloc.first_column;
  1112.       yylsp->last_line = (yylsp-1)->last_line;
  1113.       yylsp->last_column = (yylsp-1)->last_column;
  1114.       yylsp->text = 0;
  1115.     }
  1116.   else
  1117.     {
  1118.       yylsp->last_line = (yylsp+yylen-1)->last_line;
  1119.       yylsp->last_column = (yylsp+yylen-1)->last_column;
  1120.     }
  1121. #endif
  1122.  
  1123.   /* Now "shift" the result of the reduction.
  1124.      Determine what state that goes to,
  1125.      based on the state we popped back to
  1126.      and the rule number reduced by.  */
  1127.  
  1128.   yyn = yyr1[yyn];
  1129.  
  1130.   yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  1131.   if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  1132.     yystate = yytable[yystate];
  1133.   else
  1134.     yystate = yydefgoto[yyn - YYNTBASE];
  1135.  
  1136.   goto yynewstate;
  1137.  
  1138. yyerrlab:   /* here on detecting error */
  1139.  
  1140.   if (! yyerrstatus)
  1141.     /* If not already recovering from an error, report this error.  */
  1142.     {
  1143.       ++yynerrs;
  1144.  
  1145. #ifdef YYERROR_VERBOSE
  1146.       yyn = yypact[yystate];
  1147.  
  1148.       if (yyn > YYFLAG && yyn < YYLAST)
  1149.     {
  1150.       int size = 0;
  1151.       char *msg;
  1152.       int x, count;
  1153.  
  1154.       count = 0;
  1155.       for (x = 0; x < (sizeof(yytname) / sizeof(char *)); x++)
  1156.         if (yycheck[x + yyn] == x)
  1157.           size += strlen(yytname[x]) + 15, count++;
  1158.       msg = (char *) xmalloc(size + 15);
  1159.       strcpy(msg, "parse error");
  1160.  
  1161.       if (count < 5)
  1162.         {
  1163.           count = 0;
  1164.           for (x = 0; x < (sizeof(yytname) / sizeof(char *)); x++)
  1165.         if (yycheck[x + yyn] == x)
  1166.           {
  1167.             strcat(msg, count == 0 ? ", expecting `" : " or `");
  1168.             strcat(msg, yytname[x]);
  1169.             strcat(msg, "'");
  1170.             count++;
  1171.           }
  1172.         }
  1173.       yyerror(msg);
  1174.       free(msg);
  1175.     }
  1176.       else
  1177. #endif /* YYERROR_VERBOSE */
  1178.     yyerror("parse error");
  1179.     }
  1180.  
  1181. yyerrlab1:   /* here on error raised explicitly by an action */
  1182.  
  1183.   if (yyerrstatus == 3)
  1184.     {
  1185.       /* if just tried and failed to reuse lookahead token after an error, discard it.  */
  1186.  
  1187.       /* return failure if at end of input */
  1188.       if (yychar == YYEOF)
  1189.     YYABORT;
  1190.  
  1191. #if YYDEBUG != 0
  1192.       if (yydebug)
  1193.     fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
  1194. #endif
  1195.  
  1196.       yychar = YYEMPTY;
  1197.     }
  1198.  
  1199.   /* Else will try to reuse lookahead token
  1200.      after shifting the error token.  */
  1201.  
  1202.   yyerrstatus = 3;        /* Each real token shifted decrements this */
  1203.  
  1204.   goto yyerrhandle;
  1205.  
  1206. yyerrdefault:  /* current state does not do anything special for the error token. */
  1207.  
  1208. #if 0
  1209.   /* This is wrong; only states that explicitly want error tokens
  1210.      should shift them.  */
  1211.   yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  1212.   if (yyn) goto yydefault;
  1213. #endif
  1214.  
  1215. yyerrpop:   /* pop the current state because it cannot handle the error token */
  1216.  
  1217.   if (yyssp == yyss) YYABORT;
  1218.   yyvsp--;
  1219.   yystate = *--yyssp;
  1220. #ifdef YYLSP_NEEDED
  1221.   yylsp--;
  1222. #endif
  1223.  
  1224. #if YYDEBUG != 0
  1225.   if (yydebug)
  1226.     {
  1227.       short *ssp1 = yyss - 1;
  1228.       fprintf (stderr, "Error: state stack now");
  1229.       while (ssp1 != yyssp)
  1230.     fprintf (stderr, " %d", *++ssp1);
  1231.       fprintf (stderr, "\n");
  1232.     }
  1233. #endif
  1234.  
  1235. yyerrhandle:
  1236.  
  1237.   yyn = yypact[yystate];
  1238.   if (yyn == YYFLAG)
  1239.     goto yyerrdefault;
  1240.  
  1241.   yyn += YYTERROR;
  1242.   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
  1243.     goto yyerrdefault;
  1244.  
  1245.   yyn = yytable[yyn];
  1246.   if (yyn < 0)
  1247.     {
  1248.       if (yyn == YYFLAG)
  1249.     goto yyerrpop;
  1250.       yyn = -yyn;
  1251.       goto yyreduce;
  1252.     }
  1253.   else if (yyn == 0)
  1254.     goto yyerrpop;
  1255.  
  1256.   if (yyn == YYFINAL)
  1257.     YYACCEPT;
  1258.  
  1259. #if YYDEBUG != 0
  1260.   if (yydebug)
  1261.     fprintf(stderr, "Shifting error token, ");
  1262. #endif
  1263.  
  1264.   *++yyvsp = yylval;
  1265. #ifdef YYLSP_NEEDED
  1266.   *++yylsp = yylloc;
  1267. #endif
  1268.  
  1269.   yystate = yyn;
  1270.   goto yynewstate;
  1271. }
  1272. #line 438 "mst.y"
  1273.  
  1274. /*     
  1275. ADDITIONAL C CODE
  1276. */
  1277.  
  1278.