0

From this section of the Wiki article on PDA, I've got a rough idea on the construction process of a PDA from a given CFG. What this article doesn't make clear is the step required when there are multiple production rules for a single non-terminal.

For example suppose we have a grammar given of the form :

Clearly, this grammar recognizes all string of the form x(ab)*y [coincidentally it's a regular language too].

Here I'm having problem constructing PDA from this grammar because of these 2 rules

That is, which of these 2 rules to be used in the Expansion phase, while pushing down to the stack?

dibyendu
  • 515
  • 1
  • 5
  • 16

2 Answers2

1

For More Clear Details the slides have an example.

Vivek Aditya
  • 1,145
  • 17
  • 46
0

As given in this Slides your PDA will simulate leftmost derivations

Vivek Aditya
  • 1,145
  • 17
  • 46