From 180b2b44d88000f51093c1a989caa000c8057379 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Thu, 24 Jan 2013 13:07:10 +0100 Subject: [PATCH] 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). --- lily/lexer.ll | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.39.5