Bottom-Up Parsing/Example 3: SLR(1)

From Wiki**3

Revision as of 09:39, 2 May 2024 by Root (talk | contribs) (Problem)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Problem

Initial symbol: S

Terminals: { k, w, x, y, z }

Input: xwxkyy

S → x A y | x B y | x A z
B → k
A → w S | k

Is this an SLR(1) grammar?

Derive the SLR(1) parser for this grammar. Compact the parse table. Describe the processing of the input string by the compacted parser.

Solution