/[bison]/bison/src/parse-gram.c
ViewVC logotype

Diff of /bison/src/parse-gram.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by akim, Tue Jun 11 20:16:05 2002 UTC revision 1.2 by akim, Tue Jun 11 21:45:49 2002 UTC
# Line 1  Line 1 
1  /* A Bison parser, made from parse-gram.y  /* A Bison parser, made from parse-gram.y
2     by GNU bison 1.49b.  */     by GNU bison 1.35.  */
3    
4  /* Skeleton output parser for Bison,  #define YYBISON 1  /* Identify Bison output.  */
    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software  
    Foundation, Inc.  
   
    This program is free software; you can redistribute it and/or modify  
    it under the terms of the GNU General Public License as published by  
    the Free Software Foundation; either version 2, or (at your option)  
    any later version.  
   
    This program is distributed in the hope that it will be useful,  
    but WITHOUT ANY WARRANTY; without even the implied warranty of  
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
    GNU General Public License for more details.  
   
    You should have received a copy of the GNU General Public License  
    along with this program; if not, write to the Free Software  
    Foundation, Inc., 59 Temple Place - Suite 330,  
    Boston, MA 02111-1307, USA.  */  
   
 /* As a special exception, when this file is copied by Bison into a  
    Bison output file, you may use that output file without restriction.  
    This special exception was added by the Free Software Foundation  
    in version 1.24 of Bison.  */  
5    
 /* This is the parser code that is written into each bison parser when  
    the %semantic_parser declaration is not specified in the grammar.  
    It was written by Richard Stallman by simplifying the original so  
    called ``semantic'' parser.  */  
   
 /* All symbols defined below should begin with yy or YY, to avoid  
    infringing on user name space.  This should be done even for local  
    variables, as they might otherwise be expanded by user macros.  
    There are some unavoidable exceptions within include files to  
    define necessary library symbols; they are noted "INFRINGES ON  
    USER NAME SPACE" below.  */  
   
 /* Identify Bison output.  */  
 #define YYBISON 1  
   
 /* Pure parsers.  */  
 #define YYPURE  1  
   
 /* Using locations.  */  
 #define YYLSP_NEEDED 1  
   
 /* If NAME_PREFIX is specified substitute the variables and functions  
    names.  */  
6  #define yyparse gram_parse  #define yyparse gram_parse
7  #define yylex   gram_lex  #define yylex gram_lex
8  #define yyerror gram_error  #define yyerror gram_error
9  #define yylval  gram_lval  #define yylval gram_lval
10  #define yychar  gram_char  #define yychar gram_char
11  #define yydebug gram_debug  #define yydebug gram_debug
12  #define yynerrs gram_nerrs  #define yynerrs gram_nerrs
13  #if YYLSP_NEEDED  #define YYLSP_NEEDED 1
 # define yylloc gram_lloc  
 #endif  
14    
15    # define        GRAM_EOF        0
16    # define        STRING  257
17    # define        CHARACTER       258
18    # define        INT     259
19    # define        PERCENT_TOKEN   260
20    # define        PERCENT_NTERM   261
21    # define        PERCENT_TYPE    262
22    # define        PERCENT_UNION   263
23    # define        PERCENT_EXPECT  264
24    # define        PERCENT_START   265
25    # define        PERCENT_LEFT    266
26    # define        PERCENT_RIGHT   267
27    # define        PERCENT_NONASSOC        268
28    # define        PERCENT_PREC    269
29    # define        PERCENT_VERBOSE 270
30    # define        PERCENT_ERROR_VERBOSE   271
31    # define        PERCENT_OUTPUT  272
32    # define        PERCENT_FILE_PREFIX     273
33    # define        PERCENT_NAME_PREFIX     274
34    # define        PERCENT_DEFINE  275
35    # define        PERCENT_PURE_PARSER     276
36    # define        PERCENT_DEFINES 277
37    # define        PERCENT_YACC    278
38    # define        PERCENT_DEBUG   279
39    # define        PERCENT_LOCATIONS       280
40    # define        PERCENT_NO_LINES        281
41    # define        PERCENT_SKELETON        282
42    # define        PERCENT_TOKEN_TABLE     283
43    # define        TYPE    284
44    # define        EQUAL   285
45    # define        SEMICOLON       286
46    # define        COLON   287
47    # define        PIPE    288
48    # define        ID      289
49    # define        PERCENT_PERCENT 290
50    # define        PROLOGUE        291
51    # define        EPILOGUE        292
52    # define        BRACED_CODE     293
53    
 /* Copy the first part of user declarations.  */  
54  #line 31 "parse-gram.y"  #line 31 "parse-gram.y"
55    
56  #include "system.h"  #include "system.h"
# Line 72  Line 62 
62  #include "reader.h"  #include "reader.h"
63  #include "conflicts.h"  #include "conflicts.h"
64    
65    #define YYERROR_VERBOSE 1
66    
67  /* Pass the control structure to YYPARSE and YYLEX. */  /* Pass the control structure to YYPARSE and YYLEX. */
68  #define YYPARSE_PARAM gram_control  #define YYPARSE_PARAM gram_control
69  #define YYLEX_PARAM gram_control  #define YYLEX_PARAM gram_control
# Line 98  symbol_t *current_lhs; Line 90  symbol_t *current_lhs;
90  associativity current_assoc;  associativity current_assoc;
91  int current_prec = 0;  int current_prec = 0;
92    
93    #line 72 "parse-gram.y"
 /* Enabling traces.  */  
 #ifndef YYDEBUG  
 # define YYDEBUG 1  
 #endif  
   
 /* Enabling verbose error messages.  */  
 #ifdef YYERROR_VERBOSE  
 # undef YYERROR_VERBOSE  
 # define YYERROR_VERBOSE 1  
 #else  
 # define YYERROR_VERBOSE 1  
 #endif  
   
94  #ifndef YYSTYPE  #ifndef YYSTYPE
 #line 70 "parse-gram.y"  
