aboutsummaryrefslogtreecommitdiff
path: root/llex.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fixed conversion warnings from clangRoberto Ierusalimschy2025-01-141-1/+6
| | | | | Plus some other details. (Option '-Wuninitialized' was removed from the makefile because it is already enabled by -Wall.)
* Scanner doesn't need to anchor reserved wordsRoberto Ierusalimschy2024-12-301-11/+19
|
* Scanner and parser use different tables for constantsRoberto Ierusalimschy2024-12-171-9/+6
| | | | | | | | | | Moreover, each function being parsed has its own table. The code is cleaner when each table is used for one specific purpose: The scanner uses its table to anchor and unify strings, mapping strings to themselves; the parser uses it to reuse constants in the code, mapping constants to their indices in the constant table. A different table for each task avoids false collisions.
* Added gcc option '-Wconversion'Roberto Ierusalimschy2024-07-271-1/+1
| | | | | No warnings for standard numerical types. Still pending alternative numerical types.
* Cleaning of llimits.hRoberto Ierusalimschy2024-06-201-1/+6
| | | | | | Several definitions that don't need to be "global" (that is, that concerns only specific parts of the code) moved out of llimits.h, to more appropriate places.
* Some cleaning in the new table APIRoberto Ierusalimschy2023-05-161-5/+5
|
* Detailsv5.4.5Roberto Ierusalimschy2023-04-181-1/+1
| | | | Typos in comments and details in the manual.
* Stack indices changed to union'sRoberto Ierusalimschy2022-10-291-2/+2
| | | | | That will allow to change pointers to offsets while reallocating the stack.
* Changes in the API of 'luaH_set' and related functionsRoberto Ierusalimschy2020-12-041-14/+17
| | | | | Functions to set values in a table (luaH_set, luaH_newkey, etc.) receive the new value, instead of returning a slot where to put the value.
* CommentsRoberto Ierusalimschy2020-10-221-12/+13
|
* DetailRoberto Ierusalimschy2020-09-151-1/+0
| | | | Code for multi-character tokens can start right after maximum char.
* Changed internal representation of booleansRoberto Ierusalimschy2020-01-061-1/+1
| | | | | | | Instead of an explicit value (field 'b'), true and false use different tag variants. This avoids reading an extra field and results in more direct code. (Most code that uses booleans needs to distinguish between true and false anyway.)
* DetailsRoberto Ierusalimschy2019-08-011-7/+13
| | | | | - removed rule about RCS from makefile - comments and nitpicking in 'llex.c'
* DetailsRoberto Ierusalimschy2019-06-031-2/+2
| | | | | Several small changes from feedback on 5.4 alhpa rc1 (warnings, typos in the manual, and the like)
* A few more improvements in 'luaO_pushvfstring'Roberto Ierusalimschy2019-05-031-1/+4
| | | | | | | | - 'L' added to the 'BuffFS' structure - '%c' does not handle control characters (it is not its business. This now is done by the lexer, who is the one in charge of that kind of errors.) - avoid the direct use of 'l_sprintf' in the Lua kernel
* Syntax should not allow numbers touching identifiersRoberto Ierusalimschy2019-04-091-0/+2
| | | | Code like 'a = 1print()' should not be accepted.
* Fixed small bugs/issuesRoberto Ierusalimschy2019-03-251-1/+1
| | | | | | | | | | | | | - 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.
* Changes in the validation of UTF-8Roberto Ierusalimschy2019-03-151-1/+1
| | | | | | | | | | | 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.
* Bug: Long brackets with a huge number of '=' causes overflowRoberto Ierusalimschy2018-12-141-14/+16
| | | | | | | 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.)
* Removed extra information from RCS keyword stringsRoberto Ierusalimschy2018-08-231-1/+1
| | | | | Version numbers and dates (mostly wrong) from RCS keyword strings removed from all source files; only the file name are kept.
* no more nil-in-tableRoberto Ierusalimschy2018-04-041-2/+2
|
* new experimental syntax using reserved word 'undef'Roberto Ierusalimschy2018-03-071-2/+2
|
* first version of empty entries in tablesRoberto Ierusalimschy2018-02-231-2/+2
| | | | (so that, in the future, tables can contain regular nil entries)
* janitor work on castsRoberto Ierusalimschy2018-01-281-2/+2
|
* new type 'StackValue' for stack elementsRoberto Ierusalimschy2017-06-291-2/+2
| | | | (we may want to put extra info there in the future)
* in hash nodes, keys are stored in separate pieces to avoid wastingRoberto Ierusalimschy2017-06-091-3/+3
| | | | space with alignments
* now that 'luaO_str2num' always accepts a dot as a radix character,Roberto Ierusalimschy2016-05-021-33/+2
| | | | the lexer does not need to bother with this issue.
* details (typos in comments)Roberto Ierusalimschy2015-11-191-2/+2
|
* macro 'buff2num' replaced by its body (it caused more harm than goodRoberto Ierusalimschy2015-10-281-5/+3
| | | | to readability)
* reuse of 'addinfo' by lexical errorsRoberto Ierusalimschy2015-05-221-4/+3
|
* more consistent use of locale radix character across LuaRoberto Ierusalimschy2015-04-031-7/+2
|
* details (avoid 'lint' warnings)Roberto Ierusalimschy2015-03-281-5/+7
|
* detail (use 'luaS_newliteral' when possible)Roberto Ierusalimschy2015-03-031-3/+3
|
* small bug (error of "chunk has too many lines" might use 't.token'Roberto Ierusalimschy2014-11-141-2/+3
| | | | before reading the first token)
* added include for 'lprefix.h', for stuff that must be added beforeRoberto Ierusalimschy2014-11-021-4/+6
| | | | any other header file
* comments (a few extra quotes around identifiers)Roberto Ierusalimschy2014-10-301-2/+2
|
* detailRoberto Ierusalimschy2014-10-261-2/+2
|
* `name' in comments changed to 'name'Roberto Ierusalimschy2014-10-251-7/+7
|
* added 'l_' prefix for names that can be redefined externallyRoberto Ierusalimschy2014-10-221-4/+4
|
* macros 'LUA_QL'/'LUA_QL' deprecatedRoberto Ierusalimschy2014-10-171-4/+4
|
* '$c' in 'lua_pushfstring' prints non-printable characters withRoberto Ierusalimschy2014-10-101-4/+3
| | | | their codes
* better to use 'long' to represent UTF-8 code pointsRoberto Ierusalimschy2014-10-011-3/+3
|
* type 'TString' refers directly to the structure inside the unionRoberto Ierusalimschy2014-07-181-6/+6
| | | | (union used only for size purposes)
* added check for conversion 'obj2gco' (and corrections for smallRoberto Ierusalimschy2014-07-181-3/+3
| | | | problems detected by this check)
* small improvements concerning 'check_next'Roberto Ierusalimschy2014-05-211-25/+39
|
* better error message for unfinished long strings/commentsRoberto Ierusalimschy2014-05-111-4/+8
|
* 'lua_strtonum' (and 'luaO_str2num') now return string size, instead ofRoberto Ierusalimschy2014-05-011-2/+2
| | | | receiving it
* 'luaO_str2d' + 'luaO_str2int' replaced by 'luaO_str2num' (which convertsRoberto Ierusalimschy2014-04-301-27/+25
| | | | to float or integer according to the string syntax)
* new syntax for Unicode escape '\u{012F}'Roberto Ierusalimschy2014-02-141-5/+8
|
* UTF-8 encoding exported as format '%U' in 'lua_pushfstring'Roberto Ierusalimschy2014-02-061-18/+7
|