/[bison]/bison/src/bison.simple
ViewVC logotype

Diff of /bison/src/bison.simple

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

revision 1.55 by ra, Sat Aug 25 13:13:14 2001 UTC revision 1.56 by ra, Sat Aug 25 15:21:05 2001 UTC
# Line 1  Line 1 
1  /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */  /* -*- C -*- */
2  #line  
3    /* A Bison parser, made from %%filename
4       by GNU bison %%version.  */
5    
6  /* Skeleton output parser for bison,  /* Skeleton output parser for bison,
7     Copyright 1984, 1989, 1990, 2000, 2001 Free Software Foundation, Inc.     Copyright 1984, 1989, 1990, 2000, 2001 Free Software Foundation, Inc.
8    
# Line 28  Line 31 
31     It was written by Richard Stallman by simplifying the hairy parser     It was written by Richard Stallman by simplifying the hairy parser
32     used when %semantic_parser is specified.  */     used when %semantic_parser is specified.  */
33    
34    #include <stdio.h>
35    
36    #ifndef __cplusplus
37    # ifndef __STDC__
38    #  define const
39    # endif
40    #endif
41    
42  #ifndef YYSTACK_USE_ALLOCA  #ifndef YYSTACK_USE_ALLOCA
43  # ifdef alloca  # ifdef alloca
44  #  define YYSTACK_USE_ALLOCA 1  #  define YYSTACK_USE_ALLOCA 1
# Line 78  Line 89 
89  # define YYSTACK_ALLOC malloc  # define YYSTACK_ALLOC malloc
90  #endif  #endif
91    
92    #define YYBISON 1       /* Identify Bison output.  */
93    #define YYPURE  %%pure  /* Identify pure parsers.  */
94    
95    #ifndef YYDEBUG
96    # define YYDEBUG %%debug
97    #endif
98    
99    #ifndef YYSTYPE
100    # define YYSTYPE %%stype
101    #endif
102    
103    #ifndef YYLTYPE
104    typedef struct yyltype
105    {
106      int first_line;
107      int first_column;
108      int last_line;
109      int last_column;
110    } yyltype;
111    # define YYLTYPE %%ltype
112    #endif
113    
114    #ifndef YYERROR_VERBOSE
115    # define YYERROR_VERBOSE %%verbose
116    #endif
117    
118    /* Tokens. */
119    %%tokendef
120    
121    #define YYFINAL         %%final
122    #define YYFLAG          %%flag
123    #define YYNTBASE        %%ntbase
124    #define YYLAST          %%last
125    
126    #define YYNTOKENS       %%ntokens
127    #define YYNNTS          %%nnts
128    #define YYNRULES        %%nrules
129    #define YYNSTATES       %%nstates
130    #define YYMAXUTOK       %%maxtok
131    
132    /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX.  */
133    #define YYTRANSLATE(x) ((unsigned)(x) <= %%maxtok ? yytranslate[x] : %%nsym)
134    
135    /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX.  */
136    static const char yytranslate[] =
137    {
138      %%translate
139    };
140    
141    #if YYDEBUG
142    static const short yyprhs[] =
143    {
144      %%prhs
145    };
146    
147    static const short yyrhs[] =
148    {
149      %%rhs
150    };
151    
152    /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
153    static const short yyrline[] =
154    {
155      %%rline
156    };
157    #endif
158    
159    #if YYDEBUG || YYERROR_VERBOSE
160    /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
161    static const char* const yytname[] =
162    {
163      %%tname
164    };
165    #endif
166    
167    /* YYTOKNUM[YYN] -- Index in YYTNAME corresponding to YYLEX.  */
168    static const short yytoknum[] =
169    {
170      %%toknum
171    };
172    
173    /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
174    static const short yyr1[] =
175    {
176      %%r1
177    };
178    
179    /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
180    static const short yyr2[] =
181    {
182      %%r2
183    };
184    
185    /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
186       doesn't specify something else to do.  Zero means the default is an
187       error.  */
188    static const short yydefact[] =
189    {
190      %%defact
191    };
192    
193    static const short yydefgoto[] =
194    {
195      %%defgoto
196    };
197    
198    static const short yypact[] =
199    {
200      %%pact
201    };
202    
203    static const short yypgoto[] =
204    {
205      %%pgoto
206    };
207    
208    static const short yytable[] =
209    {
210      %%table
211    };
212    
213    static const short yycheck[] =
214    {
215      %%check
216    };
217    
218  #define yyerrok         (yyerrstatus = 0)  #define yyerrok         (yyerrstatus = 0)
219  #define yyclearin       (yychar = YYEMPTY)  #define yyclearin       (%%yychar = YYEMPTY)
220  #define YYEMPTY         -2  #define YYEMPTY         -2
221  #define YYEOF           0  #define YYEOF           0
222    
223  #define YYACCEPT        goto yyacceptlab  #define YYACCEPT        goto yyacceptlab
224  #define YYABORT         goto yyabortlab  #define YYABORT         goto yyabortlab
225  #define YYERROR         goto yyerrlab1  #define YYERROR         goto yyerrlab1
226    
227  /* Like YYERROR except do call yyerror.  This remains here temporarily  /* Like YYERROR except do call yyerror.  This remains here temporarily
228     to ease the transition to the new meaning of YYERROR, for GCC.     to ease the transition to the new meaning of YYERROR, for GCC.
229     Once GCC version 2 has supplanted version 1, this can go.  */     Once GCC version 2 has supplanted version 1, this can go.  */
230    
231  #define YYFAIL          goto yyerrlab  #define YYFAIL          goto yyerrlab
232    
233  #define YYRECOVERING()  (!!yyerrstatus)  #define YYRECOVERING()  (!!yyerrstatus)
234    
235  #define YYBACKUP(Token, Value)                                  \  #define YYBACKUP(Token, Value)                                  \
236  do                                                              \  do                                                              \
237    if (yychar == YYEMPTY && yylen == 1)                          \    if (%%yychar == YYEMPTY && yylen == 1)                        \
238      {                                                           \      {                                                           \
239        yychar = (Token);                                         \        %%yychar = (Token);                                       \
240        yylval = (Value);                                         \        %%yylval = (Value);                                       \
241        yychar1 = YYTRANSLATE (yychar);                           \        yychar1 = YYTRANSLATE (%%yychar);                         \
242        YYPOPSTACK;                                               \        YYPOPSTACK;                                               \
243        goto yybackup;                                            \        goto yybackup;                                            \
244      }                                                           \      }                                                           \
245    else                                                          \    else                                                          \
246      {                                                           \      {                                                           \
247        yyerror ("syntax error: cannot back up");                 \        %%yyerror ("syntax error: cannot back up");               \
248        YYERROR;                                                  \        YYERROR;                                                  \
249      }                                                           \      }                                                           \
250  while (0)  while (0)
# Line 110  while (0) Line 252  while (0)
252  #define YYTERROR        1  #define YYTERROR        1
253  #define YYERRCODE       256  #define YYERRCODE       256
254    
   
