In this chapter, we introduce a restricted type of CFG called LR(0) Grammar. We discuss the question what are LL(1), LR(0) and LR(1) grammars. Given a grammar, we discuss how to test whether it is LL(1) or LR(0) or LR(1).
A grammar that is suitable for LL(1) parser construction is called LL(1) grammar.
Given a grammar, to check whether it is LL(1) or not, we use two functions called First( ) and Follow( ).
Let us now understand the functions First( ) and Follow( ).
The function First (x) (where x is a ...