✍️ Get Writing Help
WhatsApp

Uncategorized

Decorated parse tree

1.       What is semantic analysis? Give some examples of errors that are detected during semantic analysis. 2.       What are the main tasks involved in semantic analysis? How is it different from syntax analysis? Illustrate with an example. 3.       Explain the terms:   (a) decorated parse tree,   (b) dependency graph,   (c) inherited and synthesised attributes. Illustrate with

Decorated parse tree Read More »

Semantic analysis

1.       A semantic analyser strips out the comments and white spaces from input source program. 2.       Semantic analysis involves verifying if the input source forms a legal set of instructions in accordance with the language rules. 3.       A semantic analyser checks if all the variables are declared before use. 4.       A semantic analyser checks if

Semantic analysis Read More »

What is a translation scheme?

1.       What kinds of syntax directed definitions are suited for evaluation of semantic rules during the parsing? Explain with an example. 2.       What is a translation scheme? How is it different from a syntax-directed definition? Illustrate the order of execution of semantic actions in a translation scheme? 3.       How do we evaluate synthesised and inherited

What is a translation scheme? Read More »

Evaluating semantic rules

How do we construct a top-down parser that can evaluate semantic rules during the parsing for an L-attributed definition? Illustrate with an example. Describe the parse tree method of evaluating semantic rules. What are its limitations? How do we evaluate semantic rules using the rule-based method? Describe a recursive evaluator with an example. How do

Evaluating semantic rules Read More »

What is structural equivalence?

1.       What is a symbol table? Explain how the symbol table in a compiler can be implemented by a hash table. 2.       Explain some of the productions and the semantic actions pertaining to the processing of the declarations in a semantic analyser for C language. 3.       Explain static and dynamic type checking with examples 4.      

What is structural equivalence? Read More »

What is name equivalence?

1.       What is name equivalence? In what context is name equivalence used during the type checking? Illustrate with an example in C language. 2.       Write an algorithm to check the equivalence of two type expressions in C language represented by a linked list. 3.       Explain some of the productions and the semantic actions pertaining to

What is name equivalence? Read More »

Input source

A compiler can choose one of the two options (a) Translate the input source into intermediate code and then convert it to final machine code; (b) Directly generate the final machine code from the input source. What is the preferred option and why? Describe the three address code form of the intermediate code. List out

Input source Read More »

Abstract syntax

Compare the different methods of implementing three address code. How is an abstract syntax tree different from a parse tree? List out some of the nodes in the AST for a C compiler? Translate a C statement ‘a = b + c – (4ab + 3*c);’ into TAC. How are the binary operators like +,

Abstract syntax Read More »

Pointer accesses

1.       How is the offset calculated for a multidimensional array reference? Derive the formula. 2.       Translate the C statements ‘p=& arr[3]; *p=10;’ into TAC. What TAC operators are useful during the translation of pointer accesses? 3.       Translate the C statement ‘x.age = 30;’ into TAC. Assume that the field ‘age’ is at an offset of

Pointer accesses Read More »

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102