def read_word(stream, include_chars=()):
    """
    Reads a sequence of word characters
    """
    stream.expect_input()
    start = stream.ptr
    while stream.ptr < stream.length:
        ch = stream.text[stream.ptr]
        if not (ch.isalnum() or ch == '_' or ch in include_chars):
            break
        stream.ptr += 1
    if start == stream.ptr:
        stream.raise_unexpected()
    return stream.text[start:stream.ptr]
