Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pitch and Proposal Status #107

Closed
milseman opened this issue Jan 11, 2022 · 2 comments
Closed

Pitch and Proposal Status #107

milseman opened this issue Jan 11, 2022 · 2 comments

Comments

@milseman
Copy link
Member

milseman commented Jan 11, 2022

Regex type and overview

  • TODO: Draft/PR/Thread

Presents basic Regex type and gives an overview of how everything fits into the overall story

TODO: Should we pull more into this topic, perhaps either typed captures or more run-time creation aspects?

Run-time Regex construction

  • Pitch thread: Regex Syntax
    • Brief: Syntactic superset of PCRE2, Oniguruma, ICU, UTS#18, etc.
  • TODO: Pull in discussion of initializers, extended syntaxes, and AnyRegexOutput into this thread

Covers the "interior" syntax, extended syntaxes, run-time construction of a regex from a string, and details of AnyRegexOutput.

Regex literals

Covers the choice of regex delimiter and integration into the Swift programming language.

TODO: Should we pull more into this topic? E.g. introducing typed captures here?

Regex builder DSL

Covers the result builder approach and basic API.

String processing algorithms

Proposes a slew of Regex-powered algorithms.

Introduces CustomMatchingRegexComponent, which is a monadic-parser style interface for external parsers to be used as components of a regex.

Unicode for String Processing

TODO: Where is this at @natecook1000?

Thread on Swift Forums

Covers three topics:

  • Proposes literal and DSL API for library-defined character classes, Unicode scripts and properties, and custom character classes.
  • Proposes literal and DSL API for options that affect matching behavior.
  • Defines how Unicode scalar-based classes are extended to grapheme clusters in the different semantic and other matching modes.

TODO:

  • Pitch API for character classes/scripts/etc. (by 2/25)
  • Pitch option API (by 2/25)
  • Verify grapheme-break semantics (by 2/28)

Target date: Proposal ready for review by 3/7

⏳ SE-0348: buildPartialBlock for result builders

(Old) Overview

Introduces our general approach: regex literals and result builders together.

(Old) Pitch: Regular expression literals

(Old) Pitch: Strongly typed regex captures

Presents the basic result builder approach of putting type arity and kind of capture in generic type parameter position.

The pitch proposes that the whole match ("capture 0") also be a generic parameter, pending a deeper look into details concerning variadic generics and/or additional result builder API.

TODO: Probably makes sense to slurp this up into one of the other pitches.

@milseman
Copy link
Member Author

milseman commented Feb 8, 2022

Added some brief TODOs to help clarify the next tasks for each one

@milseman
Copy link
Member Author

milseman commented Apr 4, 2022

@milseman milseman closed this as completed Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant