Consider the grammar : S → a S → ab The given grammar is (A) LR(1) only (B) LL(1) only (C) Both LR(1) and LL(1) (D) LR(1) but not LL(1)
Asked in Meghalaya PSC QUESTION BOOKLET: SERIES I
Answer under review: our editors are checking this question. Try the other MPSC Prelims previous year questions questions meanwhile.
More MPSC Prelims previous year questions questions
- The First and Follow sets for the grammar S → SS+|SS*|a are (A) First (S) = {a} and Follow (S) = {+, *, $} (B) First (S) = {+} and Follow (S) = {+, *, $} (C) First (S) = {a} and Follow (S) = {+, *} (D) First (S) = {+, *} and Follow (S) = {+, *, $}
- The action of parsing the source program into the proper syntactic classes is known as (A) lexical analysis (B) syntax analysis (C) interpretation analysis (D) parsing
- Which of the following is not a bottom-up parser? (A) LALR (B) Predictive parser (C) CLR (D) SLR
- Resolution of externally defined symbols is performed by a/an (A) linker (B) loader (C) compiler (D) interpreter
- Which of the following statements about parser is/are correct? 1. Canonical LR is more powerful than SLR. 2. SLR is more powerful than LALR. 3. SLR is more powerful than Canonical LR. Select the correct answer using the codes given below. (A) 1 only (B) 2 (C) 3 only (D) 1 and 3
- Match List-I with List-II and select the correct answer using the codes given below the Lists : List-I List-II a. Lexical analysis 1. Leftmost derivation eb. Top-down parsing 2. Type checking c. Semantic analysis 3. Regular expressions d. Runtime environments 4. Activation records Codes : (A) a b c d 1 2 4 3 (B) a b c d 3 1 2 4 (C) a b c d 2 3 1 4 (D) a b c d 4 1 2 3
- A top-down parser uses (A) leftmost derivation (B) leftmost derivation in reverse (C) rightmost derivation (D) rightmost derivation in reverse
- The value of an inherited attribute is computed from the values of attributes at the (A) sibling nodes (B) parent of the node (C) children node (D) Both (A) and (B)