public class PDA { // The representation of final states, start state, current // state and total number of states are the same as in the // implementation of DFSA. private boolean[] finalStates; private int startState; private int currentState; private int totalStates; // For a PDA, we still use a two-dimensional Linkelist array to hold // the transitions from each state, but we need a more complex // data structure, PDATransition, to store the information. private PDATransitionLinkedList[][] delta; // We also need to implement a stack data structure to hold // the PDA stack. private PDAStack myStack; public PDA (int n, int start) { totalStates = n; finalStates = new boolean[totalStates]; //initialize the the PDATransitionLinkedList array delta = new PDATransitionLinkedList[totalStates][totalStates]; for(int i = 0; i