Added support for . (any character) token in grammar engine. (#6467)

* Added support for . (any characer) token in grammar engine.

* Add integration tests for any-character symbol.
This commit is contained in:
Clint Herron
2024-06-06 06:08:52 -07:00
committed by GitHub
parent a143c04375
commit ad675e1c67
4 changed files with 52 additions and 2 deletions

View File

@@ -365,6 +365,9 @@ extern "C" {
// modifies a preceding LLAMA_GRETYPE_CHAR or
// LLAMA_GRETYPE_CHAR_RNG_UPPER to add an alternate char to match ([ab], [a-zA])
LLAMA_GRETYPE_CHAR_ALT = 6,
// any character (.)
LLAMA_GRETYPE_CHAR_ANY = 7,
};
typedef struct llama_grammar_element {