             s += String(digit)
             if let second = scalarGenerator.next() {
                 switch second {
-                case "1", "2", "3", "4", "5", "6", "7":
+                case "1"..."7":
                     s += String(second)
                     if let n = parseOctalInteger() {
                         return .octalInteger(s + n)

        var s = String()
        while let c = scalarGenerator.next() {
            switch c {
            case "0", "1", "2", "3", "4", "5", "6", "7":
                s.append(String(c))
            default:
                scalarPushback = c

        var s = String()
        while let c = scalarGenerator.next() {
            switch c {
            case "0"..."9", "a"..."f", "A"..."F":
                s.append(String(c))
            default:
                scalarPushback = c
