Holooly Plus Logo

Question 14.4.4: Show how to compute inductively the set State(S) of all ......

Show how to compute inductively the set State(S) of all situations coherent with a given string S.

Step-by-Step
The 'Blue Check Mark' means that this solution was answered by an expert.
Learn more on how do we answer questions.

(1) If a string S is coherent with a situation [K → U_V, t] and the first character in V is J, that is, V = JW, then SJ is coherent with the situation [K → UJ_W, t].

This rule determines completely which situations that do not start with underscore are coherent with SJ. It remains to find out for which nonterminals K and terminals t the string SJ belongs to Left(K, t). This is done according to the following two rules:

(2) If the situation [L → U_V, g] is coherent with SJ (according to (1)) and V starts with a nonterminal K, then SJ belongs to Left(K, s) for any terminal s that may appear as a first symbol in a string derivable from V \ K (the string V without the first symbol K), as well as for s = t, if the empty string is derivable from V \ K.

(3) If SJ is in Left(L, t) for some L and g, and L → V is a production rule, and V starts with a nonterminal K, then SJ belongs to Left(K, s) for any nonterminal s that may appear as a first symbol in a string derivable from V \ K, as well as for s = t, if the empty string is derivable from V \ K.

Related Answered Questions

Question: 14.4.7

Verified Answer:

Assume that a grammar is fixed. The string S of te...
Question: 14.4.6

Verified Answer:

As before, at each stage of the LR-process we can ...
Question: 14.4.5

Verified Answer:

Assume that a grammar is fixed. Let S be an arbitr...
Question: 14.4.3

Verified Answer:

The string S (of terminals and nonterminals) is co...
Question: 14.4.2

Verified Answer:

Now a situation is defined as a pair [situation in...
Question: 14.3.3

Verified Answer:

Yes; both conflicts that prevent it from being a L...
Question: 14.4.1

Verified Answer:

Nonterminals are symbols (LeftK t) for any nonterm...
Question: 14.2.3

Verified Answer:

Yes, see the corresponding tables (a) and (b) (no ...