What LarkOptions.lexer accepts for a custom lexer: a class (constructed once as new Cls(conf)), a factory function (called once as f(conf)), or a ready instance. conf is the compiled LexerConf (Lark's lexer_type(lexer_conf) handoff).
LarkOptions.lexer
new Cls(conf)
f(conf)
conf
LexerConf
lexer_type(lexer_conf)
What
LarkOptions.lexeraccepts for a custom lexer: a class (constructed once asnew Cls(conf)), a factory function (called once asf(conf)), or a ready instance.confis the compiledLexerConf(Lark'slexer_type(lexer_conf)handoff).