From 02e26344abf879b8cb70dbb3f7df10b5840003ab Mon Sep 17 00:00:00 2001 From: ochafik Date: Tue, 11 Jun 2024 04:41:56 +0100 Subject: [PATCH] Update json-schema-to-grammar.cpp --- common/json-schema-to-grammar.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/json-schema-to-grammar.cpp b/common/json-schema-to-grammar.cpp index dfcbd58ed..ebcd46c16 100644 --- a/common/json-schema-to-grammar.cpp +++ b/common/json-schema-to-grammar.cpp @@ -390,8 +390,10 @@ private: /* Returns a rule that matches a JSON string that is none of the provided strings + not_strings({"a"}) + -> ["] ( [a] char+ | [^"a] char* )? ["] space not_strings({"and", "also"}) - -> ["] ( [a] ([l] ([s] ([^"o]) | [^"s]) | [n] ([^"d]) | [^"ln]) | [^"a] ) char* ["] + -> ["] ( [a] ([l] ([s] ([o] char+ | [^"o] char*) | [^"s] char*) | [n] ([d] char+ | [^"d] char*) | [^"ln] char*) | [^"a] char* )? ["] space */ std::string _not_strings(const std::vector & strings) {