diff options
Diffstat (limited to 'test/err_syntax16.y')
| -rw-r--r-- | test/err_syntax16.y | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/err_syntax16.y b/test/err_syntax16.y new file mode 100644 index 000000000000..0479e8217769 --- /dev/null +++ b/test/err_syntax16.y @@ -0,0 +1,40 @@ +%{ +int yylex(void); +static void yyerror(const char *); +%} + +%token second + +%% + +firstx + : '(' secondx + ; + +second : + ')' + ; + +S: error +%% + +#include <stdio.h> + +int +main(void) +{ + printf("yyparse() = %d\n", yyparse()); + return 0; +} + +int +yylex(void) +{ + return -1; +} + +static void +yyerror(const char* s) +{ + printf("%s\n", s); +} |
