     if p_state = 'alphanum' then
       set p_state := 'alpha';
     end if;
+    if negative_number and (p_state != 'number') then
+    	set p_token := NULL;
+    end if;
 end;
 //
 

    declare v_length int unsigned default character_length(p_text);
    declare v_char, v_lookahead, v_quote_char    varchar(1) charset utf8;
    declare v_from int unsigned;

    if p_from is null then
        set p_from = 1;

                        ,   'colon'
                        ,   'comma'                        
                        ,   'decimal'
                        ,   'error','minus'
                        ,   'integer'
                        ,   'number'
                        ,   'object_begin'
