5 ms·
Are INDENT and DEDENT here describing whitespace sensitivity in the vein of Python, which "uses whitespace to delimit control flow blocks"[1] (elsewhere[2]: "Py
by cxr 5y ago
Are INDENT and DEDENT here describing whitespace sensitivity in the vein of Python, which "uses whitespace to delimit control flow blocks"[1] (elsewhere[2]: "Python uses whitespace indentation, rather than curly brackets or keywords, to delimit blocks")?
We're specifically talking about the subset of languages where these blocks _don't_ have their own delimiters[3].
1. https://en.wikipedia.org/w/index.php?title=Python_syntax_and https://en.wikipedia.org/w/index.php?title=Python_syntax_and...
2. https://en.wikipedia.org/w/index.php?title=Python_(programmi https://en.wikipedia.org/w/index.php?title=Python_(programmi...
3. There is a reading of Bob's original comment such that it's suggesting that Python and end-if languages are among languages without them (or something—I can't make total sense of that part of the comment; it gets kind of garden path-y), but they're not.
- xigoi 5y agoIt doesn't matter how indentation is parsed. What I wanted to say that you can simply replace "elif" with "else" "if" in the grammar.