[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (beta-rc5) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 5 Jul 2011 13:07:00 -0300
> On Tuesday, July 5, 2011, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
> > How many scripts do you think will fail with this addition of '\x'?
>
> Related: Approx 1% of scripts use undefined escape sequences:
> http://lua-users.org/lists/lua-l/2010-10/msg00449.html
None of them use '\x' or '\u'.
Both '\[' and '\]' were legal in 5.0.
A common case is '\?'. I remember that there were talks about adding
this as an official escape sequence (meaning '?'), but I do not remember
why. I could not find it in any manual, but since 1998/03/20 (Lua 3.1)
the source code has assumed that it is valid:
** $Id: llex.c,v 1.18 1998/03/20 14:18:18 roberto Exp $
case '\\': case '"': case '\'': case '?': {
save(LS->current);
next(LS);
break;
}
** $Id: llex.c,v 2.49 2011/06/23 14:54:48 roberto Exp $
c = ls->current; /* handles \\, \", \', and \? */
-- Roberto