From: David Kastrup Date: Thu, 24 Jan 2013 12:07:10 +0000 (+0100) Subject: Issue 3138: Remove complete aborts in the lexer X-Git-Tag: release/2.17.12-1~22 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=180b2b44d88000f51093c1a989caa000c8057379;p=lilypond.git Issue 3138: Remove complete aborts in the lexer A syntax error should not let the whole LilyPond run bomb out, but rather just the current session (filename on the command line). --- diff --git a/lily/lexer.ll b/lily/lexer.ll index 9b1d6eb5aa..c1d3dd86a5 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -314,7 +314,7 @@ BOM_UTF8 \357\273\277 yy_push_state (state); } else - error (_ ("\\maininput not allowed outside init files")); + LexerError (_ ("\\maininput not allowed outside init files").c_str ()); } \\include { @@ -374,8 +374,8 @@ BOM_UTF8 \357\273\277 } \"[^""]* { // backup rule - error (_ ("end quote missing")); - exit (1); + LexerError (_ ("end quote missing").c_str ()); + yy_pop_state (); } /* Flex picks the longest matching pattern including trailing