Skip to content

How to use lazy grammars? #12110

Answered by ochafik
leon-herbrik asked this question in Q&A
Feb 28, 2025 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

Hi @leon-herbrik, the grammar gets anything from the trigger, please try:

root ::= "</think>" "Final JSON:\n" json

(alsoo, .* will match anything eagerly and defeat the rest of the grammar, this is what lazy grammers are working around :-))

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@ochafik
Comment options

ochafik Mar 6, 2025
Collaborator

Answer selected by leon-herbrik
@leon-herbrik
Comment options

@ochafik
Comment options

ochafik Mar 6, 2025
Collaborator

@leon-herbrik
Comment options

@ochafik
Comment options

ochafik Mar 6, 2025
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants