summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--bin/c11.l12
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/c11.l b/bin/c11.l
index 18c0879a..98ff03c8 100644
--- a/bin/c11.l
+++ b/bin/c11.l
@@ -83,10 +83,18 @@ register|restrict|return|static|struct|switch|typedef|union|volatile|while |
 	return Comment;
 }
 
+[LUu]?"'"/[^\\] {
+	BEGIN(CharLiteral);
+	yymore();
+}
 [LUu]?"'" {
 	BEGIN(CharLiteral);
 	return String;
 }
+([LU]|u8?)?"\""/[^\\%] {
+	BEGIN(StringLiteral);
+	yymore();
+}
 ([LU]|u8?)?"\"" {
 	BEGIN(StringLiteral);
 	return String;
@@ -109,14 +117,14 @@ register|restrict|return|static|struct|switch|typedef|union|volatile|while |
 }
 
 <CharLiteral>{
-	"'" {
+	[^\\'']*"'" {
 		BEGIN(pop);
 		return String;
 	}
 	[^\\'']+|. { return String; }
 }
 <StringLiteral>{
-	"\"" {
+	[^%\\""]*"\"" {
 		BEGIN(pop);
 		return String;
 	}
9dfbd694d43badef5cc704326dc45b&follow=1'>Handle KCGI_HUPJune McEnroe 2019-01-06Install html filesJune McEnroe