Skip to content
Permalink
Browse files
Stop parsing if the parser panics.
--HG--
branch : calculator-experiment
  • Loading branch information
icculus committed Feb 8, 2010
1 parent 8c720f9 commit 07e212ad05a2a99cb69a2231ddc02187ef2f24c6

File 2 of 2 in 07e212a

@@ -36,11 +36,14 @@
}

%parse_failure {
fprintf(stderr,"Giving up. Parser is hopelessly lost...\n");
ctx->isfail = 1;
fprintf(stderr, "Giving up. Parser is hopelessly lost...\n");

}

%stack_overflow {
fprintf(stderr,"Giving up. Parser stack overflow\n");
ctx->isfail = 1;
fprintf(stderr, "Giving up. Parser stack overflow\n");
}

// operator precedence (matches C spec)...

0 comments on commit 07e212a

Please sign in to comment.