Two Architectures for a Compiler
publish date: 2026/06/10 22:54:3.427697 UTC
A compiler can be organized using two alternative architectural patterns. Which of the following correctly describes when each is preferable?
Correct Answer
Explanation
The Pipe and Filter compiler model is effective in batch environments where programs are compiled and executed without user interaction (e.g., translating XML documents). However, when a compiler is integrated with other language processing tools - a structured editor, interactive debugger, or prettyprinter - changes from one component need to be reflected immediately in others, making a repository-based organization (with the symbol table and syntax tree as the central repository) more appropriate.
Reference
Software Engineering, Ian Sommerville, 10th edition
