(function to check which chars belong to which token) takes a vector of xs to check if these lie between pairs of ys and if so returning their index; assumes xs and ys are sorted; returns only the first span index which enclosing the x
which_token_worker(x, y1, y2)
a vector of type numeric; a number to be placed into a span
a vector of type numeric; first element of span
a vector of type numeric; last element of span