问题描述
首先第一件事情;
我在C#编写一个小LUA的IDE。该代码执行是由一个名为大会做LuaInterface。在代码编辑由Scintilla的端口和放大器进行;半径/ UI界面是通过扩展IDesignSurfaceExt的Visual Studio(单程代码生成)。文件处理是通过一点点作为一个项目包文件SQL的精简版-DB提供。
I am writing a little LUA-Ide in C#. The code execution is done by an Assembly named LuaInterface. The code-editing is done by a Scintilla-Port & the RAD / UI Interface is via the extensible IDesignSurfaceExt Visual Studio (one way code generation). File handling is provided by a little sql-lite-db used as a project-package-file.
因此,所有的一切我已经得到了我想要的一切在一起..
So all in all i've got everything i need together...
未解唯一的问题是LUA解析器/词法分析器。我不希望加载和放大器;执行的代码!我只是想解析包含Lua代码字符串并获得有关它像功能和全局变量的一些信息。我真的不想完全地写解析器自己...(我讨厌正则表达式 - 我得到错误的一切的时候^^)
The only problem unsolved is the parser / lexer for lua. I do not want to load & execute the code! I just want to parse the String containing the Lua code and get some information about it like function and global vars. I really don't want to write the parser completly myself... (I hate regex - I get the wrong all the time ^^)
任何人有一个链接一个.NET LUA解析器躺在附近
Anybody got a link to a .net lua parser lying around?
只是为了澄清 - 我的仅希望分析中的代码在此点 - 我不要 wnat为运行是
Just to clarify - I only want to analyse the code at this point - I dont wnat to run it!
感谢
Corelgott
Corelgott
推荐答案
只是为了记录:
我的comibination了:
I went with a comibination of:
- 一个语言实现套件,可适合于分析几种语言。 (顺便说一句,这其中有几乎没有ducumentation什么那么......所以,代码注释文档没有......但很多的乐趣......)
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...)
和定制的
- Lua的语法讽刺(增加一定程度的误差容限)
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...
干杯,Corelgott
Cheers, Corelgott
这篇关于C#中的Lua解析器/分析仪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!