lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Fri, Nov 11, 2011 at 6:26 PM, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> What are the toolset/libraries available in Lua to write the interpretter
> in Lua for a Domain Specific Language?

Can you try to write your DSL *in* Lua? Lua can surprise you with syntax
that does not look like ordinary Lua but in fact is. Could you give us
an example of what your DSL looks like?

The DSL Language I talk is widely used in Automation across world for 15 years of time. They are packaged, we would like to run it as it is on wider platforms like iOS, Android and windows.
So we don't define the DSL.

 
 

> 1. Should I convert the language to Lua byte code convention before
> execution?

That is one path but if you're doing code generation, why not generate Lua
source code first until you get the design right? That said, you can try
Metalua: http://metalua.luaforge.net/


This will be a nice approach and we could try as a first attempt instead of going on complex route. Since I am an amateur in language design, I could not come with any best estimation for these kind of work. Thanks for the link.
 

> 2. The core framework will be written in Lua say for example print "hello"
> in the domain specific language calls a Lua print or similar function
> writing in Lua. I am not sure whether to map to lua function or should I
> generate Lua byte codes.

If your DSL is a simple command-line kind of language, try my lcl
       http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lcl


Again, this will help me to understand the basic. Thanks a lot.

 
If you need help with lcl, please ask me directly.



Sure. I will follow you up.