luaX_lexerror
function · lua · boundary
- Address
0x6fffd0· 63 bytes, up to0x70000e- Meaning
- Raises a lexical error near the buffer text, or near end of file
- Confidence
- verified, proof one
- Finding
- lua/compiler#lexer-errors-and-limits
Finding: Lexer errors and limits in lua: the compiler
luaX_init interns the 21 reserved words as fixed strings that carry their index plus 1, which the
lexer turns into a token. A syntax error reads <chunk>:<line>: <message> near `<token>': the
token is the name's text, the buffer for a number or string, or the token's text, and the chunk is
shortened by luaO_chunkid to 80 bytes. Counts are limited by luaX_checklimit with too many %s (limit=%d), lines to 0x7ffffffd per chunk.
| function | name | decided by |
|---|---|---|
0x6ff400 | luaX_init | 21 words (0x6ff42b), token2string (0x6ff407), luaS_newlstr (0x6ff41d), fixed bit (0x6ff422), index plus 1 (0x6ff42e) |
0x6ff440 | luaX_checklimit | compare (0x6ff446), the format (0x6ff455), luaX_syntaxerror (0x6ff467) |
0x6ff480 | luaX_errorline | luaO_chunkid 80 (0x6ff498), s_textSDSNearS (0x87217c, 0x6ff4aa), luaD_throw 3 (0x6ff4bf) |
0x6ff530 | luaX_error | the current line (0x6ff533), luaX_errorline (0x6ff53b) |
0x6ff4d0 | luaX_syntaxerror | name (0x6ff515), number or string (0x6ff4e1..0x6ff4f4), luaX_token2str (0x6ff503) |
0x6fffd0 | luaX_lexerror | end gives luaX_token2str (0x6fffdf, 0x6fffe5), else the buffer (0x6ffffa) |
0x6ff550 | luaX_token2str | below 257 %c (0x6ff550..0x6ff562), else token2string (0x6ff56b) |
0x6ffc20 | inclinenumber | next character (0x6ffc23..0x6ffc40), line count (0x6ffc57), lines in a chunk (0x6ffc5a) |
The derivation is in the doc.
Callers 3
- read_numeral lua
- read_long_string lua
- read_string lua
Callees 2
- luaX_error lua
- luaX_token2str lua
Calls and jumps by a bare address, from tables/calls.tsv.