docs: private void createActionStack() throws ParserException, GrammarException {
  	boolean accepted = false;
  	do {
  	    checkTimeout();
  	    stepCounter++;
  	    if (logger.isTraceEnabled()) {
  		logger.trace(toString());
  	    }
  	    if (streamPosition > maxPosition) {
  		maxPosition = streamPosition;
  	    }
  	    final ParserActionSet actionSet;
  	    final Token token;
  	    if (streamPosition < getTokenStream().size()) {
  		token = getTokenStream().get(streamPosition);
  		actionSet = parserTable.getActionSet(stateStack.peek(), new Terminal(token.getName(), token.getText()));
  	    } else {
  		token = null;
  		actionSet = parserTable.getActionSet(stateStack.peek(), FinishTerminal.getInstance());
  	    }
  	    if (logger.isTraceEnabled()) {
  		logger.trace(actionSet.toString());
  	    }
  	    final ParserAction action = getAction(actionSet);
  	    switch (action.getAction()) {
  	    case SHIFT:
  		shift(action);
  		break;
  	    case REDUCE:
  		reduce(action);
  		break;
  	    case ACCEPT:
  		accept(action);
  		accepted = true;
  		break;
  	    case ERROR:
  		error();
  		break;
  	    default:
  		throw new ParserException("Invalid action '" + action + "'for parser near '"
  			+ getTokenStream().getCodeSample(maxPosition) + "'!");
  	    }
  	} while (!accepted);
      }