When two patterns match a lexeme of the same length, the scanner generator resolves the conflict by
Answer: B
Rule order breaks ties. This is why keywords are listed before the general identifier pattern: both match the lexeme if, but the earlier keyword rule wins and the correct token is produced. Reversing the order silently turns every keyword in the language into an identifier.
Please log in or register to report this question.