implement a scanner by naive combinators.