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