• recategorized by
769 views
1 1 vote

In the context of parsing techniques, LL$(1)$ refers to:

  1. Grammars that parse the input from left to right, produce a rightmost derivation, with a lookahead of $1$ symbol.
  2. Grammars that parse the input from left to right, produce a leftmost derivation, with a lookahead of $1$ symbol.
  3. Grammars that parse the input from left to right, and backtrack at most once.
  4. Grammars that parse the input from right to left, produce a leftmost derivation, and backtrack at most once.

     

1 Answer

1 1 vote

Answer is Option (B)

LL(1) grammer is left to right, left most derivation grammer with 1 lookahead symbol.

(A) False, LL(1) produce left most derivation, not right most.
(B) True.
(C) False, LL(1) does not require backtracking. Reference: scroll down in this link & check diagram.
(D) False, LL(1) parse input left to right, not right to left.

correct me if i am wrong anywhere.

Answer:
Position:
Show:

Related questions

0 0 votes
1 1 answer
1.7k
1.7k views
admin asked Sep 28, 2024
1,658 views
Which sequence below best describes the order in which the phases of a compiler typically work?Syntax analysis, lexical analysis, $\chi$ semantic analysis, code optimizat...
2 2 votes
2 2 answers
1.2k
1.2k views
admin asked Sep 28, 2024
1,228 views
The logical operation of the following circuit isXORNANDANDOR 
1 1 vote
2 2 answers
1.1k
1.1k views
admin asked Sep 28, 2024
1,067 views
As part of segmentation memory allocation strategy, which of the following assigns segment numbers for various segments of a program like code segment and data segment?Co...
4 4 votes
2 2 answers
2.1k
2.1k views
admin asked Sep 28, 2024
2,058 views
Consider the context-free grammar $G$ below for arithmetic expressions :\[\begin{array}{l}E \rightarrow E+E|E \times E| \text { id }\end{array}\]Which of the following st...