Add a deque based stack.
Implement base parser functions for production rules.