First set, Follow set, and Predict set

Original link: https://hsiaofongw.notion.site/First-Follow-Predict-4e1a065293454a949f14db4e4377b42b

default.png

This article introduces three sets in the grammar: EPS set, First set, and Follow set, and how to use them to calculate the Predict set. Among them, the EPS set is a set of grammatical symbol strings that can be derived from an empty string in 0 or more steps, the First set is a set of the first characters of a string that can be derived from a grammatical symbol string in 0 or more steps, and the Follow set is the set of successor symbols of grammar symbol A. The Predict set is the set of terminal symbols that can be derived for the grammar rule A -> α.

This article is transferred from: https://hsiaofongw.notion.site/First-Follow-Predict-4e1a065293454a949f14db4e4377b42b
This site is only for collection, and the copyright belongs to the original author.