diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-04-22 22:11:22 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-04-22 22:11:22 +0000 |
| commit | 4ecea33a988c00caa98cacf934e61e361d94e8af (patch) | |
| tree | 7089d85dfa0daa5568799f671cfb9924f1012710 /test/err_syntax17.y | |
| parent | e0ae66db632ac7c7773c8b85754bfc135f5bdbd5 (diff) | |
Diffstat (limited to 'test/err_syntax17.y')
| -rw-r--r-- | test/err_syntax17.y | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/err_syntax17.y b/test/err_syntax17.y new file mode 100644 index 000000000000..a5551c2f7c72 --- /dev/null +++ b/test/err_syntax17.y @@ -0,0 +1,30 @@ +%{ +int yylex(void); +static void yyerror(const char *); +%} + +%% + +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); +} |
