public void run() throws ParsingException {
        parseStack.push(new TerminalEntry(EOF));
        parseStack.addToParseStack(ruleTable.find(startSymbol, startToken));
        A = parseStack.peek();
        getNextToken();
        while ((A != null) && !A.isEof()) {
            A = parseStack.peek();
            if (A.isTerminal()) {
                if (A.matches(i)) {
                    parseStack.pop();
                    if (parseStack.notEmpty()) {
                        A = parseStack.peek();
                        getNextToken();
                    }
                } else {
                    throw new ParsingException("Terminal mismatch. Expected: " + A + " Found: " + i + "");
                }
            } else if (A.isSemanticEntry()) {
                final SemanticNode node = nodeFactory.getNewNode(A);
                node.runOnSemanticStack(semanticStack);
                parseStack.pop();
            } else {
                if (isRuleContained(A, i)) {
                    parseStack.pop();
                    parseStack.addToParseStack(ruleTable.find(A, i));
                    A = parseStack.peek();
                } else {
                    throw new ParsingException("Non-terminal mismatch. No entry in the table for: " + A + " , " + i);
                }
            }
        }
        
        if (!stream.isEmpty()) {
            throw new ParsingException("Parser found the end of file marker but the token stream was not empty.");
        }
        
    }