/[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.60 by marc, Fri Aug 31 16:01:53 2001 UTC revision 1.61 by pascal, Fri Aug 31 16:56:44 2001 UTC
# Line 118  typedef struct yyltype Line 118  typedef struct yyltype
118  # define YYERROR_VERBOSE %%verbose  # define YYERROR_VERBOSE %%verbose
119  #endif  #endif
120    
121  /* Tokens. */  /* Tokens.  */
122  %%tokendef  %%tokendef
123    
124  #define YYFINAL         %%final  #define YYFINAL         %%final
# Line 160  static const short yyrline[] = Line 160  static const short yyrline[] =
160  #endif  #endif
161    
162  #if YYDEBUG || YYERROR_VERBOSE  #if YYDEBUG || YYERROR_VERBOSE
163  /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */  /* YYTNME[TOKEN_NUM] -- String name of the token TOKEN_NUM.  */
164  static const char* const yytname[] =  static const char *const yytname[] =
165  {  {
166    %%tname    %%tname
167  };  };
# Line 390  int %%yyparse (void); Line 390  int %%yyparse (void);
390  /* The lookahead symbol.  */                            \  /* The lookahead symbol.  */                            \
391  int %%yychar;                                           \  int %%yychar;                                           \
392                                                          \                                                          \
393  /* The semantic value of the lookahead symbol. */       \  /* The semantic value of the lookahead symbol.  */      \
394  YYSTYPE %%yylval;                                       \  YYSTYPE %%yylval;                                       \
395                                                          \                                                          \
396  /* Number of parse errors so far.  */                   \  /* Number of parse errors so far.  */                   \
# Line 407  YYLTYPE yylloc; Line 407  YYLTYPE yylloc;
407  _YY_DECL_VARIABLES  _YY_DECL_VARIABLES
408  #endif  #endif
409    
410  /* If nonreentrant, generate the variables here. */  /* If nonreentrant, generate the variables here.  */
411    
412  #if !YYPURE  #if !YYPURE
413  YY_DECL_VARIABLES  YY_DECL_VARIABLES
# Line 417  int Line 417  int
417  %%yyparse (YYPARSE_PARAM_ARG)  %%yyparse (YYPARSE_PARAM_ARG)
418       YYPARSE_PARAM_DECL       YYPARSE_PARAM_DECL
419  {  {
420    /* If reentrant, generate the variables here. */    /* If reentrant, generate the variables here.  */
421  #if YYPURE  #if YYPURE
422    YY_DECL_VARIABLES    YY_DECL_VARIABLES
423  #endif  /* !YYPURE */  #endif  /* !YYPURE */
# Line 437  int Line 437  int
437       Refer to the stacks thru separate pointers, to allow yyoverflow       Refer to the stacks thru separate pointers, to allow yyoverflow
438       to reallocate them elsewhere.  */       to reallocate them elsewhere.  */
439    
440    /* The state stack. */    /* The state stack.  */
441    short yyssa[YYINITDEPTH];    short yyssa[YYINITDEPTH];
442    short *yyss = yyssa;    short *yyss = yyssa;
443    register short *yyssp;    register short *yyssp;
# Line 471  int Line 471  int
471  # endif  # endif
472    
473    /* When reducing, the number of symbols on the RHS of the reduced    /* When reducing, the number of symbols on the RHS of the reduced
474       rule. */       rule.  */
475    int yylen;    int yylen;
476    
477    YYDPRINTF ((stderr, "Starting parse\n"));    YYDPRINTF ((stderr, "Starting parse\n"));
# Line 617  yybackup: Line 617  yybackup:
617        %%yychar = YYLEX;        %%yychar = YYLEX;
618      }      }
619    
620    /* Convert token to internal form (in yychar1) for indexing tables with */    /* Convert token to internal form (in yychar1) for indexing tables with.  */
621    
622    if (%%yychar <= 0)            /* This means end of input. */    if (%%yychar <= 0)            /* This means end of input.  */
623      {      {
624        yychar1 = 0;        yychar1 = 0;
625        %%yychar = YYEOF;         /* Don't call YYLEX any more */        %%yychar = YYEOF;         /* Don't call YYLEX any more.  */
626    
627        YYDPRINTF ((stderr, "Now at end of input.\n"));        YYDPRINTF ((stderr, "Now at end of input.\n"));
628      }      }
# Line 745  yyreduce: Line 745  yyreduce:
745  #endif  #endif
746    switch (yyn)    switch (yyn)
747      {      {
748        %%action /* The action file replaces this line. */        %%action /* The action file replaces this line.  */
749      }      }
750  #line %%line "%%filename"  #line %%line "%%filename"
751    
# Line 845  yyerrlab: Line 845  yyerrlab:
845    goto yyerrlab1;    goto yyerrlab1;
846    
847    
848  /*--------------------------------------------------.  /*----------------------------------------------------.
849  | yyerrlab1 -- error raised explicitly by an action |  | yyerrlab1 -- error raised explicitly by an action.  |
850  `--------------------------------------------------*/  `----------------------------------------------------*/
851  yyerrlab1:  yyerrlab1:
852    if (yyerrstatus == 3)    if (yyerrstatus == 3)
853      {      {
854        /* If just tried and failed to reuse lookahead token after an        /* If just tried and failed to reuse lookahead token after an
855           error, discard it.  */           error, discard it.  */
856    
857        /* return failure if at end of input */        /* Return failure if at end of input.  */
858        if (%%yychar == YYEOF)        if (%%yychar == YYEOF)
859          YYABORT;          YYABORT;
860        YYDPRINTF ((stderr, "Discarding token %d (%s).\n",        YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
# Line 865  yyerrlab1: Line 865  yyerrlab1:
865    /* Else will try to reuse lookahead token after shifting the error    /* Else will try to reuse lookahead token after shifting the error
866       token.  */       token.  */
867    
868    yyerrstatus = 3;              /* Each real token shifted decrements this */    yyerrstatus = 3;              /* Each real token shifted decrements this.  */
869    
870    goto yyerrhandle;    goto yyerrhandle;
871    
# Line 888  yyerrdefault: Line 888  yyerrdefault:
888    
889  /*---------------------------------------------------------------.  /*---------------------------------------------------------------.
890  | yyerrpop -- pop the current state because it cannot handle the |  | yyerrpop -- pop the current state because it cannot handle the |
891  | error token                                                    |  | error token.                                                   |
892  `---------------------------------------------------------------*/  `---------------------------------------------------------------*/
893  yyerrpop:  yyerrpop:
894    if (yyssp == yyss)    if (yyssp == yyss)

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61

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