when constructing the SLR(1) table for some grammar I need to compute the FOLLOW set for all terminals in order to decide where and when to reduce.
Do I compute theme for the augmented grammar or the original one?
Is there even a difference?
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.Sign up to join this community
In SLR(1) parser you need to compute only the follows of non-terminal symbols. When you have to put a reduce in the table, you look at the follows of the head of the production, and then put the production only in columns(correspond to terminals) that are in the follows.