• edited by
436 views

1 Answer

1 1 vote
First and Follow are used for creating LL(1) parser table which accepts non-left recursive grammar. But, they can be applied for left recursive grammar as well.

Like, E → E + E | id

first(E) = {id}

follow(E) = {+, $}
Position:
Show:

Related questions

0 0 votes
1 1 answer
685
685 views
1 1 vote
0 0 answers
2.5k
2.5k views
aditi19 asked May 12, 2019
2,527 views
why do first sets can have epsilon symbol but follow sets don’t?P.S: I’ve a silly doubt :P
1 1 vote
1 answers 1 answer
1.2k
1.2k views
Prasanna 4 asked Feb 2, 2025
1,212 views
14. Compute FIRST and FOLLOW for the following grammar S->AS, S->b, A->SA, A- a
0 0 votes
1 1 answer
1.3k
1.3k views
Mukesh 1 asked Nov 20, 2024
1,320 views
Find First and Follow for the following grammar:S→A C B |CbB |BaA → da| BCB → g | εC→ h | ε