wiz-icon
MyQuestionIcon
MyQuestionIcon
5
You visited us 5 times! Enjoying our articles? Unlock Full Access!
Question

Which of the following derivations does a top down parser while parsing an input string? The input is assumed to be scanned in left to right order.

A
Left most derivation
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
Left most derivation traced out in reverse
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
Right most derivation
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
Right most derivation traced out in reverse
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is A Left most derivation

Left most derivations does a top down parser while parsing an input string, the input is assumed to be scanned in left to right order.

Top-down parsing(LL):-

In top down parsing, we just start with the start symbol and compare the right side of the different productions against the first piece of input to see which of the productions should be used.

A top down parser is called LL parser because it parses the input from Left to right, and constructs a leftmost derivation of the sentence.

Top-down parsing technique parses the input, and starts constructing a parse tree from the root node gradually moving down to the leaf nodes.



907288_917435_ans_6d24e3323adf411fbb8b84246d0d2bc5.PNG

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Functions of Promoter
BUSINESS STUDIES
Watch in App
Join BYJU'S Learning Program
CrossIcon