def reconstruct_line_old(dat,tokno):
    """
    As all lines have been broken down into tokens it is non-trivial to
    produce the line that holds a particular token. 

    This routine reconstructs as best as possible the line that holds a 
    particular token. Of course this is limited by the fact that all the 
    information about the white space has been lost in the tokenisation.

    Returns the reconstructed line and the token number of the first token
    on the next line.
    """
    (type,token,lineno,tmp) = dat.token[tokno]
    ntb = dat.line2token[lineno]
    nte = len(dat.token)
    (type,token,linenum,tmp) = dat.token[ntb]
    line = str(token)
    while (lineno == linenum):
        ntb = ntb + 1
        if ntb <= nte:
            (type,token,linenum,tmp) = dat.token[ntb]
        else:
            linenum = 0
        if lineno == linenum:
            line = line + " " + str(token)
    return (line,ntb)