check
function · lua · boundary
- Address
0x6fd140· 29 bytes, up to0x6fd15c- Meaning
- Requires the given token and skips it
- Confidence
- verified, proof one
- Finding
- lua/compiler#parser-tokens-and-checks
Finding: Parser tokens and checks in lua: the compiler
The parser reads tokens one ahead through next, which takes a held lookahead token before it asks
the lexer, and lookahead, which reads that token. testnext skips a token when it is the one
given, check requires it, and check_match requires a closing token and names the opening one
and its line when they differ. Names and string constants become expression descriptors of 20 bytes:
kind, index, auxiliary index, true list and false list.
| function | name | decided by |
|---|---|---|
0x6fca40 | next | lookahead test against 287 (0x6fca49), lookahead copied in (0x6fca5c), luaX_lex (0x6fca7f) |
0x6fd580 | lookahead | luaX_lex into the lookahead slot (0x6fd586, 0x6fd58b) |
0x6fccf0 | testnext | token compare (0x6fccf0), next (0x6fccf5) |
0x6fd140 | check | testnext (0x6fd146), tail jmp to error_expected (0x6fd155) |
0x6fce90 | check_match | testnext (0x6fce99), same line gives error_expected (0x6fcea8, 0x6fceb0), else the line format (0x6fced2) |
0x6fcef0 | error_expected | `%s' expected (0x6fcefc), tail jmp to luaX_syntaxerror (0x6fcf0f) |
0x6fd660 | str_checkname | name test (0x6fd663), <name> expected (0x6fd66d), next (0x6fd67c) |
0x6fd640 | checkname | str_checkname (0x6fd646), codestring (0x6fd650) |
0x6fd400 | codestring | luaK_stringK (0x6fd40c), kind 4 (0x6fd412) |
0x6fd3e0 | init_exp | both jump lists -1 (0x6fd3e6, 0x6fd3e9), kind and index (0x6fd3ef, 0x6fd3f1) |
The derivation is in the doc.
Callers 10
- whilestat lua
- constructor lua
- recfield lua
- luaY_index lua
- body lua
- fornum lua
- forbody lua
- forlist lua
- test_then_block lua
- assignment lua
Callees 2
- testnext lua
- error_expected lua
Calls and jumps by a bare address, from tables/calls.tsv.