255  /* YYLLOC_DEFAULT -- Compute the default location (before the actions  /* YYLLOC_DEFAULT -- Compute the default location (before the actions
256     are run).     are run).
257    
# Line 124  while (0) Line 265  while (0)
265     Current.last_column = Rhs[N].last_column;     Current.last_column = Rhs[N].last_column;
266  #endif  #endif
267    
   
268  /* YYLEX -- calling `yylex' with the right arguments.  */  /* YYLEX -- calling `yylex' with the right arguments.  */
269    
270  #if YYPURE  #if YYPURE
271  # if YYLSP_NEEDED  # if YYLSP_NEEDED
272  #  ifdef YYLEX_PARAM  #  ifdef YYLEX_PARAM
273  #   define YYLEX                yylex (&yylval, &yylloc, YYLEX_PARAM)  #   define YYLEX                %%yylex (&%%yylval, &yylloc, YYLEX_PARAM)
274  #  else  #  else
275  #   define YYLEX                yylex (&yylval, &yylloc)  #   define YYLEX                %%yylex (&%%yylval, &yylloc)
276  #  endif  #  endif
277  # else /* !YYLSP_NEEDED */  # else /* !YYLSP_NEEDED */
278  #  ifdef YYLEX_PARAM  #  ifdef YYLEX_PARAM
279  #   define YYLEX                yylex (&yylval, YYLEX_PARAM)  #   define YYLEX                %%yylex (&%%yylval, YYLEX_PARAM)
280  #  else  #  else
281  #   define YYLEX                yylex (&yylval)  #   define YYLEX                %%yylex (&%%yylval)
282  #  endif  #  endif
283  # endif /* !YYLSP_NEEDED */  # endif /* !YYLSP_NEEDED */
284  #else /* !YYPURE */  #else /* !YYPURE */
285  # define YYLEX                  yylex ()  # define YYLEX                  %%yylex ()
286  #endif /* !YYPURE */  #endif /* !YYPURE */
287    
   
