GATE CS 2020 — Question 10
Consider the following statements.S1: Every SLR(1) grammar is unambiguous but there are certain unambiguous grammars that are not SLR(1).S2: For any context-free grammar, there is a parser that…
Subject-wise GATE questions
10 questions and papers
Consider the following statements.S1: Every SLR(1) grammar is unambiguous but there are certain unambiguous grammars that are not SLR(1).S2: For any context-free grammar, there is a parser that…
Consider the grammar given below:S → a S B | d B → bThe number of reduction steps taken by a bottom-up parser while accepting the string aaadbbb…
Consider the following intermediate program in three address code:p = a - b q = p * c p = u * v q = p + qWhich…
Consider the following grammar:P → x Q R S Q → y z | z R → w | ε S → yWhat is FOLLOW(Q)?
The attributes of three arithmetic operators in some programming language are given below.OperatorPrecedenceAssociativityArity+HighLeftBinary−MediumRightBinary*LowLeftBinaryThe value of the expression 2 − 5 + 1 − 7 * 3 in this…
Consider the following code segment:x = u - t; y = x * v; x = y + w; y = t - z; y = x *…
Match the following:List-IList-II(P) Lexical analysis(i) Leftmost derivation(Q) Top down parsing(ii) Type checking(R) Semantic analysis(iii) Regular expressions(S) Runtime environments(iv) Activation records
Which one of the following is FALSE?
Consider the grammarS → ( S ) | aLet the number of states in the SLR(1), LR(1) and LALR(1) parsers for the grammar be \(n_1\), \(n_2\) and \(n_3\)…
The number of tokens in the following C statement is:printf("i = %d, &i = %x", i, &i);
Every question here is free to read. A free account adds the verified key, the worked solution and your progress.