mojoshader_parser_hlsl.lemon
changeset 848 8ff6c5d37d33
parent 846 10eb8be2c919
child 854 65e06097e450
--- a/mojoshader_parser_hlsl.lemon	Mon Feb 22 01:57:53 2010 -0500
+++ b/mojoshader_parser_hlsl.lemon	Mon Feb 22 01:58:37 2010 -0500
@@ -36,20 +36,17 @@
 
 %syntax_error {
     // !!! FIXME: make this a proper fail() function.
-    ctx->isfail = 1;
-    fprintf(stderr,"Syntax error\n");
+    fail(ctx, "Syntax error");
 }
 
 %parse_failure {
     // !!! FIXME: make this a proper fail() function.
-    ctx->isfail = 1;
-    fprintf(stderr,"Giving up.  Parser is hopelessly lost...\n");
+    fail(ctx, "Giving up. Parser is hopelessly lost...");
 }
 
 %stack_overflow {
     // !!! FIXME: make this a proper fail() function.
-    ctx->isfail = 1;
-    fprintf(stderr,"Giving up.  Parser stack overflow\n");
+    fail(ctx, "Giving up. Parser stack overflow");
 }
 
 // operator precedence (matches C spec)...