lua-users home
lua-l archive

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


On Jan 31, 2008 5:44 PM, Mark Hamburg <mhamburg@adobe.com> wrote:
> Actually, can you do the folding of the string concatenation in the lexer?
> Instead of eliminating "< whitespace >" one would patch the lexer to
> eliminate "< optional whitespace >..< optional whitespace >".

>From my limited understanding of it, I think it would just get too
messy. You'd have to look ahead two tokens: gotta see if the following
token is a '..' (and not '...' or '.314'), then hold onto that while
you check beyond that for a string delimiter. It would be a major hack
(AFAIK), whereas just skipping space between strings falls out of the
existing code with no effort.