1. Functions and Error Recovery
- What are the main functions of a lexical analyzer? List the various error recovery strategies in lexical analysis.[2012]
2. Importance of Lexical Analyzer
- Why is a lexical analyzer essential? Explain.[2015]
3. Tokens
- What do you mean by a token? Describe different types of tokens.[2021, 17, 12, 10]
4. Token, Pattern, and Lexeme
- Define token, pattern, and lexeme with examples.[2019, 14, 09]Or,What do you mean by token, lexeme, and identifier?[2011]
5. Buffering in Lexical Analysis
- Why is buffering used in lexical analysis? What are the commonly used buffering methods?[2021, 17]
6. Input Buffering Techniques
- Describe the input buffering techniques in detail.[2020, 17]
- Write down the input buffering technique with code.[2015]Or,How does an input buffer work? Write its code.[2011]
Page 144: Compiler Design and Construction
7. Regular Expressions and Definitions
- Define a regular expression with an example. What are the rules for constructing regular expressions?[2012]
- Define a regular definition. Give the regular definition for unsigned numbers in Pascal.[2020, 11]Or,Give the regular definition for unsigned numbers in Pascal and identifiers.[2010]
8. Lexical Syntax
- Why do we use regular expressions to define the lexical syntax of a language?[2011]