-
In a compiler, keyboards of a language are recognized during
-
- parsing of the program
- the code generation
- the lexical analysis of the program
- data flow analysis
- parsing of the program
Correct Option: C
In a compiler, keyboards of a language are recognized during the lexical analysis of the program. Typically, the lexical analysis phase of compilation breaks the input text up into sequences of lexemes that each belongs to some particular token type that's useful in later analysis. Consequently, keywords are usually first recognized during lexical analysis in order to make parsing easier. Since parsers tend to be implemented by writing context-free grammars of tokens rather than of lexemes (that is, the category of the lexeme rather than the contents of the lexeme), it is significantly easier to build a parser when keywords are marked during lexing.