Ask Question

Which among the following choices is correct based on the two statements listed below? Statement 1: When the lexical analyzer scans 'int' and 'intvalue', it is not able to decide whether the int leads to a keyword or an identifier. Statement 2: Longest Match Rule. a. Statement 1 is an assertion, Statement 2 is the reason. b. There is no such Statement 2. c. This is a function of the Syntax Analyzer. d. Statement 1 is an assertion, Statement 2 is the solution. e. This is not a function of the Lexical Analyzer.

+2
Answers (1)
  1. 26 June, 18:30
    0
    Answer: d. Statement 1 is an assertion, Statement 2 is the solution.

    Explanation:

    The Longest Match rule is a rule which states that whichever lexeme is scanned should always be determined on the support of the longest match available among all the tokens which is accessible. The lexical analyzer used should also follow the rules arrangement, where a reserved word, e. g., a keyword, in a language is given priority over the user input.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Which among the following choices is correct based on the two statements listed below? Statement 1: When the lexical analyzer scans 'int' ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers