2,299 views
2 votes
2 votes

Which is the correct statement(s) for Non Recursive predictive parser?

$S1 : First(\alpha) = \{ t \mid \alpha_{\Rightarrow}$ * $t \beta \text{ for some string } \beta \} _{\Rightarrow}$ * $t \beta$

$S2: Follow(X) = \{ a \mid S_{\Rightarrow}$ * $ \alpha X a \beta \text{ for some string } \alpha and \beta\} $

  1. Both statements S1 and S2 are incorrect
  2. S1 is incorrect S2 is correct
  3. S1 is correct S2 is incorrect
  4. Both statements S1 and S2 are correct

1 Answer

2 votes
2 votes

Ans B) statements S1 is incorrect and S2 are correct

$\alpha \rightarrow \ast t\beta$

First(∝) there can be some string before t

$S\rightarrow \ast \alpha Xa\beta$

Here follow(X) must be a

Answer:

Related questions

3 votes
3 votes
1 answer
2
go_editor asked Jul 14, 2016
4,093 views
A virtual memory based memory management algorithm partially swaps out a process. This is an example ofshort term schedulinglong term schedulingmedium term schedulingmutu...
2 votes
2 votes
1 answer
3
2 votes
2 votes
3 answers
4