From fee3b13a83abaf23c9f9d91cba71040c2f660921 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Fri, 26 Oct 2012 14:33:13 +0200 Subject: [PATCH] lexer.ll: duplicate a few quotes in character sets to help syntax highlighting This uses regular expressions like [^''] rather than [^'] in order to keep the confusion of editors like Emacs tolerable. --- lily/lexer.ll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lily/lexer.ll b/lily/lexer.ll index bad1cd7954..9e4941674a 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -159,7 +159,7 @@ WHITE [ \n\t\f\r] HORIZONTALWHITE [ \t] BLACK [^ \n\t\f\r] RESTNAME [rs] -ESCAPED [nt\\'"] +ESCAPED [nt\\''""] EXTENDER __ HYPHEN -- BOM_UTF8 \357\273\277 @@ -247,7 +247,7 @@ BOM_UTF8 \357\273\277 \\sourcefileline{WHITE}* { yy_push_state (sourcefileline); } -\"[^"]*\" { /* got the version number */ +\"[^""]*\" { /* got the version number */ string s (YYText_utf8 () + 1); s = s.substr (0, s.rfind ('\"')); -- 2.39.5