Chapter 4: Syntax Analysis

Parser states

. Goal is to know the valid reductions at any given point

. Summarize all possible stack prefixes a as a parser state

. Parser state is defined by a DFA state that reads in the stack α

. Accept states of DFA are unique reductions

The parser states help us in identifying valid reductions at any particular step of parsing. In a nutshell, these parser states are all the possible stack prefixes possible. During the course of parsing, the input is consumed and we switch from one parser state to another and finally the input is accepted on unique reductions(or to say that the Deterministic Finite Automata reaches accepting state).