95  typedef union  typedef union
96  {  {
97    symbol_t *symbol;    symbol_t *symbol;
# Line 130  typedef struct yyltype Line 108  typedef struct yyltype
108  {  {
109    int first_line;    int first_line;
110    int first_column;    int first_column;
111    
112    int last_line;    int last_line;
113    int last_column;    int last_column;
114  } yyltype;  } yyltype;
115    
116  # define YYLTYPE yyltype  # define YYLTYPE yyltype
117  # define YYLTYPE_IS_TRIVIAL 1  # define YYLTYPE_IS_TRIVIAL 1
118  #endif  #endif
119    
120  /* Copy the second part of user declarations.  */  #ifndef YYDEBUG
121    # define YYDEBUG 1
122    #endif
123    
124    
125    
126    #define YYFINAL         94
127    #define YYFLAG          -32768
128    #define YYNTBASE        41
129    
130    /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
131    #define YYTRANSLATE(x) ((unsigned)(x) <= 293 ? yytranslate[x] : 68)
132    
133    /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
134    static const char yytranslate[] =
135    {
136           0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
137           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
138           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
139           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
140           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
141           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
142           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
143           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
144           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
145           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
146           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
147           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
148           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
149           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
150           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
151           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
152           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
153           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
154           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
155           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
156           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
157           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
158           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
159           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
160           2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
161           2,     2,     2,     2,     2,     2,     1,     4,     5,     6,
162           7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
163          17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
164          27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
165          37,    38,    39,    40
166    };
167    
168    #if YYDEBUG
169    static const short yyprhs[] =
170    {
171           0,     0,     1,     7,     8,    11,    13,    15,    17,    21,
172          23,    25,    28,    32,    34,    38,    40,    44,    46,    49,
173          51,    53,    55,    57,    58,    62,    65,    66,    70,    71,
174          76,    80,    81,    86,    88,    90,    92,    93,    95,    97,
175         100,   102,   105,   107,   109,   112,   115,   119,   121,   124,
176         126,   129,   130,   136,   138,   142,   143,   146,   149,   153,
177         155,   157,   159,   161,   163,   165,   166,   169,   170
178    };
179    static const short yyrhs[] =
180    {
181          -1,    42,    43,    37,    57,    66,     0,     0,    43,    44,
182           0,    45,     0,    38,     0,    26,     0,    22,    65,    65,
183           0,    24,     0,    18,     0,    11,     6,     0,    20,    32,
184          65,     0,    27,     0,    21,    32,    65,     0,    28,     0,
185          19,    32,    65,     0,    23,     0,    29,    65,     0,    30,
186           0,    17,     0,    25,     0,    49,     0,     0,     8,    46,
187          56,     0,    12,    62,     0,     0,     7,    47,    56,     0,
188           0,     9,    31,    48,    53,     0,    10,    40,    67,     0,
189           0,    51,    52,    50,    54,     0,    13,     0,    14,     0,
190          15,     0,     0,    31,     0,    36,     0,    53,    36,     0,
191          62,     0,    54,    62,     0,    31,     0,    36,     0,    36,
192           6,     0,    36,    64,     0,    36,     6,    64,     0,    55,
193           0,    56,    55,     0,    58,     0,    57,    58,     0,     0,
194          36,    34,    59,    60,    33,     0,    61,     0,    60,    35,
195          61,     0,     0,    61,    62,     0,    61,    63,     0,    61,
196          16,    62,     0,    36,     0,    64,     0,     5,     0,    40,
197           0,     4,     0,     4,     0,     0,    37,    39,     0,     0,
198          33,     0
199    };
200    
201    #endif
202    
203    #if YYDEBUG
204    /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
205    static const short yyrline[] =
206    {
207           0,   131,   131,   139,   141,   144,   146,   150,   151,   152,
208         153,   154,   155,   156,   157,   158,   159,   160,   161,   162,
209         163,   164,   167,   169,   169,   174,   178,   178,   183,   183,
210         187,   195,   195,   202,   204,   205,   208,   210,   214,   216,
211         220,   226,   235,   240,   245,   251,   257,   267,   270,   274,
212         276,   279,   279,   284,   286,   289,   292,   294,   296,   300,
213         302,   303,   306,   312,   321,   329,   334,   340,   342
214    };
215    #endif
216    
217    
218    #if (YYDEBUG) || defined YYERROR_VERBOSE
219    
220    /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
221    static const char *const yytname[] =
222    {
223      "$", "error", "$undefined.", "\"end of string\"", "STRING", "CHARACTER",
224      "INT", "\"%token\"", "\"%nterm\"", "\"%type\"", "\"%union\"",
225      "\"%expect\"", "\"%start\"", "\"%left\"", "\"%right\"", "\"%nonassoc\"",
226      "\"%prec\"", "\"%verbose\"", "\"%error-verbose\"", "\"%output\"",
227      "\"%file-prefix\"", "\"%name-prefix\"", "\"%define\"",
228      "\"%pure-parser\"", "\"%defines\"", "\"%yacc\"", "\"%debug\"",
229      "\"%locations\"", "\"%no-lines\"", "\"%skeleton\"", "\"%token-table\"",
230      "TYPE", "\"=\"", "\";\"", "\":\"", "\"|\"", "\"identifier\"", "\"%%\"",
231      "PROLOGUE", "EPILOGUE", "BRACED_CODE", "input", "@1", "directives",
232      "directive", "grammar_directives", "@2", "@3", "@4",
233      "precedence_directives", "@5", "precedence_directive", "type.opt",
234      "nterms_to_type.1", "terms_to_prec.1", "symbol_def", "symbol_defs.1",
235      "gram", "rules", "@6", "rhses.1", "rhs", "symbol", "action",
236      "string_as_id", "string_content", "epilogue.opt", "semi_colon_opt", 0
237    };
238    #endif
239    
240    /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
241    static const short yyr1[] =
242    {
243           0,    42,    41,    43,    43,    44,    44,    44,    44,    44,
244          44,    44,    44,    44,    44,    44,    44,    44,    44,    44,
245          44,    44,    45,    46,    45,    45,    47,    45,    48,    45,
246          45,    50,    49,    51,    51,    51,    52,    52,    53,    53,
247          54,    54,    55,    55,    55,    55,    55,    56,    56,    57,
248          57,    59,    58,    60,    60,    61,    61,    61,    61,    62,
249          62,    62,    63,    64,    65,    66,    66,    67,    67
250    };
251    
252    /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
253    static const short yyr2[] =
254    {
255           0,     0,     5,     0,     2,     1,     1,     1,     3,     1,
256           1,     2,     3,     1,     3,     1,     3,     1,     2,     1,
257           1,     1,     1,     0,     3,     2,     0,     3,     0,     4,
258           3,     0,     4,     1,     1,     1,     0,     1,     1,     2,
259           1,     2,     1,     1,     2,     2,     3,     1,     2,     1,
260           2,     0,     5,     1,     3,     0,     2,     2,     3,     1,
261           1,     1,     1,     1,     1,     0,     2,     0,     1
262    };
263    
264    /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
265       doesn't specify something else to do.  Zero means the default is an
266       error. */
267    static const short yydefact[] =
268    {
269           1,     3,     0,    26,    23,     0,     0,     0,     0,    33,
270          34,    35,    20,    10,     0,     0,     0,     0,    17,     9,
271          21,     7,    13,    15,     0,    19,     0,     6,     4,     5,
272          22,    36,     0,     0,    28,    67,    11,    63,    61,    59,
273          25,    60,     0,     0,     0,    64,     0,    18,     0,    65,
274          49,    37,    31,    42,    43,    47,    27,    24,     0,    68,
275          30,    16,    12,    14,     8,    51,     0,    50,     2,     0,
276          44,    45,    48,    38,    29,    55,    66,    32,    40,    46,
277          39,     0,    53,    41,    52,    55,     0,    62,    56,    57,
278          54,    58,     0,     0,     0
279    };
280    
281    static const short yydefgoto[] =
282    {
283          92,     1,     2,    28,    29,    33,    32,    58,    30,    69,
284          31,    52,    74,    77,    55,    56,    49,    50,    75,    81,
285          82,    88,    89,    41,    46,    68,    60
286    };
287    
288    static const short yypact[] =
289    {
290      -32768,-32768,    72,-32768,-32768,   -22,   -29,     8,    -1,-32768,
291      -32768,-32768,-32768,-32768,   -16,   -14,   -11,    22,-32768,-32768,
292      -32768,-32768,-32768,-32768,    22,-32768,    -6,-32768,-32768,-32768,
293      -32768,     0,   -24,   -24,-32768,     1,-32768,-32768,-32768,-32768,
294      -32768,-32768,    22,    22,    22,-32768,    22,-32768,    -2,   -17,
295      -32768,-32768,-32768,-32768,     4,-32768,   -24,   -24,     2,-32768,
296      -32768,-32768,-32768,-32768,-32768,-32768,     3,-32768,-32768,    -1,
297          32,-32768,-32768,-32768,     5,-32768,-32768,    -1,-32768,-32768,
298      -32768,   -18,    -3,-32768,-32768,-32768,    -1,-32768,-32768,-32768,
299          -3,-32768,    39,    40,-32768
300    };
301    
302    static const short yypgoto[] =
303    {
304      -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
305      -32768,-32768,-32768,-32768,   -28,    10,-32768,    -5,-32768,-32768,
306         -40,    -8,-32768,   -48,   -19,-32768,-32768
307    };
308    
309    
310    #define YYLAST          110
311    
312    
313  /* Line 215 of /usr/local/share/bison/bison.simple.  */  static const short yytable[] =
314  #line 145 "parse-gram.c"  {
315          40,    37,    38,    37,    38,    47,    71,    53,    37,    34,
316          70,    35,    54,    86,    36,    84,    42,    85,    43,    48,
317          66,    44,    79,    61,    62,    63,    45,    64,    72,    72,
318          48,    51,    65,    39,    59,    39,    37,    87,    73,    93,
319          94,    80,    76,    57,    67,    90,     0,     0,     0,     0,
320           0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
321           0,    78,     0,     0,     0,     0,     0,     0,     0,    83,
322           0,     0,     0,     0,     0,     0,     0,     0,    91,     3,
323           4,     5,     6,     7,     8,     9,    10,    11,     0,    12,
324          13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
325          23,    24,    25,     0,     0,     0,     0,     0,     0,    26,
326          27
327    };
328    
329    static const short yycheck[] =
330    {
331           8,     4,     5,     4,     5,    24,    54,    31,     4,    31,
332           6,    40,    36,    16,     6,    33,    32,    35,    32,    36,
333          37,    32,    70,    42,    43,    44,     4,    46,    56,    57,
334          36,    31,    34,    36,    33,    36,     4,    40,    36,     0,
335           0,    36,    39,    33,    49,    85,    -1,    -1,    -1,    -1,
336          -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
337          -1,    69,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,
338          -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    86,     7,
339           8,     9,    10,    11,    12,    13,    14,    15,    -1,    17,
340          18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
341          28,    29,    30,    -1,    -1,    -1,    -1,    -1,    -1,    37,
342          38
343    };
344    #define YYPURE 1
345    
346    /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
347    #line 3 "/usr/share/bison/bison.simple"
348    
349    /* Skeleton output parser for bison,
350    
351       Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
352       Foundation, Inc.
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 2, 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., 59 Temple Place - Suite 330,
367       Boston, MA 02111-1307, USA.  */
368    
369    /* As a special exception, when this file is copied by Bison into a
370       Bison output file, you may use that output file without restriction.
371       This special exception was added by the Free Software Foundation
372       in version 1.24 of Bison.  */
373    
374    /* This is the parser code that is written into each bison parser when
375       the %semantic_parser declaration is not specified in the grammar.
376       It was written by Richard Stallman by simplifying the hairy parser
377       used when %semantic_parser is specified.  */
378    
379    /* All symbols defined below should begin with yy or YY, to avoid
380       infringing on user name space.  This should be done even for local
381       variables, as they might otherwise be expanded by user macros.
382       There are some unavoidable exceptions within include files to
383       define necessary library symbols; they are noted "INFRINGES ON
384       USER NAME SPACE" below.  */
385    
386  #if ! defined (yyoverflow) || YYERROR_VERBOSE  #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
387    
388  /* The parser invokes alloca or malloc; define the necessary symbols.  */  /* The parser invokes alloca or malloc; define the necessary symbols.  */
389    
# Line 172  typedef struct yyltype Line 412  typedef struct yyltype
412  #  define YYSTACK_ALLOC malloc  #  define YYSTACK_ALLOC malloc
413  #  define YYSTACK_FREE free  #  define YYSTACK_FREE free
414  # endif  # endif
415  #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */  #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
416    
417    
418  #if (! defined (yyoverflow) \  #if (! defined (yyoverflow) \
# Line 216  union yyalloc Line 456  union yyalloc
456          {                                       \          {                                       \
457            register YYSIZE_T yyi;                \            register YYSIZE_T yyi;                \
458            for (yyi = 0; yyi < (Count); yyi++)   \            for (yyi = 0; yyi < (Count); yyi++)   \
459              (To)[yyi] = (From)[yyi];    \              (To)[yyi] = (From)[yyi];            \
460          }                                       \          }                                       \
461        while (0)        while (0)
462  #  endif  #  endif
# Line 240  union yyalloc Line 480  union yyalloc
480    
481  #endif  #endif
482    
 /* Tokens.  */  
 #ifndef YYTOKENTYPE  
 # if defined (__STDC__) || defined (__cplusplus)  
    /* Put the tokens into the symbol table, so that GDB and other debuggers  
       know about them.  */  
    enum yytokentype {  
      GRAM_EOF = 0,  
      STRING = 258,  
      CHARACTER = 259,  
      INT = 260,  
      PERCENT_TOKEN = 261,  
      PERCENT_NTERM = 262,  
      PERCENT_TYPE = 263,  
      PERCENT_UNION = 264,  
      PERCENT_EXPECT = 265,  
      PERCENT_START = 266,  
      PERCENT_LEFT = 267,  
      PERCENT_RIGHT = 268,  
      PERCENT_NONASSOC = 269,  
      PERCENT_PREC = 270,  
      PERCENT_VERBOSE = 271,  
      PERCENT_ERROR_VERBOSE = 272,  
      PERCENT_OUTPUT = 273,  
      PERCENT_FILE_PREFIX = 274,  
      PERCENT_NAME_PREFIX = 275,  
      PERCENT_DEFINE = 276,  
      PERCENT_PURE_PARSER = 277,  
      PERCENT_DEFINES = 278,  
      PERCENT_YACC = 279,  
      PERCENT_DEBUG = 280,  
      PERCENT_LOCATIONS = 281,  
      PERCENT_NO_LINES = 282,  
      PERCENT_SKELETON = 283,  
      PERCENT_TOKEN_TABLE = 284,  
      TYPE = 285,  
      EQUAL = 286,  
      SEMICOLON = 287,  
      COLON = 288,  
      PIPE = 289,  
      ID = 290,  
      PERCENT_PERCENT = 291,  
      PROLOGUE = 292,  
      EPILOGUE = 293,  
      BRACED_CODE = 294  
    };  
 # endif  
   /* POSIX requires `int' for tokens in interfaces.  */  
 # define YYTOKENTYPE int  
 #endif /* !YYTOKENTYPE */  
 #define GRAM_EOF 0  
 #define STRING 258  
 #define CHARACTER 259  
 #define INT 260  
 #define PERCENT_TOKEN 261  
 #define PERCENT_NTERM 262  
 #define PERCENT_TYPE 263  
 #define PERCENT_UNION 264  
 #define PERCENT_EXPECT 265  
 #define PERCENT_START 266  
 #define PERCENT_LEFT 267  
 #define PERCENT_RIGHT 268  
 #define PERCENT_NONASSOC 269  
 #define PERCENT_PREC 270  
 #define PERCENT_VERBOSE 271  
 #define PERCENT_ERROR_VERBOSE 272  
 #define PERCENT_OUTPUT 273  
 #define PERCENT_FILE_PREFIX 274  
 #define PERCENT_NAME_PREFIX 275  
 #define PERCENT_DEFINE 276  
 #define PERCENT_PURE_PARSER 277  
 #define PERCENT_DEFINES 278  
 #define PERCENT_YACC 279  
 #define PERCENT_DEBUG 280  
 #define PERCENT_LOCATIONS 281  
 #define PERCENT_NO_LINES 282  
 #define PERCENT_SKELETON 283  
 #define PERCENT_TOKEN_TABLE 284  
 #define TYPE 285  
 #define EQUAL 286  
 #define SEMICOLON 287  
 #define COLON 288  
 #define PIPE 289  
 #define ID 290  
 #define PERCENT_PERCENT 291  
 #define PROLOGUE 292  
 #define EPILOGUE 293  
 #define BRACED_CODE 294  
   
   
   
   
 /* YYFINAL -- State number of the termination state. */  
 #define YYFINAL  3  
 #define YYFLAG   -32768  
 #define YYLAST   110  
   
 /* YYNTOKENS -- Number of terminals. */  
 #define YYNTOKENS  40  
 /* YYNNTS -- Number of nonterminals. */  
 #define YYNNTS  28  
 /* YYNRULES -- Number of rules. */  
 #define YYNRULES  69  
 /* YYNRULES -- Number of states. */  
 #define YYNSTATES  94  
   
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */  
 #define YYUNDEFTOK  2  
 #define YYMAXUTOK   294  
   
 #define YYTRANSLATE(X) \  
   ((unsigned)(X) <= YYMAXUTOK ? yytranslate[X] : YYUNDEFTOK)  
   
 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */  
 static const unsigned char yytranslate[] =  
 {  
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,  
        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,  
        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,  
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,  
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,  
       35,    36,    37,    38,    39  
 };  
   
 #if YYDEBUG  
 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in  
    YYRHS.  */  
 static const unsigned char yyprhs[] =  
 {  
        0,     0,     3,     4,    10,    11,    14,    16,    18,    20,  
       24,    26,    28,    31,    35,    37,    41,    43,    47,    49,  
       52,    54,    56,    58,    60,    61,    65,    68,    69,    73,  
       74,    79,    83,    84,    89,    91,    93,    95,    96,    98,  
      100,   103,   105,   108,   110,   112,   115,   118,   122,   124,  
      127,   129,   132,   133,   139,   141,   145,   146,   149,   152,  
      156,   158,   160,   162,   164,   166,   168,   169,   172,   173  
 };  
   
 /* YYRHS -- A `-1'-separated list of the rules' RHS. */  
 static const signed char yyrhs[] =  
 {  
       41,     0,    -1,    -1,    42,    43,    36,    57,    66,    -1,  
       -1,    43,    44,    -1,    45,    -1,    37,    -1,    25,    -1,  
       21,    65,    65,    -1,    23,    -1,    17,    -1,    10,     5,  
       -1,    19,    31,    65,    -1,    26,    -1,    20,    31,    65,  
       -1,    27,    -1,    18,    31,    65,    -1,    22,    -1,    28,  
       65,    -1,    29,    -1,    16,    -1,    24,    -1,    49,    -1,  
       -1,     7,    46,    56,    -1,    11,    62,    -1,    -1,     6,  
       47,    56,    -1,    -1,     8,    30,    48,    53,    -1,     9,  
       39,    67,    -1,    -1,    51,    52,    50,    54,    -1,    12,  
       -1,    13,    -1,    14,    -1,    -1,    30,    -1,    35,    -1,  
       53,    35,    -1,    62,    -1,    54,    62,    -1,    30,    -1,  
       35,    -1,    35,     5,    -1,    35,    64,    -1,    35,     5,  
       64,    -1,    55,    -1,    56,    55,    -1,    58,    -1,    57,  
       58,    -1,    -1,    35,    33,    59,    60,    32,    -1,    61,  
       -1,    60,    34,    61,    -1,    -1,    61,    62,    -1,    61,  
       63,    -1,    61,    15,    62,    -1,    35,    -1,    64,    -1,  
        4,    -1,    39,    -1,     3,    -1,     3,    -1,    -1,    36,  
       38,    -1,    -1,    32,    -1  
 };  
   
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */  
 static const unsigned short yyrline[] =  
 {  
        0,   128,   128,   128,   136,   138,   141,   143,   144,   145,  
      146,   147,   148,   149,   150,   151,   152,   153,   154,   155,  
      156,   157,   158,   161,   163,   163,   168,   172,   172,   177,  
      177,   181,   189,   189,   196,   198,   199,   202,   204,   208,  
      210,   214,   220,   229,   234,   239,   245,   251,   261,   264,  
      268,   270,   273,   273,   278,   280,   283,   286,   288,   290,  
      294,   296,   297,   300,   306,   315,   323,   328,   334,   336  
 };  
 #endif  
   
 #if YYDEBUG || YYERROR_VERBOSE  
 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.  
    First, the terminals, then, starting at YYNTOKENS, nonterminals. */  
 static const char *const yytname[] =  
 {  
   "\"end of string\"", "error", "$undefined.", "STRING", "CHARACTER", "INT",  
   "\"%token\"", "\"%nterm\"", "\"%type\"", "\"%union\"", "\"%expect\"",  
   "\"%start\"", "\"%left\"", "\"%right\"", "\"%nonassoc\"", "\"%prec\"",  
   "\"%verbose\"", "\"%error-verbose\"", "\"%output\"", "\"%file-prefix\"",  
   "\"%name-prefix\"", "\"%define\"", "\"%pure-parser\"", "\"%defines\"",  
   "\"%yacc\"", "\"%debug\"", "\"%locations\"", "\"%no-lines\"",  
   "\"%skeleton\"", "\"%token-table\"", "TYPE", "\"=\"", "\";\"", "\":\"",  
   "\"|\"", "\"identifier\"", "\"%%\"", "PROLOGUE", "EPILOGUE",  
   "BRACED_CODE", "$axiom", "input", "@1", "directives", "directive",  
   "grammar_directives", "@2", "@3", "@4", "precedence_directives", "@5",  
   "precedence_directive", "type.opt", "nterms_to_type.1",  
   "terms_to_prec.1", "symbol_def", "symbol_defs.1", "gram", "rules", "@6",  
   "rhses.1", "rhs", "symbol", "action", "string_as_id", "string_content",  
   "epilogue.opt", "semi_colon_opt", 0  
 };  
 #endif  
   
 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to  
    token YYLEX-NUM.  */  
 static const short yytoknum[] =  
 {  
        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,  
      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,  
      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,  
      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,  
       -1  
 };  
   
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */  
 static const unsigned char yyr1[] =  
 {  
        0,    40,    42,    41,    43,    43,    44,    44,    44,    44,  
       44,    44,    44,    44,    44,    44,    44,    44,    44,    44,  
       44,    44,    44,    45,    46,    45,    45,    47,    45,    48,  
       45,    45,    50,    49,    51,    51,    51,    52,    52,    53,  
       53,    54,    54,    55,    55,    55,    55,    55,    56,    56,  
       57,    57,    59,    58,    60,    60,    61,    61,    61,    61,  
       62,    62,    62,    63,    64,    65,    66,    66,    67,    67  
 };  
   
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */  
 static const unsigned char yyr2[] =  
 {  
        0,     2,     0,     5,     0,     2,     1,     1,     1,     3,  
        1,     1,     2,     3,     1,     3,     1,     3,     1,     2,  
        1,     1,     1,     1,     0,     3,     2,     0,     3,     0,  
        4,     3,     0,     4,     1,     1,     1,     0,     1,     1,  
        2,     1,     2,     1,     1,     2,     2,     3,     1,     2,  
        1,     2,     0,     5,     1,     3,     0,     2,     2,     3,  
        1,     1,     1,     1,     1,     1,     0,     2,     0,     1  
 };  
   
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state  
    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero  
    means the default is an error.  */  
 static const short yydefact[] =  
 {  
        2,     0,     4,     0,     0,    27,    24,     0,     0,     0,  
        0,    34,    35,    36,    21,    11,     0,     0,     0,     0,  
       18,    10,    22,     8,    14,    16,     0,    20,     0,     7,  
        5,     6,    23,    37,     0,     0,    29,    68,    12,    64,  
       62,    60,    26,    61,     0,     0,     0,    65,     0,    19,  
        0,    66,    50,    38,    32,    43,    44,    48,    28,    25,  
        0,    69,    31,    17,    13,    15,     9,    52,     0,    51,  
        3,     0,    45,    46,    49,    39,    30,    56,    67,    33,  
       41,    47,    40,     0,    54,    42,    53,    56,     0,    63,  
       57,    58,    55,    59  
 };  
   
 /* YYPGOTO[NTERM-NUM]. */  
 static const short yydefgoto[] =  
 {  
       -1,     1,     2,     4,    30,    31,    35,    34,    60,    32,  
       71,    33,    54,    76,    79,    57,    58,    51,    52,    77,  
       83,    84,    90,    91,    43,    48,    70,    62  
 };  
   
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing  
    STATE-NUM.  */  
 static const short yypact[] =  
 {  
   -32768,     9,-32768,-32768,    73,-32768,-32768,   -19,   -24,    12,  
        0,-32768,-32768,-32768,-32768,-32768,    -5,    -3,    -1,    26,  
   -32768,-32768,-32768,-32768,-32768,-32768,    26,-32768,    -4,-32768,  
   -32768,-32768,-32768,     2,   -23,   -23,-32768,     4,-32768,-32768,  
   -32768,-32768,-32768,-32768,    26,    26,    26,-32768,    26,-32768,  
        1,   -17,-32768,-32768,-32768,-32768,     5,-32768,   -23,   -23,  
        3,-32768,-32768,-32768,-32768,-32768,-32768,-32768,     6,-32768,  
   -32768,     0,    36,-32768,-32768,-32768,     7,-32768,-32768,     0,  
   -32768,-32768,-32768,   -18,    -2,-32768,-32768,-32768,     0,-32768,  
   -32768,-32768,    -2,-32768  
 };  
   
 /* YYPGOTO[NTERM-NUM].  */  
 static const short yypgoto[] =  
 {  
   -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,  
   -32768,-32768,-32768,-32768,-32768,   -38,     8,-32768,   -11,-32768,  
   -32768,   -46,   -10,-32768,   -50,   -21,-32768,-32768  
 };  
   
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If  
    positive, shift that token.  If negative, reduce the rule which  
    number is the opposite.  If zero, do what YYDEFACT says.  */  
 static const short yytable[] =  
 {  
       42,    39,    40,    39,    40,    49,    73,    55,    39,     3,  
       72,    36,    56,    88,    86,    37,    87,    38,    50,    68,  
       74,    74,    81,    63,    64,    65,    44,    66,    45,    47,  
       46,    50,    53,    41,    67,    41,    61,    89,    75,    39,  
       69,    92,    82,    59,    78,     0,     0,     0,     0,     0,  
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,  
        0,    80,     0,     0,     0,     0,     0,     0,     0,    85,  
        0,     0,     0,     0,     0,     0,     0,     0,    93,     5,  
        6,     7,     8,     9,    10,    11,    12,    13,     0,    14,  
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,  
       25,    26,    27,     0,     0,     0,     0,     0,     0,    28,  
       29  
 };  
   
 static const short yycheck[] =  
 {  
       10,     3,     4,     3,     4,    26,    56,    30,     3,     0,  
        5,    30,    35,    15,    32,    39,    34,     5,    35,    36,  
       58,    59,    72,    44,    45,    46,    31,    48,    31,     3,  
       31,    35,    30,    35,    33,    35,    32,    39,    35,     3,  
       51,    87,    35,    35,    38,    -1,    -1,    -1,    -1,    -1,  
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,  
       -1,    71,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    79,  
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    88,     6,  
        7,     8,     9,    10,    11,    12,    13,    14,    -1,    16,  
       17,    18,    19,    20,    21,    22,    23,    24,    25,    26,  
       27,    28,    29,    -1,    -1,    -1,    -1,    -1,    -1,    36,  
       37  
 };  
   
 #if YYDEBUG  
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing  
    symbol of state STATE-NUM.  */  
 static const unsigned char yystos[] =  
 {  
        0,    41,    42,     0,    43,     6,     7,     8,     9,    10,  
       11,    12,    13,    14,    16,    17,    18,    19,    20,    21,  
       22,    23,    24,    25,    26,    27,    28,    29,    36,    37,  
       44,    45,    49,    51,    47,    46,    30,    39,     5,     3,  
        4,    35,    62,    64,    31,    31,    31,     3,    65,    65,  
       35,    57,    58,    30,    52,    30,    35,    55,    56,    56,  
       48,    32,    67,    65,    65,    65,    65,    33,    36,    58,  
       66,    50,     5,    64,    55,    35,    53,    59,    38,    54,  
       62,    64,    35,    60,    61,    62,    32,    34,    15,    39,  
       62,    63,    61,    62  
 };  
 #endif  
483    
484  #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)  #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
485  # define YYSIZE_T __SIZE_TYPE__  # define YYSIZE_T __SIZE_TYPE__
# Line 616  static const unsigned char yystos[] = Line 501  static const unsigned char yystos[] =
501  #define yyclearin       (yychar = YYEMPTY)  #define yyclearin       (yychar = YYEMPTY)
502  #define YYEMPTY         -2  #define YYEMPTY         -2
503  #define YYEOF           0  #define YYEOF           0
   
504  #define YYACCEPT        goto yyacceptlab  #define YYACCEPT        goto yyacceptlab
505  #define YYABORT         goto yyabortlab  #define YYABORT         goto yyabortlab
506  #define YYERROR         goto yyerrlab1  #define YYERROR         goto yyerrlab1
   
507  /* Like YYERROR except do call yyerror.  This remains here temporarily  /* Like YYERROR except do call yyerror.  This remains here temporarily
508     to ease the transition to the new meaning of YYERROR, for GCC.     to ease the transition to the new meaning of YYERROR, for GCC.
509     Once GCC version 2 has supplanted version 1, this can go.  */     Once GCC version 2 has supplanted version 1, this can go.  */
   
510  #define YYFAIL          goto yyerrlab  #define YYFAIL          goto yyerrlab
   
511  #define YYRECOVERING()  (!!yyerrstatus)  #define YYRECOVERING()  (!!yyerrstatus)
   
512  #define YYBACKUP(Token, Value)                                  \  #define YYBACKUP(Token, Value)                                  \
513  do                                                              \  do                                                              \
514    if (yychar == YYEMPTY && yylen == 1)                          \    if (yychar == YYEMPTY && yylen == 1)                          \
# Line 649  while (0) Line 529  while (0)
529  #define YYTERROR        1  #define YYTERROR        1
530  #define YYERRCODE       256  #define YYERRCODE       256
531    
532    
533  /* YYLLOC_DEFAULT -- Compute the default location (before the actions  /* YYLLOC_DEFAULT -- Compute the default location (before the actions
534     are run).  */     are run).
535    
536       When YYLLOC_DEFAULT is run, CURRENT is set the location of the
537       first token.  By default, to implement support for ranges, extend
538       its range to the last symbol.  */
539    
540  #ifndef YYLLOC_DEFAULT  #ifndef YYLLOC_DEFAULT
541  # define YYLLOC_DEFAULT(Current, Rhs, N)           \  # define YYLLOC_DEFAULT(Current, Rhs, N)        \
542    Current.first_line   = Rhs[1].first_line;      \     Current.last_line   = Rhs[N].last_line;      \
543    Current.first_column = Rhs[1].first_column;    \     Current.last_column = Rhs[N].last_column;
   Current.last_line    = Rhs[N].last_line;       \  
   Current.last_column  = Rhs[N].last_column;  
