lua-users home
lua-l archive

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

Hi Rob Kendrick,

Thanks for your suggestions..

Is the below example is correct to generate the *.c file from *.lua

Where lua - interpreter
Lua2c.lua -utility to convert to *.c file.
ftp.lua  - file to convert to ftp.c file.

Lua lua2c.lua ftp.lua

Thanks & Regards,


-----Original Message-----
[] On Behalf Of Rob Kendrick
Sent: Monday, July 21, 2008 6:18 PM
Subject: Re: How to Generate c source code from LUA source code
usinglua2c.lua utility.(ex:-from .lua to .c file)

On Mon, 21 Jul 2008 18:08:22 +0530
<> wrote:

> Hi ,
> I want to convert *.lua files to *.c/*.h files in vxWorks platform.
> could you please suggest some utilities those convert from *.lua to 
> *.c files.And how to invoke compilers with that utilities.
> i have got lua2c.lua file which converts *.lua file to *.c file. But i

> don't know how to invoke the compiler to generate *.c files.

If you want to convert some Lua sources to C sources in order to include
them in a binary, isn't that what lua2c already does?

lua2c generates C source code from Lua source/luac output.  You then
pass its output to your compiler, or #include it depending on the
precise nature of your lua2c implementation.


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.