288  /* Enable debugging if requested.  */  /* Enable debugging if requested.  */
289  #if YYDEBUG  #if YYDEBUG
290  # define YYDPRINTF(Args)                        \  # define YYDPRINTF(Args)                        \
291  do {                                            \  do {                                            \
292    if (yydebug)                                  \    if (%%yydebug)                                \
293      fprintf Args;                               \      fprintf Args;                               \
294  } while (0)  } while (0)
295  /* Nonzero means print parse trace. [The following comment makes no  /* Nonzero means print parse trace. [The following comment makes no
296     sense to me.  Could someone clarify it?  --akim] Since this is     sense to me.  Could someone clarify it?  --akim] Since this is
297     uninitialized, it does not stop multiple parsers from coexisting.     uninitialized, it does not stop multiple parsers from coexisting.
298     */     */
299  int yydebug;  int %%yydebug;
300  #else /* !YYDEBUG */  #else /* !YYDEBUG */
301  # define YYDPRINTF(Args)  # define YYDPRINTF(Args)
302  #endif /* !YYDEBUG */  #endif /* !YYDEBUG */
303    
304  /* YYINITDEPTH -- initial size of the parser's stacks.  */  /* YYINITDEPTH -- initial size of the parser's stacks.  */
305  #ifndef YYINITDEPTH  #ifndef YYINITDEPTH
306  # define YYINITDEPTH 200  # define YYINITDEPTH %%initdepth
307  #endif  #endif
308    
309  /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only  /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
# Line 174  int yydebug; Line 313  int yydebug;
313  #endif  #endif
314    
315  #ifndef YYMAXDEPTH  #ifndef YYMAXDEPTH
316  # define YYMAXDEPTH 10000  # define YYMAXDEPTH %%maxdepth
317  #endif  #endif
318    
319    
320    
321  /* Define __yy_memcpy.  Note that the size argument  /* Define __yy_memcpy.  Note that the size argument
322     should be passed with type unsigned int, because that is what the non-GCC     should be passed with type unsigned int, because that is what the non-GCC
323     definitions require.  With GCC, __builtin_memcpy takes an arg     definitions require.  With GCC, __builtin_memcpy takes an arg
# Line 205  __yy_memcpy (char *to, const char *from, Line 346  __yy_memcpy (char *to, const char *from,
346    while (i-- > 0)    while (i-- > 0)
347      *t++ = *f++;      *t++ = *f++;
348  }  }
   
349  #endif  #endif
350    
351    
352  #line  
353    #line %%line "%%filename"
354    
355  /* 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
356     into yyparse.  The argument should have type void *.     into yyparse.  The argument should have type void *.
# Line 232  __yy_memcpy (char *to, const char *from, Line 374  __yy_memcpy (char *to, const char *from,
374  /* Prevent warning if -Wstrict-prototypes.  */  /* Prevent warning if -Wstrict-prototypes.  */
375  #ifdef __GNUC__  #ifdef __GNUC__
376  # ifdef YYPARSE_PARAM  # ifdef YYPARSE_PARAM
377  int yyparse (void *);  int %%yyparse (void *);
378  # else  # else
379  int yyparse (void);  int %%yyparse (void);
380  # endif  # endif
381  #endif  #endif
382    
# Line 243  int yyparse (void); Line 385  int yyparse (void);
385    
386  #define _YY_DECL_VARIABLES                              \  #define _YY_DECL_VARIABLES                              \
387  /* The lookahead symbol.  */                            \  /* The lookahead symbol.  */                            \
388  int yychar;                                             \  int %%yychar;                                           \
389                                                          \                                                          \
390  /* The semantic value of the lookahead symbol. */       \  /* The semantic value of the lookahead symbol. */       \
391  YYSTYPE yylval;                                         \  YYSTYPE %%yylval;                                       \
392                                                          \                                                          \
393  /* Number of parse errors so far.  */                   \  /* Number of parse errors so far.  */                   \
394  int yynerrs;  int %%yynerrs;
395    
396  #if YYLSP_NEEDED  #if YYLSP_NEEDED
397  # define YY_DECL_VARIABLES                      \  # define YY_DECL_VARIABLES                      \
# Line 262  YYLTYPE yylloc; Line 404  YYLTYPE yylloc;
404  _YY_DECL_VARIABLES  _YY_DECL_VARIABLES
405  #endif  #endif
406    
   
