public int next() {

        char next = nextValue();

        //        System.out.println( "state[" + state + "], next[" + next + "], stringValue[" + stringValue + "]" );

        switch (state) {

            case STATE_END: {

                state = STATE_AFTER_END;
            }

            case STATE_AFTER_END: {

                throw new IllegalStateException( "Called next() after the end" );
            }

            case STATE_VALUE: {

                return valueState( next );
            }

            case STATE_ARRAY: {

                return arrayState( next );
            }

            case STATE_OBJECT: {

                return objectState( next );
            }
        }

        throw new IllegalStateException( "lexical error: " + next );
    }