544  #endif  #endif
545    
546    
547  /* YYLEX -- calling `yylex' with the right arguments.  */  /* YYLEX -- calling `yylex' with the right arguments.  */
548    
549  #if YYPURE  #if YYPURE
# Line 680  while (0) Line 564  while (0)
564  # define YYLEX                  yylex ()  # define YYLEX                  yylex ()
565  #endif /* !YYPURE */  #endif /* !YYPURE */
566    
567    
568  /* Enable debugging if requested.  */  /* Enable debugging if requested.  */
569  #if YYDEBUG  #if YYDEBUG
570    
# Line 719  int yydebug; Line 604  int yydebug;
604  #ifndef YYMAXDEPTH  #ifndef YYMAXDEPTH
605  # define YYMAXDEPTH 10000  # define YYMAXDEPTH 10000
606  #endif  #endif
   
607    
608    #ifdef YYERROR_VERBOSE
 #if YYERROR_VERBOSE  
609    
610  # ifndef yystrlen  # ifndef yystrlen
611  #  if defined (__GLIBC__) && defined (_STRING_H)  #  if defined (__GLIBC__) && defined (_STRING_H)
# Line 772  yystpcpy (yydest, yysrc) Line 655  yystpcpy (yydest, yysrc)
655  }  }
656  #  endif  #  endif
657  # endif  # endif
658    #endif
 #endif /* !YYERROR_VERBOSE */  
   