407  /* If nonreentrant, generate the variables here. */  /* If nonreentrant, generate the variables here. */
408    
409  #if !YYPURE  #if !YYPURE
# Line 270  YY_DECL_VARIABLES Line 411  YY_DECL_VARIABLES
411  #endif  /* !YYPURE */  #endif  /* !YYPURE */
412    
413  int  int
414  yyparse (YYPARSE_PARAM_ARG)  %%yyparse (YYPARSE_PARAM_ARG)
415       YYPARSE_PARAM_DECL       YYPARSE_PARAM_DECL
416  {  {
417    /* If reentrant, generate the variables here. */    /* If reentrant, generate the variables here. */
# Line 319  yyparse (YYPARSE_PARAM_ARG) Line 460  yyparse (YYPARSE_PARAM_ARG)
460    int yystacksize = YYINITDEPTH;    int yystacksize = YYINITDEPTH;
461    int yyfree_stacks = 0;    int yyfree_stacks = 0;
462    
   
463    /* The variables used to return semantic value and location from the    /* The variables used to return semantic value and location from the
464       action routines.  */       action routines.  */
465    YYSTYPE yyval;    YYSTYPE yyval;
# Line 335  yyparse (YYPARSE_PARAM_ARG) Line 475  yyparse (YYPARSE_PARAM_ARG)
475    
476    yystate = 0;    yystate = 0;
477    yyerrstatus = 0;    yyerrstatus = 0;
478    yynerrs = 0;    %%yynerrs = 0;
479    yychar = YYEMPTY;             /* Cause a token to be read.  */    %%yychar = YYEMPTY;           /* Cause a token to be read.  */
480    
481    /* Initialize stack pointers.    /* Initialize stack pointers.
482       Waste one element of value and location stack       Waste one element of value and location stack
# Line 349  yyparse (YYPARSE_PARAM_ARG) Line 489  yyparse (YYPARSE_PARAM_ARG)
489    yylsp = yyls;    yylsp = yyls;
490  #endif  #endif
491    
   
492  /*------------------------------------------------------------.  /*------------------------------------------------------------.
493  | yynewstate -- Push a new state, which is found in yystate.  |  | yynewstate -- Push a new state, which is found in yystate.  |
494  `------------------------------------------------------------*/  `------------------------------------------------------------*/
# Line 399  yynewstate: Line 538  yynewstate:
538        /* Extend the stack our own way.  */        /* Extend the stack our own way.  */
539        if (yystacksize >= YYMAXDEPTH)        if (yystacksize >= YYMAXDEPTH)
540          {          {
541            yyerror ("parser stack overflow");            %%yyerror ("parser stack overflow");
542            if (yyfree_stacks)            if (yyfree_stacks)
543              {              {
544                free (yyss);                free (yyss);
# Line 413  yynewstate: Line 552  yynewstate:
552        yystacksize *= 2;        yystacksize *= 2;
553        if (yystacksize > YYMAXDEPTH)        if (yystacksize > YYMAXDEPTH)
554          yystacksize = YYMAXDEPTH;          yystacksize = YYMAXDEPTH;
555  # ifndef YYSTACK_USE_ALLOCA  # if !YYSTACK_USE_ALLOCA
556        yyfree_stacks = 1;        yyfree_stacks = 1;
557  # endif  # endif
558        yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));        yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
# Line 445  yynewstate: Line 584  yynewstate:
584    
585    goto yybackup;    goto yybackup;
586    
   
587  /*-----------.  /*-----------.
588  | yybackup.  |  | yybackup.  |
589  `-----------*/  `-----------*/
# Line 466  yybackup: Line 604  yybackup:
604    /* yychar is either YYEMPTY or YYEOF    /* yychar is either YYEMPTY or YYEOF
605       or a valid token in external form.  */       or a valid token in external form.  */
606    
607    if (yychar == YYEMPTY)    if (%%yychar == YYEMPTY)
608      {      {
609        YYDPRINTF ((stderr, "Reading a token: "));        YYDPRINTF ((stderr, "Reading a token: "));
610        yychar = YYLEX;        %%yychar = YYLEX;
611      }      }
612    
613    /* Convert token to internal form (in yychar1) for indexing tables with */    /* Convert token to internal form (in yychar1) for indexing tables with */
614    
615    if (yychar <= 0)              /* This means end of input. */    if (%%yychar <= 0)            /* This means end of input. */
616      {      {
617        yychar1 = 0;        yychar1 = 0;
618        yychar = YYEOF;           /* Don't call YYLEX any more */        %%yychar = YYEOF;         /* Don't call YYLEX any more */
619    
620        YYDPRINTF ((stderr, "Now at end of input.\n"));        YYDPRINTF ((stderr, "Now at end of input.\n"));
621      }      }
622    else    else
623      {      {
624        yychar1 = YYTRANSLATE (yychar);        yychar1 = YYTRANSLATE (%%yychar);
625    
626  #if YYDEBUG  #if YYDEBUG
627       /* We have to keep this `#if YYDEBUG', since we use variables       /* We have to keep this `#if YYDEBUG', since we use variables
628          which are defined only if `YYDEBUG' is set.  */          which are defined only if `YYDEBUG' is set.  */
629        if (yydebug)        if (%%yydebug)
630          {          {
631            fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);            fprintf (stderr, "Next token is %d (%s", %%yychar, yytname[yychar1]);
632            /* Give the individual parser a way to print the precise            /* Give the individual parser a way to print the precise
633               meaning of a token, for further debugging info.  */               meaning of a token, for further debugging info.  */
634  # ifdef YYPRINT  # ifdef YYPRINT
635            YYPRINT (stderr, yychar, yylval);            YYPRINT (stderr, %%yychar, %%yylval);
636  # endif  # endif
637            fprintf (stderr, ")\n");            fprintf (stderr, ")\n");
638          }          }
# Line 528  yybackup: Line 666  yybackup:
666      YYACCEPT;      YYACCEPT;
667    
668    /* Shift the lookahead token.  */    /* Shift the lookahead token.  */
669    YYDPRINTF ((stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]));    YYDPRINTF ((stderr, "Shifting token %d (%s), ", %%yychar, yytname[yychar1]));
670    
671    /* Discard the token being shifted unless it is eof.  */    /* Discard the token being shifted unless it is eof.  */
672    if (yychar != YYEOF)    if (%%yychar != YYEOF)
673      yychar = YYEMPTY;      %%yychar = YYEMPTY;
674    
675    *++yyvsp = yylval;    *++yyvsp = %%yylval;
676  #if YYLSP_NEEDED  #if YYLSP_NEEDED
677    *++yylsp = yylloc;    *++yylsp = yylloc;
678  #endif  #endif
# Line 585  yyreduce: Line 723  yyreduce:
723  #if YYDEBUG  #if YYDEBUG
724    /* We have to keep this `#if YYDEBUG', since we use variables which    /* We have to keep this `#if YYDEBUG', since we use variables which
725       are defined only if `YYDEBUG' is set.  */       are defined only if `YYDEBUG' is set.  */
726    if (yydebug)    if (%%yydebug)
727      {      {
728        int i;        int i;
729    
# Line 598  yyreduce: Line 736  yyreduce:
736        fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);        fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
737      }      }
738  #endif  #endif
739  %% actions /* The action file replaces this line. */    switch (yyn)
740  #line      {
741          %%action /* The action file replaces this line. */
742        }
743    #line %%line "%%filename"
744    
745    yyvsp -= yylen;    yyvsp -= yylen;
746    yyssp -= yylen;    yyssp -= yylen;
# Line 608  yyreduce: Line 749  yyreduce:
749  #endif  #endif
750    
751  #if YYDEBUG  #if YYDEBUG
752    if (yydebug)    if (%%yydebug)
753      {      {
754        short *ssp1 = yyss - 1;        short *ssp1 = yyss - 1;
755        fprintf (stderr, "state stack now");        fprintf (stderr, "state stack now");
# Line 645  yyerrlab: Line 786  yyerrlab:
786    /* If not already recovering from an error, report this error.  */    /* If not already recovering from an error, report this error.  */
787    if (!yyerrstatus)    if (!yyerrstatus)
788      {      {
789        ++yynerrs;        ++%%yynerrs;
790    
791  #ifdef YYERROR_VERBOSE  #if YYERROR_VERBOSE
792        yyn = yypact[yystate];        yyn = yypact[yystate];
793    
794        if (yyn > YYFLAG && yyn < YYLAST)        if (yyn > YYFLAG && yyn < YYLAST)
# Line 663  yyerrlab: Line 804  yyerrlab:
804              if (yycheck[x + yyn] == x)              if (yycheck[x + yyn] == x)
805                size += strlen (yytname[x]) + 15, count++;                size += strlen (yytname[x]) + 15, count++;
806            size += strlen ("parse error, unexpected `") + 1;            size += strlen ("parse error, unexpected `") + 1;
807            size += strlen (yytname[YYTRANSLATE (yychar)]);            size += strlen (yytname[YYTRANSLATE (%%yychar)]);
808            msg = (char *) malloc (size);            msg = (char *) malloc (size);
809            if (msg != 0)            if (msg != 0)
810              {              {
811                strcpy (msg, "parse error, unexpected `");                strcpy (msg, "parse error, unexpected `");
812                strcat (msg, yytname[YYTRANSLATE (yychar)]);                strcat (msg, yytname[YYTRANSLATE (%%yychar)]);
813                strcat (msg, "'");                strcat (msg, "'");
814    
815                if (count < 5)                if (count < 5)
816                  {                  {
817                    count = 0;                    count = 0;
818                    for (x = (yyn < 0 ? -yyn : 0);                    for (x = (yyn < 0 ? -yyn : 0);
819                         x < (int) (sizeof (yytname) / sizeof (char *)); x++)                           x < (int) (sizeof (yytname) / sizeof (char *)); x++)
820                      if (yycheck[x + yyn] == x)                      if (yycheck[x + yyn] == x)
821                        {                        {
822                          strcat (msg, count == 0 ? ", expecting `" : " or `");                          strcat (msg, count == 0 ? ", expecting `" : " or `");
823                          strcat (msg, yytname[x]);                          strcat (msg, yytname[x]);
824                          strcat (msg, "'");                          strcat (msg, "'");
825                          count++;                          count++;
826                        }                        }
827                  }                  }
828                yyerror (msg);                %%yyerror (msg);
829                free (msg);                free (msg);
830              }              }
831            else            else
832              yyerror ("parse error; also virtual memory exceeded");              %%yyerror ("parse error; also virtual memory exceeded");
833          }          }
834        else        else
835  #endif /* YYERROR_VERBOSE */  #endif /* YYERROR_VERBOSE */
836          yyerror ("parse error");          %%yyerror ("parse error");
837      }      }
838    goto yyerrlab1;    goto yyerrlab1;
839    
# Line 707  yyerrlab1: Line 848  yyerrlab1:
848           error, discard it.  */           error, discard it.  */
849    
850        /* return failure if at end of input */        /* return failure if at end of input */
851        if (yychar == YYEOF)        if (%%yychar == YYEOF)
852          YYABORT;          YYABORT;
853        YYDPRINTF ((stderr, "Discarding token %d (%s).\n",        YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
854                    yychar, yytname[yychar1]));                    %%yychar, yytname[yychar1]));
855        yychar = YYEMPTY;        %%yychar = YYEMPTY;
856      }      }
857    
858    /* Else will try to reuse lookahead token after shifting the error    /* Else will try to reuse lookahead token after shifting the error
# Line 752  yyerrpop: Line 893  yyerrpop:
893  #endif  #endif
894    
895  #if YYDEBUG  #if YYDEBUG
896    if (yydebug)    if (%%yydebug)
897      {      {
898        short *ssp1 = yyss - 1;        short *ssp1 = yyss - 1;
899        fprintf (stderr, "Error: state stack now");        fprintf (stderr, "Error: state stack now");
# Line 790  yyerrhandle: Line 931  yyerrhandle:
931    
932    YYDPRINTF ((stderr, "Shifting error token, "));    YYDPRINTF ((stderr, "Shifting error token, "));
933    
934    *++yyvsp = yylval;    *++yyvsp = %%yylval;
935  #if YYLSP_NEEDED  #if YYLSP_NEEDED
936    *++yylsp = yylloc;    *++yylsp = yylloc;
937  #endif  #endif

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

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