3 ms·
I think they specify "INDENT foo DEDENT" and the lexer tracks indentation and issues INDENT/DEDENT as appropriate.
by TazeTSchnitzel 12y ago
I think they specify "INDENT foo DEDENT" and the lexer tracks indentation and issues INDENT/DEDENT as appropriate.
- falcolas 12y agoThis is correct. A bit of state (an indentation width stack) in the lexer creates the block boundaries as clearly for the interpreter as normal braces does. Any problems in parsing are typically only encountered by stateless parsers.