ljleb / prompt-fusion-extension

auto1111 webui extension for all sorts of prompt interpolations!
MIT License
259 stars 16 forks source link

rewrite parser #42

Closed ljleb closed 1 year ago

ljleb commented 1 year ago

closes #16 and #40

Drop lark to use a recursive-descent parser instead of bottom-up LALR. Kind of annoying but I could not find a way to make lark branch out on : depending on the context tokens. Also I couldn't find a way to add parens and square brackets to the text_expr rule without prefixing with a backslash \.

All parser tests pass, if another problem is encountered with the parser I'll add more test cases.