retagged by
371 views

2 Answers

Best answer
3 votes
3 votes
  1. If X is terminal, FIRST(X) = {X}.
  2. If X → ε is a production, then add ε to FIRST(X).
  3. If X is a non-terminal, and X → Y1 Y2 … Yk is a production, and ε is in all of FIRST(Y1), …, FIRST(Yk), then add ε to FIRST(X).
  4. If X is a non-terminal, and X → Y1 Y2 … Yk is a production, then add a to FIRST(X) if for some i, a is in FIRST(Yi), and ε is in all of FIRST(Y1), …, FIRST(Yi-1).

 so accordind to the above rules 
first (B) = {b, epsilon}

selected by
0 votes
0 votes
First of B ={b,epsilon}

 

as epsilon can be derived from B b can also be derived...simply first means with what possibilities B can start

Related questions

0 votes
0 votes
1 answer
1
Ana_101 asked 4 hours ago
16 views
S - A BA - f S fA - b b B dB - ƐB - cFirst(S) =First(A) =First(B) =Follow(S) =Follow(A) =Follow(B) =
2 votes
2 votes
1 answer
2
1 votes
1 votes
1 answer
3
1 votes
1 votes
1 answer
4
learner_geek asked Jul 31, 2017
1,972 views
How to solve recursive first or follow problems as example in second question (First of A) please give detailed explanation.