• retagged by
26,334 views
31 31 votes

Consider the augmented grammar given below:

  • $S’ \rightarrow S$
  • $S \rightarrow \langle L \rangle \mid id$
  • $L \rightarrow L, S \mid S$

Let $I_0 = \text{CLOSURE} (\{[S’ \rightarrow \cdot S ]\}).$ The number of items in the set $\text{GOTO} (I_0, \langle \: )$ is______

5 Answers

Best answer
52 52 votes

Total $5$ items 

• edited by
9 9 votes
• reshown by
2 2 votes

The canonical collection of items for the above grammar are:

 

GOTO($I_0,<$ ) = $I_2$ which is having 5 items. 

2 2 votes
It’s asking the number of items in the set GOTO(I0, <).

Means First evaluate I1 = GOTO(I0, <) and then count the number of items present in I1 state.

Answer is 5.
Answer:
Position:
Show:

Related questions

33 33 votes
3 answers 3 answers
28.8k
28.8k views
Arjun asked Feb 7, 2019
28,840 views
Consider the grammar given below:$S \rightarrow Aa$$A \rightarrow BD$$B \rightarrow b \mid \epsilon $$D \rightarrow d \mid \epsilon $Let $a,b,d$ and $\$ $ be indexed as f...
42 42 votes
11 answers 11 answers
27.2k
27.2k views
Arjun asked Feb 7, 2019
27,169 views
Consider the following grammar and the semantic actions to support the inherited type declaration attributes. Let $X_1, X_2, X_3, X_4, X_5$, and $X_6$ be the placeholders...
25 25 votes
5 answers 5 answers
15.3k
15.3k views
Arjun asked Feb 7, 2019
15,275 views
Which one of the following kinds of derivation is used by LR parsers?LeftmostLeftmost in reverseRightmostRightmost in reverse
78 78 votes
6 answers 6 answers
48.2k
48.2k views
Arjun asked Feb 7, 2019
48,183 views
Consider the following four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below:$$\begin{array}{|c|c|c|c|c|} \h...