lua-users home
lua-l archive

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


Thanks Luiz. That should do it!!

ltokenp uses a separate Lua interpretor. How different is it from the usual Lua 5.3.x code and can it be merged?

Thanks,
Abhijit

On Thu, Nov 8, 2018 at 4:24 PM Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> I want to support some custom syntax like the following in a Lua console I have implemented:
>
> !ls -lrt
> or
> @name{....}
>
> The exclamation mark and "@" are not valid Lua syntax so currently I detect them in the typed string and replace with valid Lua code - macro pre-processing.
>
> But is there a way to make it valid given the flexibility of Lua to make DSLs.

Experiment with ltokenp. See
http://lua-users.org/lists/lua-l/2018-07/msg00683.html.