def read_number(stream):
    """
    Reads a decimal number, returning value as string
    """
    start = stream.ptr
    while True:
        if not stream.text[stream.ptr].isdigit() and stream.text[stream.ptr
            ] != '.':
            break
        stream.ptr += 1
    return stream.text[start:stream.ptr]
