Skip to content

Commit

Permalink
Clone and patch initial parse state in the parser example
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonwillard authored and rlouf committed Jul 19, 2023
1 parent bb96179 commit 2d3bb54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ParserLogitsProcessor(LogitsProcessor):

def __init__(self, parser):
ip = parser.parse_interactive("")
self.parser_state = ip.parser_state
self.parser_state = copy_parser_state(ip.parser_state)
self.states_stack = [self.parser_state]
self.token_seq = None
self.token_idx = 0
Expand Down

0 comments on commit 2d3bb54

Please sign in to comment.