- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Ginni has Published 1580 Articles
Ginni
6K+ Views
SolutionComputation of FIRSTE → E + T|TSince FIRST (E) does not contain ε.∴ FIRST (E) = FIRST(E + T) = FIRST(E)As, E → T∴ FIRST (E) = {FIRST(T)} (1)T → T ... Read More
Ginni
1K+ Views
LR Parsing Tables are a two-dimensional array in which each entry represents an Action or goto entry. A programming language grammar having a large number of productions has a large number of states or items, i.e., I0, I1 … … In.So, due to more states, more Actions & goto entries ... Read More
Ginni
4K+ Views
SolutionStep1− Construct Augmented Grammar(0) E′ → S(1) E → E + E(2) E → E ∗ E(3) E → (E)(4) E → idStep2− Find closure & goto functions to construct LR (0) items.Closure (E′ → ∙ E) =Applying goto on I9∵ goto cannot be applied on I9, as the dot ... Read More
Ginni
11K+ Views
Shift Reduce Parser is a type of Bottom-Up Parser. It generates the Parse Tree from Leaves to the Root. In Shift Reduce Parser, the input string will be reduced to the starting symbol. This reduction can be produced by handling the rightmost derivation in reverse, i.e., from starting symbol to ... Read More
Ginni
5K+ Views
SolutionStep1 − Construct Augment Grammar(0) S′ → S(1) S → A a(2) S → b A c(3) S → B c(4) S → b B a(5) A → d(6) B → dStep2 − Find Closure & goto. Construct a set of LR (1) items. Here all the boxes represent new ... Read More
Ginni
5K+ Views
SolutionStep1 − Construct LR (1) Set of items. First of all, all the LR (1) set of items should be generated.In these states, states I3 and I6 can be merged because they have the same core or first component but a different second component of Look Ahead.Similarly, states I4 and ... Read More
Ginni
4K+ Views
LALR Parser is Look Ahead LR Parser. It is intermediate in power between SLR and CLR parser. It is the compaction of CLR Parser, and hence tables obtained in this will be smaller than CLR Parsing Table.Here, first of all, we will construct LR (1) items. Next, we will look ... Read More
Ginni
5K+ Views
SolutionStep1 − Construct Augmented Grammar(0) S′ → S(1) S → CC(2) C → cC(3) C → d.Step2 − Find closure & goto to construct LR (1) itemsApplying goto on I7, I8, I9In I7, I8, I9 we have production C → d ∙, $, c → cC ∙, c | d ... Read More
Ginni
4K+ Views
CLR defines canonical lookahead. CLR parsing use the canonical collection of LR (1) items to construct the CLR (1) parsing table. CLR (1) parsing table makes the more number of states as compare to the SLR (1) parsing. In the CLR (1), it can locate the reduce node only in ... Read More
Ginni
31K+ Views
Description − Consider the GrammarE → E + T|TT → TF|FF → F*|a|b.SolutionStep1 − Construct the augmented grammar and number the productions.(0) E′ → E(1) E → E + T(2) E → T(3) T → TF(4) T → F(5) F → F ∗(6) F → a(7) F → b.Step2 − ... Read More