1.

Which among the following statement is correct?Statement 1: When the 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 assertion, Statement 2 is the reason(b) Statement 1 is assertion, Statement 2 is the solution(c) There is no such Statement 2(d) This is not a function of Lexical AnalyzerThis question was addressed to me in my homework.Question is taken from Lexical Analysis in section Regular Expressions and Languages of Automata Theory

Answer»

The CORRECT answer is (b) Statement 1 is assertion, Statement 2 is the solution

For EXPLANATION: The Longest MATCH rule states that the lexeme scanned should be determined on the basis of longest match among all the token available.



Discussion

No Comment Found

Related InterviewSolutions