1 votes 1 votes First of B ? Compiler Design compiler-design context-free-grammar parsing first-and-follow descriptive + – Prateek Arora asked Oct 27, 2016 • retagged Jun 23, 2022 by Lakshman Bhaiya Prateek Arora 371 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 3 votes 3 votes If X is terminal, FIRST(X) = {X}. If X → ε is a production, then add ε to FIRST(X). 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). 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} Rajesh Raj answered Oct 27, 2016 • selected Oct 27, 2016 by Prateek Arora Rajesh Raj comment Share Follow See all 0 reply Please log in or register to add a comment.
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 Pavan Kumar Munnam answered Oct 27, 2016 Pavan Kumar Munnam comment Share Follow See all 0 reply Please log in or register to add a comment.