Theory-of-Computation
October 6, 2023Theory-of-Computation
October 6, 2023UGC NET Dec-2020 and June-2021 Paper-2
Question 1
|
Given below are two statements
Statement I: LL(1) and LR are examples of Bottom up parsers.
Statement II: Recursive descent parser and SLR are examples of Top down parsers
In light of the above statements, choose the correct answer from the options given below
Statement I: LL(1) and LR are examples of Bottom up parsers.
Statement II: Recursive descent parser and SLR are examples of Top down parsers
In light of the above statements, choose the correct answer from the options given below
Both Statement I and Statement II are false
|
|
Both Statement I and Statement II are true
|
|
Statement I is false but Statement II is true
|
|
Statement I is true but Statement II is false
|
Question 1 Explanation:
LL(1) is a Non Recursive descent Top down parser. LR is Bottom up Parser.
Recursive Descent Parser is top down parser with backtracking and SLR is one of four LR-Parsers(LR(0),SLR(1),LALR(1),CLR(1)).
Since LR is bottom up parser so SLR is example of Bottom up parser.
Recursive Descent Parser is top down parser with backtracking and SLR is one of four LR-Parsers(LR(0),SLR(1),LALR(1),CLR(1)).
Since LR is bottom up parser so SLR is example of Bottom up parser.
![](https://solutionsadda.in/wp-content/uploads/2022/08/1-300x171.png)
Correct Answer: A
Question 1 Explanation:
LL(1) is a Non Recursive descent Top down parser. LR is Bottom up Parser.
Recursive Descent Parser is top down parser with backtracking and SLR is one of four LR-Parsers(LR(0),SLR(1),LALR(1),CLR(1)).
Since LR is bottom up parser so SLR is example of Bottom up parser.
Recursive Descent Parser is top down parser with backtracking and SLR is one of four LR-Parsers(LR(0),SLR(1),LALR(1),CLR(1)).
Since LR is bottom up parser so SLR is example of Bottom up parser.
![](https://solutionsadda.in/wp-content/uploads/2022/08/1-300x171.png)
Subscribe
Login
0 Comments