Sources/_MatchingEngine/Regex/Printing/PrintAsPattern.swift (36 lines): - line 12: // TODO: Add an expansion level, both from top to bottom. - line 45: // TODO: Global matching options? - line 112: print("/*TODO: conditional \(c)*/") - line 122: // FIXME: Count number of `#` in literal... - line 126: // TODO: We might want to output comments... - line 137: print("/*TODO: absent function \(abs)*/") - line 141: print("// FIXME: get group transform out of here!") - line 173: print("// TODO: Range \(r.lhs) to \(r.rhs)") - line 182: print("// TODO: quote \(q.literal._quoted) in custom character classes (should we split it?)") - line 184: print("// TODO: Set operation: \(member)") - line 190: // TODO: Escaping? - line 223: "/* TODO: character properties */" - line 232: /// TODO: We want to coalesce adjacent atoms, likely in - line 251: // TODO: API names instead of case names - line 255: return " /* TODO: keyboard control */" - line 258: return " /* TODO: keyboard meta */" - line 261: return " /* TODO: keyboard meta-control */" - line 264: return " /* TODO: named character */" - line 273: return " /* TODO: back reference */" - line 276: return " /* TODO: subpattern */" - line 279: return " /* TODO: callout */" - line 282: return " /* TODO: backtracking directive */" - line 291: // TODO: We probably want this to be a prperty after group - line 298: return "/* TODO: balanced captures */" - line 303: return "/* TODO: non-capture reset */" - line 306: return "/* TODO: atomicNonCapturing */" - line 308: return "/* TODO: lookahead */" - line 310: return "/* TODO: negativeLookahead */" - line 312: return "/* TODO: nonAtomicLookahead */" - line 314: return "/* TODO: lookbehind */" - line 316: return "/* TODO: negativeLookbehind */" - line 318: return "/* TODO: nonAtomicLookbehind */" - line 320: return "/* TODO: scriptRun */" - line 322: return "/* TODO: atomicScriptRun */" - line 324: return "/* TODO: changeMatchingOptions */" - line 355: // FIXME: Is this right for custom char classes? Sources/_StringProcessing/ConsumerInterface.swift (35 lines): - line 55: // TODO: This is basically an AST interpreter, which would - line 60: // TODO: clarify difference between this and - line 65: // TODO: Shouldn't this be parameterized over matching - line 77: // TODO: Wean ourselves off of this type... - line 80: // FIXME: should we worry about out of bounds? - line 90: // TODO: Match level? - line 104: // TODO: alias? casing? - line 117: // FIXME: implement - line 140: // TODO: check for out of bounds? - line 143: // TODO: semantic level - line 156: // TODO: Not optimal. - line 170: // TODO: We should probably have a component type - line 188: // TODO: What if lengths don't line up? - line 229: // FIXME: semantic level - line 257: // TODO: bounds check? - line 260: // TODO: semantic level? - line 277: // TODO: semantic level - line 278: // TODO: bounds check - line 284: // FIXME: Below is largely scalar based, for convenience, - line 290: // TODO: is this modeled differently? - line 293: // TODO: bounds check? - line 305: // fatalError("TODO: Map categories: \(p)") - line 312: throw unsupported("TODO: Map script: \(s)") - line 315: throw unsupported("TODO: Map script: \(s)") - line 321: throw unsupported("TODO: map PCRE special: \(s)") - line 324: throw unsupported("TODO: map Oniguruma special: \(s)") - line 327: throw unsupported("TODO: map other \(key ?? "")=\(value)") - line 337: // FIXME: Semantic level, vet for precise defs - line 496: throw unsupported("TODO: map prop \(self)") - line 501: // FIXME: Semantic level, vet for precise defs - line 505: // FIXME: semantic levels, modes, etc - line 528: // FIXME: better def - line 533: // FIXME: better def - line 547: // FIXME: Semantic level - line 594: throw unsupported("TODO: cased letter? not the property?") Sources/_MatchingEngine/Regex/Parse/LexicalAnalysis.swift (24 lines): - line 41: fatalError("FIXME: Let's not keep the boxed existential...") - line 59: fatalError("FIXME: Let's not keep the boxed existential...") - line 78: fatalError("FIXME: Let's not keep the boxed existential...") - line 288: // TODO: PCRE offers a different behavior if PCRE2_ALT_BSUX is set. - line 299: // TODO: This doesn't appear to be followed by ICU or Oniguruma, so - line 318: // FIXME: ICU can read up to 3 octal digits if the leading digit is 0, - line 372: // TODO: We ought to try and consume whitespace here and emit a - line 478: /// TODO: Need to support some escapes - line 502: /// TODO: Swift-style nested comments, line-ending comments, etc - line 599: // TODO: Warn on duplicate options, and options appearing in both adding - line 809: // TODO: This implicit scoping behavior matches Oniguruma, but PCRE - line 831: // TODO: (name:) - line 928: // FIXME: This should apply to future groups too. - line 929: // TODO: We should probably advise users to use the more explicit - line 1011: // TODO: Perhaps a syntax options check (!PCRE) - line 1012: // TODO: Better AST types here - line 1053: // TODO: Validate the types of characters that can appear in the name? - line 1066: // TODO: We could have better recovery here if we only ate the characters - line 1236: // TODO: Oniguruma can parse an additional recursion level for - line 1289: // TODO: If we want a strict Oniguruma mode, we'll need to add a check - line 1500: // TODO: Warn about whitespace being included? - line 1609: // TODO: PCRE allows escaped delimiters or '\Q...\E' sequences in the - line 1694: // TODO: Store customCC in the atom, if that's useful - line 1698: // TODO: Can we try and recover and diagnose these outside character Sources/_StringProcessing/Compiler.swift (17 lines): - line 31: // TODO: Global matching options? - line 79: // FIXME: Wait, how does this work? - line 118: // FIXME: Other kinds... - line 142: // TODO: A recursive call isn't a backreference, but - line 175: // TODO: builder.buildAdvanceUnicodeScalar(1) - line 189: // FIXME: Depends on API model we have... We may want to - line 214: // FIXME: Figure out how to communicate this out - line 218: // TODO: We can probably build a nice model with API here - line 243: // TODO: May want to consider Unicode level - line 245: // TODO: How should we handle bounds? - line 251: // TODO: May want to consider Unicode level - line 253: // TODO: How should we handle bounds? - line 438: // FIXME: Possessive needs a "dummy" save point to ratchet - line 476: // FIXME: Is this re-entrant? That is would nested - line 502: // TODO: Parser should warn - line 505: // TODO: Parser should warn - line 506: // TODO: Should we error? Sources/_MatchingEngine/Regex/Printing/PrintAsCanonical.swift (13 lines): - line 12: // TODO: Round-tripping tests - line 94: // TODO: We might want to output comments... - line 111: output("/* TODO: get groupTransform out of AST */") - line 126: // TODO: Do we need grouping or special escape rules? - line 139: output("/* TODO: set operation \(self) */") - line 144: output("(/*TODO: conditional \(condition) */)") - line 175: // TODO: Is this really what we want? - line 199: return "(/* TODO: matchign options in canonical form */" - line 228: // FIXME: We may have to re-introduce escapes - line 241: return "/* TODO: atom \(self) */" - line 253: // TODO: Which should we prefer, this or `\g{n}`? - line 256: return "/* TODO: relative reference \(self) */" - line 258: return "/* TODO: named reference \(self) */" Sources/_MatchingEngine/Engine/Instruction.swift (11 lines): - line 131: // TODO: Is the amount useful here? Is it commonly more than 1? - line 200: /// TODO: Consider if separating would improve generality - line 251: // TODO: State transitions need more work. We want - line 265: /// TODO: Could have an Error existential area instead - line 268: // TODO: Fused assertions. It seems like we often want to - line 275: // TODO: internal after compiler moves in - line 311: // TODO: check invariants - line 317: // TODO: check invariants - line 318: // TODO: placeholder bit pattern for fill-in-later - line 353: // TODO: replace with instruction formatters... - line 398: // TODO: better names for accept/fail/etc. Instruction Sources/Prototypes/PEG/PEGCore.swift (10 lines): - line 74: // TODO: Should pop assign to register, or current pc, or what? - line 76: // TODO: Interact with capture info - line 98: // TODO: - line 114: // TODO: save registers? - line 115: // TODO: save call stack position? - line 116: // TODO: save capture position? - line 216: // TODO: Or should this assign to a register? - line 225: // TODO: Assert that all newly added suspension points - line 302: // TODO: backtrace, etc. - line 387: // TODO: Trace Core Sources/_MatchingEngine/Engine/Builder.swift (9 lines): - line 53: // TODO: We want a better strategy for fixups, leaving - line 81: // TODO: generic - line 231: // TODO: Mutating because of fail address fixup, drop when - line 234: // TODO: This will add a fail instruction at the end every - line 247: // FIXME: based on opcode, decide if we split... - line 404: // TODO: Release/reuse registers, for now nop makes - line 409: // TODO: Release/reuse registers, for now nop makes - line 414: // TODO: Release/reuse registers, for now nop makes - line 419: // TODO: A register-mapping helper struct, which could release Sources/_StringProcessing/CharacterClass.swift (8 lines): - line 29: // TODO: Split out builtin character classes into their own type? - line 277: // FIXME: newline sequence is not same as \n - line 314: /// TODO: Not sure if this the right model type, but I suspect we'll want to produce - line 342: // TODO: Would our model type for character classes include - line 351: // FIXME: We shouldn't be returning `nil` here, but instead fixing the call - line 424: // FIXME: CharacterClass wasn't designed for set operations with - line 449: // FIXME: Calling on inverted sets wont be the same as the - line 458: // FIXME: How should we handle bounds? Sources/_MatchingEngine/Regex/Parse/Parse.swift (7 lines): - line 66: // TODO: Needs to track group number resets (?|...). - line 182: // TODO: refactor loop body into function - line 237: // TODO: Better API for the parser to throw located errors. - line 284: // TODO: Diagnose on nested absent functions, which Oniguruma states is - line 360: // TODO: track source locations - line 396: // TODO: We may want to diagnose and require users to disambiguate, at least - line 398: // TODO: What about precedence? Sources/Prototypes/PEG/PEGCode.swift (7 lines): - line 20: // TODO: Capture metadata - line 41: // TODO: Matching vs asserting... - line 51: case label(LabelId) // TODO: separate out - line 57: // Backtracking (TODO: should this be explicit slots or implicit stack?) - line 66: // TODO: Consider captures an PC/SP pair, requires ability to - line 89: // TODO: Array permitting uninitialized values - line 92: // TODO: Do we want to represent capture metadata? Sources/Prototypes/PTCaRet/PTCaRet.swift (6 lines): - line 81: case custom(() -> Bool) // TODO: Matching state to closure - line 114: /// TODO: Isn't this a strong since instead of weak since? - line 159: // TODO: more - line 177: /// TODO: Isn't this a strong since instead of weak since? - line 244: // TODO: Is the above actually a good idea? Should we just - line 249: // TODO: Or, do we want to split things out? How should we do this? Sources/_MatchingEngine/Regex/AST/Atom.swift (6 lines): - line 45: case escaped(EscapedBuiltin) // TODO: expand this out - line 107: // TODO: We might scrap this and break out a few categories so - line 360: // FIXME: better printing... - line 405: // TODO: erm, separate out or fold into something? splat it in? - line 645: // TODO: Not a character per-say, what should we do? - line 685: // TODO: Are callouts quantifiable? Sources/Prototypes/PEG/PEGCompile.swift (6 lines): - line 202: // TODO: might be more efficient to compile directly? - line 206: // TODO: codegen that will update stack instead of pop/push - line 208: // TODO: codegen that will count - line 213: // TODO: Better to count loop iterations... - line 228: // TODO: This is convoluted. Surely it can be coded using better - line 279: // TODO: compile directly Sources/_StringProcessing/Algorithms/Consumers/RegexConsumer.swift (5 lines): - line 15: // TODO: Should `Regex` itself implement these protocols? - line 35: // TODO: Explicitly implement the non-matching consumer/searcher protocols as - line 48: // TODO: We'll want to bake backwards into the engine - line 72: // TODO: We'll want to bake search into the engine so it can - line 82: // TODO: Bake in search-back to engine too Sources/_MatchingEngine/Engine/InstPayload.swift (5 lines): - line 24: // TODO: post conditions - line 33: // TODO: We should choose operand ordering based on codegen - line 94: // TODO: but really, let's come up with something - line 101: // TODO: Which order is better? - line 122: // TODO: We'd like to use shadow bits to assert on kind Sources/_MatchingEngine/Engine/Processor.swift (5 lines): - line 273: fatalError("TODO: What should we do here?") - line 294: // TODO: Should empty stack mean success? - line 302: // TODO: throw or otherwise propagate - line 356: // TODO: Debug stream - line 377: // TODO: Sources/_MatchingEngine/Engine/Backtracking.swift (4 lines): - line 14: // TODO: What all do we want to save? Configurable? - line 15: // TODO: Do we need to save any registers? - line 16: // TODO: Is this the right place to do function stack unwinding? - line 28: // FIXME: Save minimal info (e.g. stack position and Sources/_StringProcessing/Algorithms/Matching/Matches.swift (4 lines): - line 65: // TODO: Custom `SubSequence` for the sake of more efficient slice iteration - line 73: // TODO: Avoid calling `state(for:startingAt)` here - line 123: // TODO: reversed matches - line 164: // TODO: `Collection` conformance Sources/_Unicode/Decoding.swift (3 lines): - line 32: // TODO: Design an "unsafe" and "assumingValid" API convention - line 156: // TODO: Validating versions that remove that aspect of - line 160: // TODO: Consider UTF-16 support, but that's normally best Sources/_MatchingEngine/Regex/Parse/Diagnostics.swift (3 lines): - line 15: // TODO: I wonder if it makes sense to store the string. - line 161: // TODO: Fixits, notes, etc. - line 163: // TODO: Diagnostics engine, recorder, logger, or similar. Sources/_StringProcessing/Algorithms/Algorithms/Split.swift (3 lines): - line 173: // TODO: `Collection` conformance - line 181: // TODO: `maxSplits`, `omittingEmptySubsequences`? - line 199: // TODO: Non-escaping and throwing Sources/_MatchingEngine/Regex/AST/AST.swift (3 lines): - line 66: // FIXME: Move off the regex literal AST - line 93: return g // FIXME: get this out of here - line 313: // FIXME: Get this out of here Sources/_MatchingEngine/Engine/Capture.swift (3 lines): - line 14: TODO: Specialized data structure for all captures: - line 20: TODO: Conjectures: - line 113: // TODO: If empty, probably need empty range or something... Sources/_StringProcessing/RegexDSL/DSL.swift (3 lines): - line 41: fatalError("FIXME: extended AST?") - line 49: // TODO: We want variadic generics! - line 135: // TODO: Support heterogeneous capture alternation. Sources/_StringProcessing/Algorithms/Algorithms/Ranges.swift (3 lines): - line 61: // TODO: Custom `SubSequence` for the sake of more efficient slice iteration - line 69: // TODO: Avoid calling `state(for:startingAt)` here - line 155: // TODO: `Collection` conformance Sources/_StringProcessing/Legacy/TortoiseVM.swift (3 lines): - line 83: // TODO: Avoid infinite behavior from (a*)*. This happens because `readThrough` - line 88: // TODO: SmallVector-like struct, as almost always 1 or 2 length. - line 151: // TODO: this is double calculated Sources/Prototypes/PEG/PEGInterpreter.swift (3 lines): - line 30: // TODO: more efficient to have native support - line 155: // TODO: Are captured pre-order or post-order? - line 171: // TODO: more efficient to have native support Sources/_MatchingEngine/Regex/Printing/DumpAST.swift (3 lines): - line 40: // TODO: prettier printing - line 50: // TODO: We should eventually have some way of filtering out trivia for - line 90: // TODO: comments, non-semantic whitespace, etc. Sources/_MatchingEngine/Engine/Registers.swift (3 lines): - line 20: // TODO: We want to be `String` instead of `[Character]`... - line 24: var bools: [Bool] // TODO: bitset - line 151: // TODO: multi-line if long Sources/_MatchingEngine/Regex/Parse/Mocking.swift (3 lines): - line 13: // TODO: mock up multi-line soon - line 40: case invalidUTF8 // TODO: better range reporting - line 205: // TODO: We should ideally be able to recover from a regex with missing Sources/Prototypes/PEG/PEGTranspile.swift (3 lines): - line 22: // TODO: Could builder provide a generalized mapping table? - line 40: // TODO: Linear is probably fine... - line 58: // TODO: Need to map our registers over... Sources/Prototypes/Combinators/Combinators.swift (3 lines): - line 25: // TODO: it's not clear if error is bound earlier or - line 159: // TODO: non-primitive construction - line 172: // TODO: non-primitive construction Sources/_StringProcessing/Algorithms/Searchers/TwoWaySearcher.swift (2 lines): - line 15: // TODO: Be generic over the pattern? - line 133: // TODO: implement BackwardCollectionSearcher Sources/_StringProcessing/Executor.swift (2 lines): - line 15: // TODO: consider let, for now lets us toggle tracing - line 30: _ = capture // TODO: construct structure Sources/Prototypes/TourOfTypes/Literal.swift (2 lines): - line 37: TODO: We will probably want defaulting mechanisms, such as: - line 130: // TODO: should this be throwing, constant evaluable, or Sources/_MatchingEngine/Engine/Engine.swift (2 lines): - line 18: // TODO: Pre-allocated register banks - line 43: // TODO: better description Sources/_StringProcessing/Algorithms/Matching/MatchingCollectionSearcher.swift (2 lines): - line 52: // TODO: deduplicate this logic with `StatelessCollectionSearcher`? - line 111: // TODO: deduplicate this logic with `StatelessBackwardCollectionSearcher`? Sources/_StringProcessing/RegexDSL/Core.swift (2 lines): - line 127: // FIXME: This is mostly hacky because we go down two different paths based on - line 141: // TODO: Remove this branch when the matching engine supports captures. Sources/_StringProcessing/Algorithms/Consumers/PredicateConsumer.swift (2 lines): - line 50: // TODO: Make this reusable - line 68: // TODO: Make this reusable Sources/_MatchingEngine/Utility/TypedIndex.swift (2 lines): - line 104: // TODO: append, and all the other customization hooks... - line 118: // TODO: any way around the RRC copying init? Sources/Exercises/Participants/HandWrittenParticipant.swift (2 lines): - line 76: // TODO: optionality of return? Probably a good idea to signal if something happened... - line 78: // TODO: worth having? Sources/_MatchingEngine/Engine/Tracing.swift (2 lines): - line 32: // TODO: opcode specific rendering - line 49: // TODO: Without bit packing our representation, what Sources/_MatchingEngine/Utility/TypedInt.swift (2 lines): - line 64: // TODO: BinaryInteger, etc. - line 81: // TODO: Replace with real set vector Sources/_MatchingEngine/Utility/Formatting.swift (2 lines): - line 13: // TODO: Place shared formatting and trace infrastructure here - line 191: // TODO: consider pruning anything in the rendered Sources/_MatchingEngine/Utility/MissingUnicode.swift (1 line): - line 332: /// TODO: These should become aliases for the Block (blk) Unicode character Sources/_MatchingEngine/Regex/Parse/SourceLocation.swift (1 line): - line 98: // TODO: any way to assert or guarantee this is called Sources/_Unicode/NecessaryEvils.swift (1 line): - line 51: // TODO: This actually might be good module API fodder Sources/Exercises/Participants/RegexParticipant.swift (1 line): - line 16: TODO: We probably want to allow participants to register Sources/_StringProcessing/Capture.swift (1 line): - line 14: // TODO: what here should be in the compile-time module? Sources/_MatchingEngine/Engine/Program.swift (1 line): - line 40: // TODO: Extract into formatting code Sources/Prototypes/PEG/PEGVM.swift (1 line): - line 120: // TODO: Sources/_MatchingEngine/Regex/Printing/RenderRanges.swift (1 line): - line 41: // TODO: drop the filtering when fake-ness is taken out of Sources/_MatchingEngine/Regex/Printing/PrettyPrinter.swift (1 line): - line 101: // TODO: What should we do if `f` never returns non-nil? Sources/Prototypes/PEG/PEGVMExecute.swift (1 line): - line 14: // TODO: Consumers need a concept of forward progress. Sources/_StringProcessing/Algorithms/Algorithms/FirstRange.swift (1 line): - line 38: // TODO: Use a more efficient search algorithm Sources/_MatchingEngine/Regex/Parse/SyntaxOptions.swift (1 line): - line 68: // TODO: Probably want to model strict-PCRE etc. options too. Sources/_StringProcessing/Legacy/LegacyCompile.swift (1 line): - line 277: // TODO: Just remember them as we compile Sources/_MatchingEngine/Utility/Misc.swift (1 line): - line 18: // TODO: Replace all fatal error unreachables with these calls. Sources/_StringProcessing/Algorithms/Consumers/CollectionConsumer.swift (1 line): - line 25: // TODO: `@discardableResult`? Sources/_StringProcessing/MatchingOptions.swift (1 line): - line 66: // TODO: include? Sources/_MatchingEngine/Regex/AST/ASTAction.swift (1 line): - line 12: // TODO: This might be interesting in the future, but for now Sources/_MatchingEngine/Regex/Parse/CharacterPropertyClassification.swift (1 line): - line 391: // TODO: Normalize these? Sources/_MatchingEngine/Regex/Parse/Source.swift (1 line): - line 22: // TODO: source should hold outer collection and range, at least Sources/_StringProcessing/Algorithms/Searchers/PatternOrEmpty.swift (1 line): - line 49: // TODO: Avoid a potential copy-on-write copy here Sources/_StringProcessing/Algorithms/Algorithms/Trim.swift (1 line): - line 105: // TODO: Non-escaping and throwing Sources/Prototypes/TourOfTypes/CharacterClass.swift (1 line): - line 46: // FIXME: empty ranges, etc... Sources/_StringProcessing/Legacy/HareVM.swift (1 line): - line 81: // TODO: Which bunny to return? Longest, left most, or what?