+
    KV-jP	  ã                   óT   € ^RI Ht ^ RIHtHt ^RIHt ^ RIt]R,          tR R lt	R# )é   )Ú	LLMatcher)ÚLiteralÚList)Úany_to_larkNc                ó<   € V ^8„  d   QhR\         R\        R\        /# )é   ÚformatÚtextÚreturn)ÚGrammarFormatÚstr)r	   s   "Úi/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/llguidance/_grammar_from.pyÚ__annotate__r      s!   € ÷ 08ñ 08œð 08¬cð 08´cñ 08ó    c                óH  € V R8X  d   \         P                  ! V4      # V R9   d#    \        V4      p\         P                  ! T4      # V R9   d   \         P
                  ! V4      # V R8X  d   \         P                  ! V4      # V R8X  de   \        V\        4      '       d   \        P                  ! V4      pMTpRRP                  R V 4       4      ,           p\         P                  ! V4      # V R	8X  d   V# \	        R
V  24      h  \         d   p\	        RT 24      hRp?ii ; i)a/  
Create a llguidance grammar definition from a given grammar text
of the specified type.

Args:
    format: The format of the grammar text
        "lark": Lark grammar, see https://github.com/guidance-ai/llguidance/blob/main/docs/syntax.md
        "gbnf", "ebnf", "cfg", "grammar": Lark grammar or GBNF grammar, see https://github.com/ggml-org/llama.cpp/blob/master/grammars/README.md
        "json_schema", "json": JSON schema, see https://github.com/guidance-ai/llguidance/blob/main/docs/json_schema.md
        "regex": Regular expression, see https://docs.rs/regex/latest/regex/#syntax
        "choice": JSON-formatted list of strings, e.g. '["a", "b", "c"]'
        "llguidance": JSON object like: {"grammars": [{"lark_grammar": "..."},{"json_schema": {...}}]}
    text: The grammar text

Returns:
    The llguidance grammar definition as a string.
    This can be passed to LLInterpreter or LLMatcher.

Raises:
    ValueError: If the format is not recognized

Note:
    To get "any JSON object" grammar use:
        grammar_from("json_schema", '{"type": "object"}')
Úlarkz1Failed to convert the grammar from GBNF to Lark: NÚregexÚchoicezstart: z | c              3   óN   "  € T F  p\         P                  ! V4      x € K  	  R # 5i)N)ÚjsonÚdumps)Ú.0Úxs   & r   Ú	<genexpr>Úgrammar_from.<locals>.<genexpr>@   s   é € Ð%A¹S¸¤d§j¢j°§m m»Sùs   ‚#%Ú
llguidancezUnknown grammar type: )ÚgbnfÚebnfÚcfgÚgrammar)Újson_schemar   )r   Úgrammar_from_larkr   Ú	ExceptionÚ
ValueErrorÚgrammar_from_json_schemaÚgrammar_from_regexÚ
isinstancer   r   ÚloadsÚjoin)r	   r
   ÚeÚlstr   s   &&   r   Úgrammar_fromr,      s  € ð6 �ÔÜ×*Ò*¨4Ó0Ð0ØÐ3Ô3ð	VÜ˜tÓ$ˆDô ×*Ò*¨4Ó0Ð0ØÐ(Ô(Ü×1Ò1°$Ó7Ð7Ø�ÔÜ×+Ò+¨DÓ1Ð1Ø�ÔÜ�dœC× Ò Ü!ŸZšZ¨Ó-‰CàˆCØ˜5Ÿ:™:Ñ%A¹SÓ%AÓAÕAˆÜ×*Ò*¨4Ó0Ð0Ø�ÔØˆÜ
Ð-¨f¨XÐ6Ó
7Ð7øô! ô 	VÜÐPÐQRÐPSÐTÓUÐUûð	Vús   ¦D ÄD!ÄDÄD!)
r   r   r   r   r    r!   r   r   r   r   )
Ú_libr   Útypingr   r   Úgbnf_to_larkr   r   r   r,   © r   r   Ú<module>r1      s%   ðÝ ß  Ý %Û àð	õ€÷08r   