659    
660    #line 315 "/usr/share/bison/bison.simple"
661    
662    
663  /* The user can define YYPARSE_PARAM as the name of an argument to be passed  /* The user can define YYPARSE_PARAM as the name of an argument to be passed
664     into yyparse.  The argument should have type void *.     into yyparse.  The argument should have type void *.
# Line 812  int yyparse (void); Line 695  int yyparse (void);
695  /* The lookahead symbol.  */                            \  /* The lookahead symbol.  */                            \
696  int yychar;                                             \  int yychar;                                             \
697                                                          \                                                          \
698  /* The semantic value of the lookahead symbol.  */      \  /* The semantic value of the lookahead symbol. */       \
699  YYSTYPE yylval;                                         \  YYSTYPE yylval;                                         \
700                                                          \                                                          \
701  /* Number of parse errors so far.  */                   \  /* Number of parse errors so far.  */                   \
# Line 829  YYLTYPE yylloc; Line 712  YYLTYPE yylloc;
712  YY_DECL_NON_LSP_VARIABLES  YY_DECL_NON_LSP_VARIABLES
713  #endif  #endif
714    
715  /* If nonreentrant, generate the variables here.  */  
716    /* If nonreentrant, generate the variables here. */
717    
718  #if !YYPURE  #if !YYPURE
719  YY_DECL_VARIABLES  YY_DECL_VARIABLES
# Line 839  int Line 723  int
723  yyparse (YYPARSE_PARAM_ARG)  yyparse (YYPARSE_PARAM_ARG)
724       YYPARSE_PARAM_DECL       YYPARSE_PARAM_DECL
725  {  {
726    /* If reentrant, generate the variables here.  */    /* If reentrant, generate the variables here. */
727  #if YYPURE  #if YYPURE
728    YY_DECL_VARIABLES    YY_DECL_VARIABLES
729  #endif  /* !YYPURE */  #endif  /* !YYPURE */
# Line 860  yyparse (YYPARSE_PARAM_ARG) Line 744  yyparse (YYPARSE_PARAM_ARG)
744       Refer to the stacks thru separate pointers, to allow yyoverflow       Refer to the stacks thru separate pointers, to allow yyoverflow
745       to reallocate them elsewhere.  */       to reallocate them elsewhere.  */
746    
747    /* The state stack.  */    /* The state stack. */
748    short yyssa[YYINITDEPTH];    short yyssa[YYINITDEPTH];
749    short *yyss = yyssa;    short *yyss = yyssa;
750    register short *yyssp;    register short *yyssp;
# Line 885  yyparse (YYPARSE_PARAM_ARG) Line 769  yyparse (YYPARSE_PARAM_ARG)
769    
770    YYSIZE_T yystacksize = YYINITDEPTH;    YYSIZE_T yystacksize = YYINITDEPTH;
771    
772    
773    /* The variables used to return semantic value and location from the    /* The variables used to return semantic value and location from the
774       action routines.  */       action routines.  */
775    YYSTYPE yyval;    YYSTYPE yyval;
# Line 893  yyparse (YYPARSE_PARAM_ARG) Line 778  yyparse (YYPARSE_PARAM_ARG)
778  #endif  #endif
779    
780    /* When reducing, the number of symbols on the RHS of the reduced    /* When reducing, the number of symbols on the RHS of the reduced
781       rule.  */       rule. */
782    int yylen;    int yylen;
783    
784    YYDPRINTF ((stderr, "Starting parse\n"));    YYDPRINTF ((stderr, "Starting parse\n"));
# Line 980  yyparse (YYPARSE_PARAM_ARG) Line 865  yyparse (YYPARSE_PARAM_ARG)
865            goto yyoverflowlab;            goto yyoverflowlab;
866          YYSTACK_RELOCATE (yyss);          YYSTACK_RELOCATE (yyss);
867          YYSTACK_RELOCATE (yyvs);          YYSTACK_RELOCATE (yyvs);
868  #  if YYLSP_NEEDED  # if YYLSP_NEEDED
869          YYSTACK_RELOCATE (yyls);          YYSTACK_RELOCATE (yyls);
870  #  endif  # endif
871  #  undef YYSTACK_RELOCATE  # undef YYSTACK_RELOCATE
872          if (yyss1 != yyssa)          if (yyss1 != yyssa)
873            YYSTACK_FREE (yyss1);            YYSTACK_FREE (yyss1);
874        }        }
# Line 1007  yyparse (YYPARSE_PARAM_ARG) Line 892  yyparse (YYPARSE_PARAM_ARG)
892    
893    goto yybackup;    goto yybackup;
894    
895    
896  /*-----------.  /*-----------.
897  | yybackup.  |  | yybackup.  |
898  `-----------*/  `-----------*/
# Line 1033  yybackup: Line 919  yybackup:
919        yychar = YYLEX;        yychar = YYLEX;
920      }      }
921    
922    /* Convert token to internal form (in yychar1) for indexing tables with.  */    /* Convert token to internal form (in yychar1) for indexing tables with */
923    
924    if (yychar <= 0)              /* This means end of input.  */    if (yychar <= 0)              /* This means end of input. */
925      {      {
926        yychar1 = 0;        yychar1 = 0;
927        yychar = YYEOF;           /* Don't call YYLEX any more.  */        yychar = YYEOF;           /* Don't call YYLEX any more */
928    
929        YYDPRINTF ((stderr, "Now at end of input.\n"));        YYDPRINTF ((stderr, "Now at end of input.\n"));
930      }      }
# Line 1139  yyreduce: Line 1025  yyreduce:
1025    yyval = yyvsp[1-yylen];    yyval = yyvsp[1-yylen];
1026    
1027  #if YYLSP_NEEDED  #if YYLSP_NEEDED
1028    /* Default location. */    /* Similarly for the default location.  Let the user run additional
1029         commands if for instance locations are ranges.  */
1030      yyloc = yylsp[1-yylen];
1031    YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);    YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1032  #endif  #endif
1033    
# Line 1151  yyreduce: Line 1039  yyreduce:
1039        int yyi;        int yyi;
1040    
1041        YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",        YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
1042                   yyn - 1, yyrline[yyn]);                   yyn, yyrline[yyn]);
1043    
1044        /* Print the symbols being reduced, and their result.  */        /* Print the symbols being reduced, and their result.  */
1045        for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)        for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
1046          YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);          YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1047        YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);        YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1048      }      }
1049  #endif  #endif
   switch (yyn)  
     {  
         case 2:  
 #line 128 "parse-gram.y"  
 {  LOCATION_RESET (yylloc); ; }  
     break;  
1050    
1051    case 3:    switch (yyn) {
 #line 130 "parse-gram.y"  
 {  
       yycontrol->errcode = 0;  
       epilogue_set (yyvsp[0].string, yylsp[0].first_line);  
     ; }  
     break;  
   
   case 7:  
 #line 143 "parse-gram.y"  
 {  prologue_augment (yyvsp[0].string, yylsp[0].first_line); ; }  
     break;  
   
   case 8:  
 #line 144 "parse-gram.y"  
 {  debug_flag = 1; ; }  
     break;  
1052    
1053    case 9:  case 1:
1054  #line 145 "parse-gram.y"  #line 131 "parse-gram.y"
1055  {  muscle_insert (yyvsp[-1].string, yyvsp[0].string); ; }  { LOCATION_RESET (yylloc); }
1056      break;      break;
1057    case 2:
1058    case 10:  #line 133 "parse-gram.y"
1059  #line 146 "parse-gram.y"  {
1060  {  defines_flag = 1; ; }        yycontrol->errcode = 0;
1061          epilogue_set (yyvsp[0].string, yylsp[0].first_line);
1062        }
1063      break;      break;
1064    case 6:
   case 11:  
1065  #line 147 "parse-gram.y"  #line 147 "parse-gram.y"
1066  {  error_verbose = 1; ; }  {
1067      break;       prologue_augment (yyvsp[0].string, yylsp[0].first_line);
1068       }
   case 12:  
 #line 148 "parse-gram.y"  
 {  expected_conflicts = yyvsp[0].integer; ; }  
     break;  
   
   case 13:  
 #line 149 "parse-gram.y"  
 {  spec_file_prefix = yyvsp[0].string; ; }  
1069      break;      break;
1070    case 7:
   case 14:  
1071  #line 150 "parse-gram.y"  #line 150 "parse-gram.y"
1072  {  locations_flag = 1; ; }  { debug_flag = 1; }
1073      break;      break;
1074    case 8:
   case 15:  
1075  #line 151 "parse-gram.y"  #line 151 "parse-gram.y"
1076  {  spec_name_prefix = yyvsp[0].string; ; }  { muscle_insert (yyvsp[-1].string, yyvsp[0].string); }
1077      break;      break;
1078    case 9:
   case 16:  
1079  #line 152 "parse-gram.y"  #line 152 "parse-gram.y"
1080  {  no_lines_flag = 1; ; }  { defines_flag = 1; }
1081      break;      break;
1082    case 10:
   case 17:  
1083  #line 153 "parse-gram.y"  #line 153 "parse-gram.y"
1084  {  spec_outfile = yyvsp[0].string; ; }  { error_verbose = 1; }
1085      break;      break;
1086    case 11:
   case 18:  
1087  #line 154 "parse-gram.y"  #line 154 "parse-gram.y"
1088  {  pure_parser = 1; ; }  { expected_conflicts = yyvsp[0].integer; }
1089      break;      break;
1090    case 12:
   case 19:  
1091  #line 155 "parse-gram.y"  #line 155 "parse-gram.y"
1092  {  skeleton = yyvsp[0].string; ; }  { spec_file_prefix = yyvsp[0].string; }
1093      break;      break;
1094    case 13:
   case 20:  
1095  #line 156 "parse-gram.y"  #line 156 "parse-gram.y"
1096  {  token_table_flag = 1; ; }  { locations_flag = 1; }
1097      break;      break;
1098    case 14:
   case 21:  
1099  #line 157 "parse-gram.y"  #line 157 "parse-gram.y"
1100  {  report_flag = 1; ; }  { spec_name_prefix = yyvsp[0].string; }
1101      break;      break;
1102    case 15:
   case 22:  
1103  #line 158 "parse-gram.y"  #line 158 "parse-gram.y"
1104  {  yacc_flag = 1; ; }  { no_lines_flag = 1; }
1105      break;      break;
1106    case 16:
1107    case 24:  #line 159 "parse-gram.y"
1108    { spec_outfile = yyvsp[0].string; }
1109        break;
1110    case 17:
1111    #line 160 "parse-gram.y"
1112    { pure_parser = 1; }
1113        break;
1114    case 18:
1115    #line 161 "parse-gram.y"
1116    { skeleton = yyvsp[0].string; }
1117        break;
1118    case 19:
1119    #line 162 "parse-gram.y"
1120    { token_table_flag = 1; }
1121        break;
1122    case 20:
1123  #line 163 "parse-gram.y"  #line 163 "parse-gram.y"
1124  {  current_class = nterm_sym; ; }  { report_flag = 1; }
1125      break;      break;
1126    case 21:
   case 25:  
1127  #line 164 "parse-gram.y"  #line 164 "parse-gram.y"
1128  {  { yacc_flag = 1; }
1129        break;
1130    case 23:
1131    #line 169 "parse-gram.y"
1132    { current_class = nterm_sym; }
1133        break;
1134    case 24:
1135    #line 170 "parse-gram.y"
1136    {
1137        current_class = unknown_sym;        current_class = unknown_sym;
1138        current_type = NULL;        current_type = NULL;
1139      ; }      }
1140      break;      break;
1141    case 25:
1142    case 26:  #line 175 "parse-gram.y"
1143  #line 169 "parse-gram.y"  {
 {  
1144        grammar_start_symbol_set (yyvsp[0].symbol);        grammar_start_symbol_set (yyvsp[0].symbol);
1145      ; }      }
1146      break;      break;
1147    case 26:
1148    case 27:  #line 178 "parse-gram.y"
1149  #line 172 "parse-gram.y"  { current_class = token_sym; }
 {  current_class = token_sym; ; }  
1150      break;      break;
1151    case 27:
1152    case 28:  #line 179 "parse-gram.y"
1153  #line 173 "parse-gram.y"  {
 {  
1154        current_class = unknown_sym;        current_class = unknown_sym;
1155        current_type = NULL;        current_type = NULL;
1156      ; }      }
1157      break;      break;
1158    case 28:
1159    case 29:  #line 183 "parse-gram.y"
1160  #line 177 "parse-gram.y"  {current_type = yyvsp[0].string; }
 { current_type = yyvsp[0].string; ; }  
1161      break;      break;
1162    case 29:
1163    case 30:  #line 184 "parse-gram.y"
1164  #line 178 "parse-gram.y"  {
 {  
1165        current_type = NULL;        current_type = NULL;
1166      ; }      }
1167      break;      break;
1168    case 30:
1169    case 31:  #line 188 "parse-gram.y"
1170  #line 182 "parse-gram.y"  {
 {  
1171        typed = 1;        typed = 1;
1172        MUSCLE_INSERT_INT ("stype_line", yylsp[-1].first_line);        MUSCLE_INSERT_INT ("stype_line", yylsp[-1].first_line);
1173        muscle_insert ("stype", yyvsp[-1].string);        muscle_insert ("stype", yyvsp[-1].string);
1174      ; }      }
     break;  
   
   case 32:  
 #line 191 "parse-gram.y"  
 {  current_assoc = yyvsp[-1].assoc; ++current_prec; ; }  
     break;  
   
   case 33:  
 #line 193 "parse-gram.y"  
 {  current_assoc = non_assoc; current_type = NULL; ; }  
1175      break;      break;
1176    case 31:
   case 34:  
1177  #line 197 "parse-gram.y"  #line 197 "parse-gram.y"
1178  {  yyval.assoc = left_assoc; ; }  { current_assoc = yyvsp[-1].assoc; ++current_prec; }
     break;  
   
   case 35:  
 #line 198 "parse-gram.y"  
 {  yyval.assoc = right_assoc; ; }  
1179      break;      break;
1180    case 32:
   case 36:  
1181  #line 199 "parse-gram.y"  #line 199 "parse-gram.y"
1182  {  yyval.assoc = non_assoc; ; }  { current_assoc = non_assoc; current_type = NULL; }
1183      break;      break;
1184    case 33:
   case 37:  
1185  #line 203 "parse-gram.y"  #line 203 "parse-gram.y"
1186  {  current_type = NULL;; }  { yyval.assoc = left_assoc; }
1187      break;      break;
1188    case 34:
   case 38:  
1189  #line 204 "parse-gram.y"  #line 204 "parse-gram.y"
1190  {  current_type = yyvsp[0].string; ; }  { yyval.assoc = right_assoc; }
1191      break;      break;
1192    case 35:
1193    case 39:  #line 205 "parse-gram.y"
1194    { yyval.assoc = non_assoc; }
1195        break;
1196    case 36:
1197  #line 209 "parse-gram.y"  #line 209 "parse-gram.y"
1198  {  symbol_type_set (yyvsp[0].symbol, current_type); ; }  { current_type = NULL;}
1199      break;      break;
1200    case 37:
   case 40:  
1201  #line 210 "parse-gram.y"  #line 210 "parse-gram.y"
1202  {  symbol_type_set (yyvsp[0].symbol, current_type); ; }  { current_type = yyvsp[0].string; }
1203      break;      break;
1204    case 38:
1205    case 41:  #line 215 "parse-gram.y"
1206    { symbol_type_set (yyvsp[0].symbol, current_type); }
1207        break;
1208    case 39:
1209  #line 216 "parse-gram.y"  #line 216 "parse-gram.y"
1210  {  { symbol_type_set (yyvsp[0].symbol, current_type); }
1211        break;
1212    case 40:
1213    #line 222 "parse-gram.y"
1214    {
1215        symbol_type_set (yyvsp[0].symbol, current_type);        symbol_type_set (yyvsp[0].symbol, current_type);
1216        symbol_precedence_set (yyvsp[0].symbol, current_prec, current_assoc);        symbol_precedence_set (yyvsp[0].symbol, current_prec, current_assoc);
1217      ; }      }
1218      break;      break;
1219    case 41:
1220    case 42:  #line 227 "parse-gram.y"
1221  #line 221 "parse-gram.y"  {
 {  
1222        symbol_type_set (yyvsp[0].symbol, current_type);        symbol_type_set (yyvsp[0].symbol, current_type);
1223        symbol_precedence_set (yyvsp[0].symbol, current_prec, current_assoc);        symbol_precedence_set (yyvsp[0].symbol, current_prec, current_assoc);
1224      ; }      }
1225      break;      break;
1226    case 42:
1227    case 43:  #line 237 "parse-gram.y"
1228  #line 231 "parse-gram.y"  {
 {  
1229         current_type = yyvsp[0].string;         current_type = yyvsp[0].string;
1230       ; }       }
1231      break;      break;
1232    case 43:
1233    case 44:  #line 241 "parse-gram.y"
1234  #line 235 "parse-gram.y"  {
 {  
1235         symbol_class_set (yyvsp[0].symbol, current_class);         symbol_class_set (yyvsp[0].symbol, current_class);
1236         symbol_type_set (yyvsp[0].symbol, current_type);         symbol_type_set (yyvsp[0].symbol, current_type);
1237       ; }       }
1238      break;      break;
1239    case 44:
1240    case 45:  #line 246 "parse-gram.y"
1241  #line 240 "parse-gram.y"  {
 {  
1242        symbol_class_set (yyvsp[-1].symbol, current_class);        symbol_class_set (yyvsp[-1].symbol, current_class);
1243        symbol_type_set (yyvsp[-1].symbol, current_type);        symbol_type_set (yyvsp[-1].symbol, current_type);
1244        symbol_user_token_number_set (yyvsp[-1].symbol, yyvsp[0].integer);        symbol_user_token_number_set (yyvsp[-1].symbol, yyvsp[0].integer);
1245      ; }      }
1246      break;      break;
1247    case 45:
1248    case 46:  #line 252 "parse-gram.y"
1249  #line 246 "parse-gram.y"  {
 {  
1250        symbol_class_set (yyvsp[-1].symbol, current_class);        symbol_class_set (yyvsp[-1].symbol, current_class);
1251        symbol_type_set (yyvsp[-1].symbol, current_type);        symbol_type_set (yyvsp[-1].symbol, current_type);
1252        symbol_make_alias (yyvsp[-1].symbol, yyvsp[0].symbol);        symbol_make_alias (yyvsp[-1].symbol, yyvsp[0].symbol);
1253      ; }      }
1254      break;      break;
1255    case 46:
1256    case 47:  #line 258 "parse-gram.y"
1257  #line 252 "parse-gram.y"  {
 {  
1258        symbol_class_set (yyvsp[-2].symbol, current_class);        symbol_class_set (yyvsp[-2].symbol, current_class);
1259        symbol_type_set (yyvsp[-2].symbol, current_type);        symbol_type_set (yyvsp[-2].symbol, current_type);
1260        symbol_user_token_number_set (yyvsp[-2].symbol, yyvsp[-1].integer);        symbol_user_token_number_set (yyvsp[-2].symbol, yyvsp[-1].integer);
1261        symbol_make_alias (yyvsp[-2].symbol, yyvsp[0].symbol);        symbol_make_alias (yyvsp[-2].symbol, yyvsp[0].symbol);
1262      ; }      }
     break;  
   
   case 48:  
 #line 263 "parse-gram.y"  
 { ;; }  
     break;  
   
   case 49:  
 #line 265 "parse-gram.y"  
 { ;; }  
     break;  
   
   case 52:  
 #line 274 "parse-gram.y"  
 {  current_lhs = yyvsp[-1].symbol; ; }  
     break;  
   
   case 53:  
 #line 275 "parse-gram.y"  
 { ;; }  
1263      break;      break;
1264    case 47:
1265    case 54:  #line 269 "parse-gram.y"
1266  #line 279 "parse-gram.y"  {;}
1267  {  grammar_rule_end (); ; }      break;
1268    case 48:
1269    #line 271 "parse-gram.y"
1270    {;}
1271      break;      break;
1272    case 51:
   case 55:  
1273  #line 280 "parse-gram.y"  #line 280 "parse-gram.y"
1274  {  grammar_rule_end (); ; }  { current_lhs = yyvsp[-1].symbol; }
1275      break;      break;
1276    case 52:
1277    case 56:  #line 281 "parse-gram.y"
1278  #line 285 "parse-gram.y"  {;}
 {  grammar_rule_begin (current_lhs); ; }  
1279      break;      break;
1280    case 53:
1281    case 57:  #line 285 "parse-gram.y"
1282  #line 287 "parse-gram.y"  { grammar_rule_end (); }
 {  grammar_current_rule_symbol_append (yyvsp[0].symbol); ; }  
1283      break;      break;
1284    case 54:
1285    case 58:  #line 286 "parse-gram.y"
1286  #line 289 "parse-gram.y"  { grammar_rule_end (); }
 {  grammar_current_rule_action_append (yyvsp[0].string, yylsp[0].first_line); ; }  
1287      break;      break;
1288    case 55:
   case 59:  
1289  #line 291 "parse-gram.y"  #line 291 "parse-gram.y"
1290  {  grammar_current_rule_prec_set (yyvsp[0].symbol); ; }  { grammar_rule_begin (current_lhs); }
1291      break;      break;
1292    case 56:
1293    case 60:  #line 293 "parse-gram.y"
1294  #line 295 "parse-gram.y"  { grammar_current_rule_symbol_append (yyvsp[0].symbol); }
 {  yyval.symbol = yyvsp[0].symbol; ; }  
1295      break;      break;
1296    case 57:
1297    case 61:  #line 295 "parse-gram.y"
1298  #line 296 "parse-gram.y"  { grammar_current_rule_action_append (yyvsp[0].string, yylsp[0].first_line); }
 {  yyval.symbol = yyvsp[0].symbol; ; }  
1299      break;      break;
1300    case 58:
   case 62:  
1301  #line 297 "parse-gram.y"  #line 297 "parse-gram.y"
1302  {  yyval.symbol = getsym (yyvsp[0].string); ; }  { grammar_current_rule_prec_set (yyvsp[0].symbol); }
1303      break;      break;
1304    case 59:
1305    case 63:  #line 301 "parse-gram.y"
1306    { yyval.symbol = yyvsp[0].symbol; }
1307        break;
1308    case 60:
1309  #line 302 "parse-gram.y"  #line 302 "parse-gram.y"
1310  {  yyval.string = yyvsp[0].string; ; }  { yyval.symbol = yyvsp[0].symbol; }
1311      break;      break;
1312    case 61:
1313    case 64:  #line 303 "parse-gram.y"
1314    { yyval.symbol = getsym (yyvsp[0].string); }
1315        break;
1316    case 62:
1317  #line 308 "parse-gram.y"  #line 308 "parse-gram.y"
1318  {  { yyval.string = yyvsp[0].string; }
1319        break;
1320    case 63:
1321    #line 314 "parse-gram.y"
1322    {
1323        yyval.symbol = getsym (yyvsp[0].string);        yyval.symbol = getsym (yyvsp[0].string);
1324        symbol_class_set (yyval.symbol, token_sym);        symbol_class_set (yyval.symbol, token_sym);
1325      ; }      }
1326      break;      break;
1327    case 64:
1328    case 65:  #line 323 "parse-gram.y"
1329  #line 317 "parse-gram.y"  {
 {  
1330        yyval.string = yyvsp[0].string + 1;        yyval.string = yyvsp[0].string + 1;
1331        yyval.string[strlen (yyval.string) - 1] = '\0';        yyval.string[strlen (yyval.string) - 1] = '\0';
1332      ; }      }
1333      break;      break;
1334    case 65:
1335    case 66:  #line 331 "parse-gram.y"
1336  #line 325 "parse-gram.y"  {
 {  
1337        yyval.string = xstrdup ("");        yyval.string = xstrdup ("");
1338      ; }      }
1339      break;      break;
1340    case 66:
1341    case 67:  #line 335 "parse-gram.y"
1342  #line 329 "parse-gram.y"  {
 {  
1343        yyval.string = yyvsp[0].string;        yyval.string = yyvsp[0].string;
1344      ; }      }
1345      break;      break;
1346    }
1347    
1348    #line 705 "/usr/share/bison/bison.simple"
1349    
     }  
   
 /* Line 1010 of /usr/local/share/bison/bison.simple.  */  
 #line 1520 "parse-gram.c"  
1350    
1351    yyvsp -= yylen;    yyvsp -= yylen;
1352    yyssp -= yylen;    yyssp -= yylen;
# Line 1546  yyreduce: Line 1376  yyreduce:
1376    
1377    yyn = yyr1[yyn];    yyn = yyr1[yyn];
1378    
1379    yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;    yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
1380    if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)    if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1381      yystate = yytable[yystate];      yystate = yytable[yystate];
1382    else    else
1383      yystate = yydefgoto[yyn - YYNTOKENS];      yystate = yydefgoto[yyn - YYNTBASE];
1384    
1385    goto yynewstate;    goto yynewstate;
1386    
# Line 1564  yyerrlab: Line 1394  yyerrlab:
1394      {      {
1395        ++yynerrs;        ++yynerrs;
1396    
1397  #if YYERROR_VERBOSE  #ifdef YYERROR_VERBOSE
1398        yyn = yypact[yystate];        yyn = yypact[yystate];
1399    
1400        if (yyn > YYFLAG && yyn < YYLAST)        if (yyn > YYFLAG && yyn < YYLAST)
# Line 1604  yyerrlab: Line 1434  yyerrlab:
1434                  }                  }
1435                yyerror (yymsg);                yyerror (yymsg);
1436                YYSTACK_FREE (yymsg);                YYSTACK_FREE (yymsg);
1437              }              }
1438            else            else
1439              yyerror ("parse error; also virtual memory exhausted");              yyerror ("parse error; also virtual memory exhausted");
1440          }          }
1441        else        else
1442  #endif /* YYERROR_VERBOSE */  #endif /* defined (YYERROR_VERBOSE) */
1443          yyerror ("parse error");          yyerror ("parse error");
1444      }      }
1445    goto yyerrlab1;    goto yyerrlab1;
1446    
1447    
1448  /*----------------------------------------------------.  /*--------------------------------------------------.
1449  | yyerrlab1 -- error raised explicitly by an action.  |  | yyerrlab1 -- error raised explicitly by an action |
1450  `----------------------------------------------------*/  `--------------------------------------------------*/
1451  yyerrlab1:  yyerrlab1:
1452    if (yyerrstatus == 3)    if (yyerrstatus == 3)
1453      {      {
1454        /* If just tried and failed to reuse lookahead token after an        /* If just tried and failed to reuse lookahead token after an
1455           error, discard it.  */           error, discard it.  */
1456    
1457        /* Return failure if at end of input.  */        /* return failure if at end of input */
1458        if (yychar == YYEOF)        if (yychar == YYEOF)
1459          YYABORT;          YYABORT;
1460        YYDPRINTF ((stderr, "Discarding token %d (%s).\n",        YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
# Line 1635  yyerrlab1: Line 1465  yyerrlab1:
1465    /* Else will try to reuse lookahead token after shifting the error    /* Else will try to reuse lookahead token after shifting the error
1466       token.  */       token.  */
1467    
1468    yyerrstatus = 3;      /* Each real token shifted decrements this.  */    yyerrstatus = 3;              /* Each real token shifted decrements this */
1469    
1470    for (;;)    goto yyerrhandle;
     {  
       yyn = yypact[yystate];  
       if (yyn != YYFLAG)  
         {  
           yyn += YYTERROR;  
           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)  
             {  
               yyn = yytable[yyn];  
               if (0 < yyn)  
                 break;  
             }  
         }  
1471    
       /* Pop the current state because it cannot handle the error token.  */  
       if (yyssp == yyss)  
         YYABORT;  
1472    
1473  #if YYDEBUG  /*-------------------------------------------------------------------.
1474        if (yydebug)  | yyerrdefault -- current state does not do anything special for the |
1475          {  | error token.                                                       |
1476            if (yystos[yystate] < YYNTOKENS)  `-------------------------------------------------------------------*/
1477              {  yyerrdefault:
1478                YYFPRINTF (stderr, "Error: popping token %d (%s",  #if 0
1479                           yytoknum[yystos[yystate]], yytname[yystos[yystate]]);    /* This is wrong; only states that explicitly want error tokens
1480  # ifdef YYPRINT       should shift them.  */
1481                YYPRINT (stderr, yytoknum[yystos[yystate]], *yyvsp);  
1482  # endif    /* If its default is to accept any token, ok.  Otherwise pop it.  */
1483                YYFPRINTF (stderr, ")\n");    yyn = yydefact[yystate];
1484              }    if (yyn)
1485            else      goto yydefault;
             {  
               YYFPRINTF (stderr, "Error: popping nonterminal (%s)\n",  
                          yytname[yystos[yystate]]);  
             }  
         }  
