From 2a12b7b4a23ccfe7b1dc5e0e769fab1aa9124474 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Fri, 11 Jan 2013 23:20:40 +0100 Subject: [PATCH] Issue 3102: Allow EOF to occur in the middle of a line comment --- lily/lexer.ll | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lily/lexer.ll b/lily/lexer.ll index df05b45c38..9b1d6eb5aa 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -217,16 +217,10 @@ BOM_UTF8 \357\273\277 "%{" { yy_push_state (longcomment); } - %[^{\n\r][^\n\r]*[\n\r] { + %[^{\n\r][^\n\r]*[\n\r]? { (void) YYText_utf8 (); } - %[^{\n\r] { // backup rule - (void) YYText_utf8 (); - } - %[\n\r] { - } - %[^{\n\r][^\n\r]* { - (void) YYText_utf8 (); + %[\n\r]? { } {WHITE}+ { -- 2.39.5