@Override
    public boolean preTransfer(StateMachine sm, LexicalElement input) {

        MQOHeader hdr;
        boolean ret = true;

        switch (input) {
            case HEADER_METASEQUOIA:
                hdr = new MQOHeader();
                sm.push(hdr);
                ret = true;
                break;
            case HEADER_KEYWORD_DOCUMENT:
                ret = true;
                break;
            case HEADER_FORMAT:
                hdr = (MQOHeader)sm.pop();
                hdr.setFormat(input.getValue());
                sm.push(hdr);
                ret = true;
                break;
            case HEADER_KEYWORD_VER:
                hdr = (MQOHeader)sm.pop();
                hdr.setVersion(new Float(input.getValue()));
                sm.push(hdr);
                ret = true;
                break;
            case BYTE_ARRAY:
                ret = true;
                break;
            default:
                break;
        }

        return ret;
    }