How many distinct programs can the following grammar generate? S rightarrow a Z f xrightarrow b...
How many distinct programs can the following grammar generate? S rightarrow a Z f xrightarrow b c | c b Y rightarrow de|cd Z rightarrow XY| YX a) 1 b) 4 c) 8 d) 24 e) An infinite number A5) Suppose you have a working compiler, properly modularized, that generates code for the MIPS instruction set. Which components would you have to change to adapt this compiler to generate code for another instruction set (say x86)? Select all correct answers. a) Parser b) AST definitions c) Semantic analyzer d) Pre-code generation optimizer e) Machine Code generator f) Post-code generation optimizer