Roberto Ierusalimschy
7ceb2154ed
Fixed small bugs/issues
- In 'readutf8esc' (llex.c), the overflow check must be done before
shifting the accumulator. It was working because tests were using
64-bit longs. Failed with 32-bit longs.
- In OP_FORPREP (lvm.c), avoid negating an unsigned value. Visual
Studio gives a warning for that operation, despite being well
defined in ISO C.
- In 'luaV_execute' (lvm.c), 'cond' can be defined only when needed,
like all other variables.
6 years ago
Roberto Ierusalimschy
1e0c73d5b6
Changes in the validation of UTF-8
All UTF-8 encoding functionality (including the escape
sequence '\u') accepts all values from the original UTF-8
specification (with sequences of up to six bytes).
By default, the decoding functions in the UTF-8 library do not
accept invalid Unicode code points, such as surrogates. A new
parameter 'nonstrict' makes them accept all code points up to
(2^31)-1, as in the original UTF-8 specification.
6 years ago
Roberto Ierusalimschy
57f5b81da9
Bug: Long brackets with a huge number of '=' causes overflow
A long bracket with too many equal signs can overflow the 'int' used for
the counting and some arithmetic done on the value. Changing the counter
to 'size_t' avoids that. (Because what is counted goes to a buffer, an
overflow in the counter will first raise a buffer-overflow error.)
6 years ago
Roberto Ierusalimschy
f99509581e
Removed extra information from RCS keyword strings
Version numbers and dates (mostly wrong) from RCS keyword strings
removed from all source files; only the file name are kept.
6 years ago
Roberto Ierusalimschy
03c6a05ec8
no more nil-in-table
7 years ago
Roberto Ierusalimschy
4a1612ff9b
new experimental syntax using reserved word 'undef'
7 years ago
Roberto Ierusalimschy
9243c414d9
first version of empty entries in tables
(so that, in the future, tables can contain regular nil entries)
7 years ago
Roberto Ierusalimschy
e2b15aa21d
janitor work on casts
7 years ago
Roberto Ierusalimschy
f96497397a
new type 'StackValue' for stack elements
(we may want to put extra info there in the future)
7 years ago
Roberto Ierusalimschy
b6f87491af
in hash nodes, keys are stored in separate pieces to avoid wasting
space with alignments
8 years ago
Roberto Ierusalimschy
0232fbffbe
now that 'luaO_str2num' always accepts a dot as a radix character,
the lexer does not need to bother with this issue.
9 years ago
Roberto Ierusalimschy
d103312661
details (typos in comments)
9 years ago
Roberto Ierusalimschy
96ec8671b1
macro 'buff2num' replaced by its body (it caused more harm than good
to readability)
9 years ago
Roberto Ierusalimschy
6142e663e4
reuse of 'addinfo' by lexical errors
10 years ago
Roberto Ierusalimschy
48d0674c2e
more consistent use of locale radix character across Lua
10 years ago
Roberto Ierusalimschy
e723c75c02
details (avoid 'lint' warnings)
10 years ago
Roberto Ierusalimschy
29aed28802
detail (use 'luaS_newliteral' when possible)
10 years ago
Roberto Ierusalimschy
5873786e27
small bug (error of "chunk has too many lines" might use 't.token'
before reading the first token)
10 years ago
Roberto Ierusalimschy
28fdbcf393
added include for 'lprefix.h', for stuff that must be added before
any other header file
10 years ago
Roberto Ierusalimschy
4542fb9f78
comments (a few extra quotes around identifiers)
10 years ago
Roberto Ierusalimschy
aef2d711b1
detail
10 years ago
Roberto Ierusalimschy
bdf566a8a3
`name' in comments changed to 'name'
10 years ago
Roberto Ierusalimschy
6b12b82532
added 'l_' prefix for names that can be redefined externally
10 years ago
Roberto Ierusalimschy
f97c64d7bf
macros 'LUA_QL'/'LUA_QL' deprecated
10 years ago
Roberto Ierusalimschy
56d4537879
'$c' in 'lua_pushfstring' prints non-printable characters with
their codes
10 years ago
Roberto Ierusalimschy
34b6664dcb
better to use 'long' to represent UTF-8 code points
10 years ago
Roberto Ierusalimschy
ca41b43f53
type 'TString' refers directly to the structure inside the union
(union used only for size purposes)
10 years ago
Roberto Ierusalimschy
56137d58ff
added check for conversion 'obj2gco' (and corrections for small
problems detected by this check)
10 years ago
Roberto Ierusalimschy
c4eff10322
small improvements concerning 'check_next'
11 years ago
Roberto Ierusalimschy
5018104a60
better error message for unfinished long strings/comments
11 years ago
Roberto Ierusalimschy
c549d4fe64
'lua_strtonum' (and 'luaO_str2num') now return string size, instead of
receiving it
11 years ago
Roberto Ierusalimschy
5388aa9fc0
'luaO_str2d' + 'luaO_str2int' replaced by 'luaO_str2num' (which converts
to float or integer according to the string syntax)
11 years ago
Roberto Ierusalimschy
0b04c561f5
new syntax for Unicode escape '\u{012F}'
11 years ago
Roberto Ierusalimschy
4ea60463f5
UTF-8 encoding exported as format '%U' in 'lua_pushfstring'
11 years ago
Roberto Ierusalimschy
2f3da00e51
added support for UTF-8 escapes
11 years ago
Roberto Ierusalimschy
5a73e3ad9e
simpler way to create messages for errors in escape sequences
11 years ago
Roberto Ierusalimschy
1ea2d20f74
first implementation of '<<', '>>', and '~' (bitwise not)
11 years ago
Roberto Ierusalimschy
8ef9e8460e
bug (GC can collect long identifier during parser) + change (using
a single constant table for all functions in a chunk)
11 years ago
Roberto Ierusalimschy
0df6635711
"fixed" objects kept in a separated list (instead of being kept in
'allgc' list with a bit marking them)
11 years ago
Roberto Ierusalimschy
130c0e40e0
new constant 'MAX_SIZE', distinct from 'MAX_SIZET', for sizes visible
from Lua; these must fit in a lua_Integer
12 years ago
Roberto Ierusalimschy
36e8771076
'luaO_str2int' more generic: accepts white spaces around the numeral
and handles signal
12 years ago
Roberto Ierusalimschy
a2f5c28a80
new operation '//' (integer division)
12 years ago
Roberto Ierusalimschy
1294b09d8e
first implementation of literal integers (no constant folding yet)
12 years ago
Roberto Ierusalimschy
75250a237c
typos in comments
12 years ago
Roberto Ierusalimschy
eecc1491f3
added some comments
12 years ago
Roberto Ierusalimschy
291f564485
field 'reserved' -> 'extra' (may be used for other purposes too)
13 years ago
Roberto Ierusalimschy
76eab106df
bug: Lexical gets confused with some combination of arithmetic
operators and hexadecimal numbers
13 years ago
Roberto Ierusalimschy
6d8b672094
more uses of 'l_noret'
13 years ago
Roberto Ierusalimschy
51471ba748
comments about use of 'luaH_set'
13 years ago
Roberto Ierusalimschy
ea46b750dc
comment
13 years ago