C# Lua Parser / Analyser

此生再无相见时 提交于 2019-12-01 08:46:45

Just for the record:

I went with a comibination of:

http://irony.codeplex.com/ - A Language implementation Kit that can be adapted to parse several languages. (Btw. this one got virtually no ducumentation what so ever... So code-comments no docs... but lots of fun...)

and a customized version of

http://luairony.codeplex.com/ - the Lua Syntax for irony (added some degree error tolerance)

But I gotta admin, both are pretty heavy stuff... and you kind of open up a box of new problems as well as lots of possibilities...

Cheers, Corelgott

Bob Black

This SO question's responses may be helpful.

Easiest way to parse a Lua datastructure in C# / .Net

This isn't quite what you're after, but maybe half of it can provide half the answer.

It converts Lua to C, by parsing the Lua to an AST. You could then extract the info you need from the AST. It's written in Lua, but you already know how to call that :)

Have look here: Lua recipes for LPeg Maybe you can use one - otherwise I would look at using the extended BNF from the documentation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!