added an array to keep track of whether a word is on the stack, on the queue, or reduced off. Incorporated it into the generalized parsing checks to make them faster.