input= [[digit ::= "0"..."9"]] output= [[function parse_digit() local c = char() if c ~= nil and c >= '0' and c <= '9' then next() return c end end]]