[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: /usr/bin/env and the Lua bytecode format
- From: "Luiz Carlos Silveira" <luiz@...>
- Date: Thu, 2 Aug 2001 19:42:38 -0300
> And this should not be part of llex.c in the first place, it
> should be part
> of lua.c .. It has nothing to do with the lexer, and this is
> my whole point.
> This is a function that releated to the standalone version of
> lua, not to
> the core library. Ofcause it might be easier to code it in
> the library but
> that does not makes it more correct.
I agree. It's not part of the language, so what would it do in the perser (or lexer) ?
For a patch, it is ok, but not for a solution.
If in macintosh (I don't know nothing about the macintosh operating system, sorry) we need to put @ instead of #, the parser
wouldn't be parsing all the time, so it wouldn't be just a parser, it would be something else.
To choose how to execute lua code is a task to the stand-alone interpreter: if instructions will get executed when we press enter
(if the process is reading from a terminal) or when the file ends; to translate "=" into "print" so that a line like "=1+1" yields 2
(as someone has mentioned) and to skip the first line or the lines after an eof mark.
Suppose you write a lua server that runs lua code it receives from the network. Should the parser or the client distinguish among
what is protocol data and what is lua code?