From bc222f39334f7ad7bf5e09c8473a2998cc5fe9a6 Mon Sep 17 00:00:00 2001 From: Lemon73-Computing Date: Tue, 9 Apr 2024 21:56:02 +0900 Subject: [PATCH 1/3] add: emotion support --- AnovSyntax/Anov.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/AnovSyntax/Anov.cs b/AnovSyntax/Anov.cs index e963ed0..6c1e210 100644 --- a/AnovSyntax/Anov.cs +++ b/AnovSyntax/Anov.cs @@ -12,10 +12,22 @@ public static void Read(string str) { Match match; - // Read "- people-name" - match = Regex.Match(str, @"- (.*)"); + // Read "- people-name / emotion" + match = Regex.Match(str, @"- (.*?)/"); if (match.Success) Console.Write(match.Groups[1].Value.Trim()); + else + { + // Read "- people-name" + match = Regex.Match(str, @"- (.*)"); + if (match.Success) + Console.Write(match.Groups[1].Value.Trim()); + } + + // Read "/ emotion" + match = Regex.Match(str, @"/ (.*)"); + if (match.Success) + Console.Write(" (" + match.Groups[1].Value.Trim() + ")"); // Read "[conversatioc-content]" match = Regex.Match(str, @"\[(.*?)\]"); From 6b1d6be61ead749de4c5e8b386870373b4d99623 Mon Sep 17 00:00:00 2001 From: Lemon73-Computing Date: Tue, 9 Apr 2024 21:56:17 +0900 Subject: [PATCH 2/3] add: emotion into sample file --- Sample/sample.anov | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sample/sample.anov b/Sample/sample.anov index cb56a7e..cec444d 100644 --- a/Sample/sample.anov +++ b/Sample/sample.anov @@ -1,4 +1,4 @@ -- Alice +- Alice / happy [Hello everyone!!] - Bob From 09ac94a64edb2b125403426e958e85fe89092973 Mon Sep 17 00:00:00 2001 From: Lemon73-Computing Date: Tue, 9 Apr 2024 21:57:16 +0900 Subject: [PATCH 3/3] add: unsupported features --- AnovSyntax/Anov.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/AnovSyntax/Anov.cs b/AnovSyntax/Anov.cs index 6c1e210..e137827 100644 --- a/AnovSyntax/Anov.cs +++ b/AnovSyntax/Anov.cs @@ -12,6 +12,24 @@ public static void Read(string str) { Match match; + // Unsupported + // Read "> place" + match = Regex.Match(str, @"> (.*)"); + if (match.Success) + Console.WriteLine(""); + + // Unsupported + // Read "bgm: background-music" + match = Regex.Match(str, @"bgm: (.*)"); + if (match.Success) + Console.WriteLine(""); + + // Unsupported + // Read "movie: movie" + match = Regex.Match(str, @"movie: (.*)"); + if (match.Success) + Console.WriteLine(""); + // Read "- people-name / emotion" match = Regex.Match(str, @"- (.*?)/"); if (match.Success)