/[bison]/bison/tests/cxx-type.at
ViewVC logotype

Diff of /bison/tests/cxx-type.at

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

revision 1.15 by hilfinger, Tue Jun 10 02:44:58 2003 UTC revision 1.16 by eggert, Mon Jun 16 18:37:55 2003 UTC
# Line 40  $1 Line 40  $1
40    #define YYINITDEPTH 10    #define YYINITDEPTH 10
41    static char* format (const char*,  ...);    static char* format (const char*,  ...);
42    
43      struct YYLTYPE;
44    #if YYPURE
45    # if YYLSP_NEEDED
46    #  define LEX_PARAMETERS YYSTYPE *lvalp, struct YYLTYPE *llocp
47    #  define ERROR_PARAMETERS struct YYLTYPE *llocp, char const *s
48    # else
49    #  define LEX_PARAMETERS YYSTYPE *lvalp
50    # endif
51    #endif
52    #ifndef LEX_PARAMETERS
53    # define LEX_PARAMETERS void
54    #endif
55    #ifndef ERROR_PARAMETERS
56    # define ERROR_PARAMETERS char const *s
57    #endif
58      int yylex (LEX_PARAMETERS);
59      int yyerror (ERROR_PARAMETERS);
60  %}  %}
61    
62  %token TYPENAME ID  %token TYPENAME ID
# Line 101  main (int argc, char** argv) Line 118  main (int argc, char** argv)
118  }  }
119    
120  int  int
121  #if YYPURE && YYLSP_NEEDED  yylex (LEX_PARAMETERS)
   yylex (YYSTYPE *lvalp, YYLTYPE *llocp)  
 #elif YYPURE  
   yylex (YYSTYPE *lvalp)  
 #else  
   yylex ()  
 #endif  
122  {  {
123    char buffer[256];    char buffer[256];
124    int c;    int c;
# Line 180  int Line 191  int
191  }  }
192    
193  int  int
194  yyerror (  yyerror (ERROR_PARAMETERS)
195    {
196  #if YYPURE && YYLSP_NEEDED  #if YYPURE && YYLSP_NEEDED
197           YYLTYPE *llocp,    /* Pacify GCC by using llocp.  */
198      if (! llocp)
199        abort ();
200  #endif  #endif
          const char *s  
         )  
 {  
201    fprintf (stderr, "%s\n", s);    fprintf (stderr, "%s\n", s);
202    return 0;    return 0;
203  }  }

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

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