Source: http://people.umass.edu/partee/726_04/lectures/Lecture%2014%20PDAs%20and%20CFGs.pdf