Added classes for productions and for stack elements