Skip to content

Commit

Permalink
Make the error code blocks into fail() calls.
Browse files Browse the repository at this point in the history
I think I want this to be more robust, still, though.
  • Loading branch information
icculus committed Feb 22, 2010
1 parent 56c0517 commit e41a037
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions mojoshader_parser_hlsl.lemon
Expand Up @@ -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)...
Expand Down

0 comments on commit e41a037

Please sign in to comment.