CSC376 · 2080 · 10 marks
Differentiate between one-pass and multi-pass compiler. Construct the LL(1) parsing table for the following grammar.SâABCDS \rightarrow ABCDSâABCDAâaâŁÎ”A \rightarrow a | \varepsilonAâaâŁÎ”BâbB \rightarrow bBâbCâ0âŁÎ”C \rightarrow 0 | \varepsilonCâ0âŁÎ”DâdâŁÎ”D \rightarrow d | \varepsilonDâdâŁÎ”
Differentiate between one-pass and multi-pass compiler. Construct the LL(1) parsing table for the following grammar.SâABCDS \rightarrow ABCDSâABCDAâaâŁÎ”A \rightarrow a | \varepsilonAâaâŁÎ”BâbB \rightarrow bBâbCâ0âŁÎ”C \rightarrow 0 | \varepsilonCâ0âŁÎ”DâdâŁÎ”D \rightarrow d | \varepsilonDâdâŁÎ”[10]
Compiler Design and ConstructionChapter 2: Lexical, Syntax and Semantic AnalysisTop-down parsingNumerical: LL(1) parsing table