[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: /usr/bin/env and the Lua bytecode format
- From: ramsdell@... (John D. Ramsdell)
- Date: 03 Aug 2001 07:08:48 -0400
erik@hougaard.com (Erik Hougaard) writes:
> ----- Original Message -----
> > I think you should *run* (not walk) over to your pristine Lua 4.0 source
> > tree and apply this patch to llex.c:
> > That's the current ANSI C implementation of the support for this
> > Unix-centric scripting function. And it affects the lexing of every Lua
> > chunk, not just files. You're already using it if you still have the
> > parser. Oh, and by removing this, you'll regain ~100 bytes of sparc code.
>
> 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 incorrect. The '#!' test for ascii input must be part of of
the standard libraries, and not just implemented in lua.c. Otherwise,
a file that starts with '#!' cannot be loaded using dofile. Surely
you are not asking that the interpreter use a different version of
dofile, are you?
Of course, another solution is to allow the use of '#' as another
comment start indicator, but that is not a serious proposal.
John
- References:
- Lua 4.1 Speed, Denis Lamarche
- /usr/bin/env and the Lua bytecode format, John D. Ramsdell
- Re: /usr/bin/env and the Lua bytecode format, Erik Hougaard
- Re: /usr/bin/env and the Lua bytecode format, John D. Ramsdell
- Re: /usr/bin/env and the Lua bytecode format, Erik Hougaard
- Re: /usr/bin/env and the Lua bytecode format, Julian Squires
- Re: /usr/bin/env and the Lua bytecode format, John D. Ramsdell
- Re: /usr/bin/env and the Lua bytecode format, Erik Hougaard
- Re: /usr/bin/env and the Lua bytecode format, Jay Carlson
- Re: /usr/bin/env and the Lua bytecode format, Erik Hougaard
- Re: /usr/bin/env and the Lua bytecode format, Jay Carlson
- Re: /usr/bin/env and the Lua bytecode format, Erik Hougaard