read_string
function · lua · boundary
- Address
0x7002a0· 1093 bytes, up to0x7006e4- Meaning
- Reads a quoted string, decoding its escapes
- Confidence
- verified, proof one
- Finding
- lua/compiler#reading-tokens
Finding: Reading tokens in lua: the compiler
luaX_lex skips newlines, blanks and comments: -- to the end of the line, or --[[ to the
matching ]]. It returns [[-strings and quoted strings as 286, numbers as 285, names as 278 or
their reserved token, .. 279, ... 280, == 281, >= 282, <= 283, ~= 284, the end as 287,
and any other character as itself, raising invalid control char for a control character. Long
brackets nest, and a newline right after the opening is dropped. A quoted string decodes \a \b \f \n \r \t \v, an escaped newline and up to three decimal digits, at most 255.
| function | name | decided by |
|---|---|---|
0x6ff610 | luaX_lex | byte-table switch on the character plus 1 below 0x80 (0x6ff61c..0x6ff62c), comments (0x6ff65e..0x6ff6bf), blanks (0x6ff709), digits (0x6ffa48..0x6ffa77), names (0x6ffa85..0x6ffb5f), control characters (0x6ffabb..0x6ffafd) |
0x6ffc70 | readname | buffer room (0x6ffc7c, 0x6ffc96..0x6ffca4), isalnum or _ (0x6ffcd8..0x6ffd07), terminating zero (0x6ffd0e) |
0x6ffd20 | read_numeral | leading . (0x6ffd4f), digits (0x6ffd54), .. after the point (0x6ffdca..0x6ffe4c), exponent (0x6ffec9..0x6fff0b), luaO_str2d (0x6fffa0), malformed number (0x6fffa9) |
0x700010 | read_long_string | first newline (0x70006c), switch (0x7000a5), end of stream (0x7000b3..0x7000d5), nesting (0x70011b, 0x700196), comment buffer reset (0x7001b5), luaS_newlstr (0x700211) |
0x7002a0 | read_string | end of stream or newline (0x70031d, 0x700326), escape switch (0x70039c), digits (0x7005af..0x700612), above 255 (0x700614..0x700639), luaS_newlstr (0x7006d2) |
The derivation is in the doc.
Callers 1
- luaX_lex lua
Callees 6
- __isctype crt
- luaS_newlstr lua
- luaZ_fill lua
- luaZ_openspace lua
- inclinenumber lua
- luaX_lexerror lua
Calls and jumps by a bare address, from tables/calls.tsv.