[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Case sensitivity
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 10 Nov 2005 14:51:55 -0200
> Is there a way to gsub() and get everythig in lua script except
> string literals?
It'll be hard to do it with gsub because you'll need do lexical analysis,
as you have already noticed.
If you really want to make Lua case insensitive, I suggest you change
the lexer directly. It's really quite simple. Edit llex.c and look for
"identifier or reserved word". Right before the assigment to "ts",
change the string to lowercase: the buffer is at luaZ_buffer(ls->buff)
and it contains luaZ_bufflen(ls->buff) characters.
--lhf