1486  #endif  #endif
1487    
1488        yyvsp--;  
1489        yystate = *--yyssp;  /*---------------------------------------------------------------.
1490    | yyerrpop -- pop the current state because it cannot handle the |
1491    | error token                                                    |
1492    `---------------------------------------------------------------*/
1493    yyerrpop:
1494      if (yyssp == yyss)
1495        YYABORT;
1496      yyvsp--;
1497      yystate = *--yyssp;
1498  #if YYLSP_NEEDED  #if YYLSP_NEEDED
1499        yylsp--;    yylsp--;
1500  #endif  #endif
1501    
1502  #if YYDEBUG  #if YYDEBUG
1503        if (yydebug)    if (yydebug)
1504          {      {
1505            short *yyssp1 = yyss - 1;        short *yyssp1 = yyss - 1;
1506            YYFPRINTF (stderr, "Error: state stack now");        YYFPRINTF (stderr, "Error: state stack now");
1507            while (yyssp1 != yyssp)        while (yyssp1 != yyssp)
1508              YYFPRINTF (stderr, " %d", *++yyssp1);          YYFPRINTF (stderr, " %d", *++yyssp1);
1509            YYFPRINTF (stderr, "\n");        YYFPRINTF (stderr, "\n");
1510          }      }
1511  #endif  #endif
1512    
1513    /*--------------.
1514    | yyerrhandle.  |
1515    `--------------*/
1516    yyerrhandle:
1517      yyn = yypact[yystate];
1518      if (yyn == YYFLAG)
1519        goto yyerrdefault;
1520    
1521      yyn += YYTERROR;
1522      if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1523        goto yyerrdefault;
1524    
1525      yyn = yytable[yyn];
1526      if (yyn < 0)
1527        {
1528          if (yyn == YYFLAG)
1529            goto yyerrpop;
1530          yyn = -yyn;
1531          goto yyreduce;
1532      }      }
1533      else if (yyn == 0)
1534        goto yyerrpop;
1535    
1536    if (yyn == YYFINAL)    if (yyn == YYFINAL)
1537      YYACCEPT;      YYACCEPT;
# Line 1736  yyreturn: Line 1576  yyreturn:
1576  #endif  #endif
1577    return yyresult;    return yyresult;
1578  }  }
1579    #line 344 "parse-gram.y"
 #line 338 "parse-gram.y"  
1580    
1581  /*------------------------------------------------------------------.  /*------------------------------------------------------------------.
1582  | When debugging the parser, display tokens' locations and values.  |  | When debugging the parser, display tokens' locations and values.  |
# Line 1787  gram_error (gram_control_t *control ATTR Line 1626  gram_error (gram_control_t *control ATTR
1626    LOCATION_PRINT (stderr, *yylloc);    LOCATION_PRINT (stderr, *yylloc);
1627    fprintf (stderr, ": %s\n", msg);    fprintf (stderr, ": %s\n", msg);
1628  }  }
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26