static int countRemainingTokens(ListAndIndex l) { ret l == null ? 0 : (l.size()-l.idx)/2; }