Home | History | Annotate | Line # | Download | only in test
      1 /*	$NetBSD: err_syntax10.y,v 1.1.1.3 2016/01/09 21:59:45 christos Exp $	*/
      2 
      3 %{
      4 int yylex(void);
      5 static void yyerror(const char *);
      6 %}
      7 
      8 %token <text> '(' '*' '&'
      9 %token <TEXT> '(' '*' '&'
     10 
     11 %%
     12 S: error
     13 %%
     14 
     15 #include <stdio.h>
     16 
     17 int
     18 main(void)
     19 {
     20     printf("yyparse() = %d\n", yyparse());
     21     return 0;
     22 }
     23 
     24 int
     25 yylex(void)
     26 {
     27     return -1;
     28 }
     29 
     30 static void
     31 yyerror(const char* s)
     32 {
     33     printf("%s\n", s);
     34 }
     35