Home | History | Annotate | Line # | Download | only in test
pure_error.y revision 1.1.1.2
      1      1.1  christos %%
      2      1.1  christos S: error
      3      1.1  christos %%
      4      1.1  christos 
      5      1.1  christos #include <stdio.h>
      6      1.1  christos 
      7  1.1.1.2  christos #ifdef YYBYACC
      8  1.1.1.2  christos extern int YYLEX_DECL();
      9  1.1.1.2  christos static void YYERROR_DECL();
     10  1.1.1.2  christos #endif
     11  1.1.1.2  christos 
     12      1.1  christos int
     13      1.1  christos main(void)
     14      1.1  christos {
     15      1.1  christos     printf("yyparse() = %d\n", yyparse());
     16      1.1  christos     return 0;
     17      1.1  christos }
     18      1.1  christos 
     19      1.1  christos int
     20      1.1  christos yylex(YYSTYPE *value)
     21      1.1  christos {
     22      1.1  christos     return value ? 0 : -1;
     23      1.1  christos }
     24      1.1  christos 
     25      1.1  christos static void
     26      1.1  christos yyerror(const char* s)
     27      1.1  christos {
     28      1.1  christos     printf("%s\n", s);
     29      1.1  christos }
     30