Consider the syntax directed translation given by the following grammar and semantic rules. Here N, I, F and B are non-terminals. N is the starting non-terminal, and #, 0 and 1 are lexical tokens corresponding to input letters "#", "0" and "1", respectively. X.val denotes the synthesized attribute (a numeric value) associated with a non-terminal X. I1 and F1 denote occurrences of I and F on the right hand side of a production, respectively. For the tokens 0 and 1, 0.val = 0 and 1.val = 1.
Related Compiler Design PYQs
Consider the following statements regarding the front-end and back-end of a compiler. S1: The front-end includes phases that are i…
Consider the following definition of a lexical token id for an identifier in a programming language, using extended regular expres…
Consider the following program: ```c int main() { f1(); f2(2); f3(); return(0); } int f1() { return(1); } int…
Consider the control flow graph shown. Which one of the following choices correctly lists the set of live variables at the exit p…
Consider the following C statements: char *str1 = "Hello; /* Statement S1 */ char *str2 = "Hello;"; /* Statement S2 …
Which of the following statements is/are true?
Free account benefits
Turn practice into measurable progress
Public PYQs and reference pages stay free. Sign in when you want GATEverse to remember what you studied and guide what to practise next.