Consider the reasons for separating lexical analysis from parsing.
1. it simplifies the design of both phases
2. it improves compiler efficiency through specialised techniques
3. it enhances the portability of the compiler across character sets
Answer: C
All three are the standard justifications given in the literature. Simplicity, efficiency and portability together outweigh the small cost of defining an interface between the two phases. The interface is a single function call, which is about as cheap as a boundary can be.
Please log in or register to report this question.