Unit Test questions
Unit I 1)Explain Role of Lexical Analyzer in Compiler 2) Explain use of yyleng, yytext, yylval, yywrap in yacc.. Unit II 1)Construct LR(0) item-set for following grammar. E E + E | E * E | id where + , * , id are terminals. 2) Explain left factoring with example. Unit III 1)Generate Quadruple for a = b + (c * d) / f 2) Explain Intermediate code generation of declaration statement. Unit IV 1)Explain Parameter passing methods along with suitable example [8] b) Explain Function Call and Return with suitable example Unit V 1)Explain Simple Code Generator Algorithms along with suitable example. [8] 2) What is DAG? Explain the role of DAG in Code Generation Unit VI 1)What is loop transformations? What are its types 2)Explain Following Data Flow Properties Available Expressions, Reaching Definitions