<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def accept_lit(char, buf, pos):
 """Accept a literal character at the current buffer position."""

    if pos >= len(buf) or buf[pos] != char:
        return None, pos
    return char, pos+1