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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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 {