lookahead
8.2
Ability to see symbols after the current one to decide which rule applies
- noun
- /ˈlʊkəˌhɛd/
- Specialized
- Condition register lookahead logic based on the arithmetic operations, rotate zero-detect, and a sign bit can bypass into the conditional branch-taken logic.
Examples
-
In a programming language, the lookahead mechanism helps resolve ambiguities in nested statements.
-
The parser's lookahead allows it to identify syntax errors before reaching them in the code.
-
Using lookahead techniques, the compiler can optimize performance by predicting future input requirements.
Surface Forms
lookahead singular
lookaheads plural
Morphology
Etymology
Lookahead comes from the words look and ahead, meaning 'look forward'. In parsing a lookahead means the program checks the symbols a little way ahead of the current place to decide which rule to use, so the name shows it is checking 'ahead' to choose.