lua-users home
lua-l archive

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

Take a look at this:

2013/7/1 Harley Laue <>
On Monday, July 01, 2013 05:15:35 PM Milind Gupta wrote:
> Hi,
>     I have a Lua program and I want to provide a terminal to the user which
> can be used as a lua interpreter command line, so that the user can control
> the program using that command line and lua code from that terminal. How do
> I make the interpreter command line in Lua to accommodate incomplete lines?
> Thanks,
> Milin

What it kind of sounds like you're wanting is a Lua REPL (Read–eval–print
loop) similar to running lua without any arguments. If that's the case, you
may want to look at as well (it's under a
permissive license.) Otherwise, you can look directly at the lua source code
to see how it's implemented (in src/lua.c if memory serves.)

Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