on second thought best not use global -- that makes brian noble mad... instead add extra arg to get_next_token
first draft of get_next finds the longest possible next token (w/o handling numbers)