bmatsuo / lark

A self-contained Lua scripting environment targeting build systems and source code management

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is Lark a good library for extending existing languages with new syntax? (transpiling)

oxysoft opened this issue · comments

Hi, I am new to language parsing and would like to know if Lark is good for my use-case. We are currently making a game in C# with Unity and using Lua for game scripting. We have already made a few language extensions to it through regex only. It works but we would like to go a bit further and regex is limited. I have seen how Lark can quickly and succinctly define language constructs and parse a tree, as with the json example. Is it possible to use this for matching on source code, and then using the tree to rewrite parts of it to a new string?

Apologies if this is not the right place for this question.

I think it will be easier for us to modify our Lua library instead. Still curious about Lark though