Dangling else

The dangling else is a problem in programming of parser generators in which an optional else clause in an if–then(–else) statement can make nested conditional statements ambiguous. Formally, the reference context-free grammar of the language is ambiguous, meaning there is more than one correct parse tree.

Source: Wikipedia — Dangling else (CC BY-SA 4.0)

Dangling else

The dangling else is a problem in programming of parser generators in which an optional else clause in an if–then(–else) statement can make nested conditional statements ambiguous. Formally, the reference context-free grammar of the language is ambiguous, meaning there is more than one correct parse tree.

Source: Wikipedia "Dangling else" · CC BY-SA 4.0

Share this article: X · Bluesky
Privacy Policy