diff --git a/lark/lexer.py b/lark/lexer.py index 26213ed..f57ae51 100644 --- a/lark/lexer.py +++ b/lark/lexer.py @@ -384,6 +384,6 @@ class ContextualLexer(Lexer): value, type_ = root_match t = Token(type_, value, e.pos_in_stream, e.line, e.column) - raise UnexpectedToken(t, e.allowed) + raise UnexpectedToken(t, e.allowed, state=e.state) ###}