From 8b0159563548a2a04437f7579d9afc3bbaf58944 Mon Sep 17 00:00:00 2001 From: Kyle Macomber Date: Tue, 11 Jan 2022 09:52:08 -0800 Subject: [PATCH] Add copyright comment to start of each Swift file --- Sources/Exercises/Exercises.swift | 11 +++++++++++ Sources/Exercises/GraphemeBreakData.swift | 11 +++++++++++ Sources/Exercises/Participant.swift | 11 +++++++++++ .../Participants/HandWrittenParticipant.swift | 11 +++++++++++ Sources/Exercises/Participants/NSREParticipant.swift | 11 +++++++++++ Sources/Exercises/Participants/NaiveParticipant.swift | 11 +++++++++++ Sources/Exercises/Participants/PEGParticipant.swift | 11 +++++++++++ .../Exercises/Participants/ReferenceParticipant.swift | 11 +++++++++++ Sources/Exercises/Participants/RegexParticipant.swift | 11 +++++++++++ Sources/PatternConverter/PatternConverter.swift | 11 +++++++++++ Sources/Prototypes/Combinators/Combinators.swift | 11 +++++++++++ Sources/Prototypes/PEG/PEG.swift | 11 +++++++++++ Sources/Prototypes/PEG/PEGCode.swift | 11 +++++++++++ Sources/Prototypes/PEG/PEGCompile.swift | 11 +++++++++++ Sources/Prototypes/PEG/PEGCore.swift | 11 +++++++++++ Sources/Prototypes/PEG/PEGInterpreter.swift | 11 +++++++++++ Sources/Prototypes/PEG/PEGTranspile.swift | 11 +++++++++++ Sources/Prototypes/PEG/PEGVM.swift | 11 +++++++++++ Sources/Prototypes/PEG/PEGVMExecute.swift | 11 +++++++++++ Sources/Prototypes/PEG/Printing.swift | 11 +++++++++++ Sources/Prototypes/PTCaRet/Interpreter.swift | 11 +++++++++++ Sources/Prototypes/PTCaRet/PTCaRet.swift | 11 +++++++++++ Sources/Prototypes/TourOfTypes/CharacterClass.swift | 11 +++++++++++ Sources/Prototypes/TourOfTypes/Literal.swift | 11 +++++++++++ Sources/VariadicsGenerator/VariadicsGenerator.swift | 11 +++++++++++ Sources/_MatchingEngine/Engine/Builder.swift | 11 +++++++++++ Sources/_MatchingEngine/Engine/Consume.swift | 11 +++++++++++ Sources/_MatchingEngine/Engine/Engine.swift | 11 +++++++++++ Sources/_MatchingEngine/Engine/InstPayload.swift | 11 +++++++++++ Sources/_MatchingEngine/Engine/Instruction.swift | 11 +++++++++++ Sources/_MatchingEngine/Engine/Processor.swift | 11 +++++++++++ Sources/_MatchingEngine/Engine/Program.swift | 11 +++++++++++ Sources/_MatchingEngine/Engine/Registers.swift | 11 +++++++++++ Sources/_MatchingEngine/Engine/Tracing.swift | 11 +++++++++++ Sources/_MatchingEngine/Regex/AST/AST.swift | 11 +++++++++++ Sources/_MatchingEngine/Regex/AST/ASTAction.swift | 11 +++++++++++ Sources/_MatchingEngine/Regex/AST/ASTProtocols.swift | 11 +++++++++++ Sources/_MatchingEngine/Regex/AST/Atom.swift | 11 +++++++++++ .../_MatchingEngine/Regex/AST/CustomCharClass.swift | 11 +++++++++++ Sources/_MatchingEngine/Regex/AST/Group.swift | 11 +++++++++++ .../_MatchingEngine/Regex/AST/MatchingOptions.swift | 11 +++++++++++ .../_MatchingEngine/Regex/AST/Quantification.swift | 11 +++++++++++ .../Regex/Parse/CaptureStructure.swift | 11 +++++++++++ .../Regex/Parse/CharacterPropertyClassification.swift | 11 +++++++++++ Sources/_MatchingEngine/Regex/Parse/Diagnostics.swift | 11 +++++++++++ .../_MatchingEngine/Regex/Parse/LexicalAnalysis.swift | 11 +++++++++++ Sources/_MatchingEngine/Regex/Parse/Mocking.swift | 11 +++++++++++ Sources/_MatchingEngine/Regex/Parse/Parse.swift | 11 +++++++++++ Sources/_MatchingEngine/Regex/Parse/Source.swift | 11 +++++++++++ .../_MatchingEngine/Regex/Parse/SourceLocation.swift | 11 +++++++++++ .../_MatchingEngine/Regex/Parse/SyntaxOptions.swift | 11 +++++++++++ Sources/_MatchingEngine/Regex/Printing/DumpAST.swift | 11 +++++++++++ .../Regex/Printing/PrettyPrinter.swift | 11 +++++++++++ .../Regex/Printing/PrintAsCanonical.swift | 11 +++++++++++ .../Regex/Printing/PrintAsPattern.swift | 11 +++++++++++ .../_MatchingEngine/Regex/Printing/RenderRanges.swift | 11 +++++++++++ Sources/_MatchingEngine/Utility/AllScalars.swift | 11 +++++++++++ Sources/_MatchingEngine/Utility/Formatting.swift | 11 +++++++++++ Sources/_MatchingEngine/Utility/Misc.swift | 11 +++++++++++ Sources/_MatchingEngine/Utility/Misc_2.swift | 11 +++++++++++ Sources/_MatchingEngine/Utility/MissingUnicode.swift | 11 +++++++++++ Sources/_MatchingEngine/Utility/Protocols.swift | 11 +++++++++++ .../_MatchingEngine/Utility/TypeConstruction.swift | 11 +++++++++++ Sources/_MatchingEngine/Utility/TypedIndex.swift | 11 +++++++++++ Sources/_MatchingEngine/Utility/TypedInt.swift | 11 +++++++++++ Sources/_StringProcessing/ASTBuilder.swift | 11 +++++++++++ .../Algorithms/Algorithms/Contains.swift | 11 +++++++++++ .../Algorithms/Algorithms/FirstRange.swift | 11 +++++++++++ .../Algorithms/Algorithms/Ranges.swift | 11 +++++++++++ .../Algorithms/Algorithms/Replace.swift | 11 +++++++++++ .../Algorithms/Algorithms/Split.swift | 11 +++++++++++ .../Algorithms/Algorithms/StartsWith.swift | 11 +++++++++++ .../Algorithms/Algorithms/Trim.swift | 11 +++++++++++ .../Algorithms/Consumers/CollectionConsumer.swift | 11 +++++++++++ .../Algorithms/Consumers/FixedPatternConsumer.swift | 11 +++++++++++ .../Algorithms/Consumers/ManyConsumer.swift | 11 +++++++++++ .../Algorithms/Consumers/PredicateConsumer.swift | 11 +++++++++++ .../Algorithms/Consumers/RegexConsumer.swift | 11 +++++++++++ .../Algorithms/Searchers/CollectionSearcher.swift | 11 +++++++++++ .../Algorithms/Searchers/ConsumerSearcher.swift | 11 +++++++++++ .../Algorithms/Searchers/NaivePatternSearcher.swift | 11 +++++++++++ .../Algorithms/Searchers/PatternOrEmpty.swift | 11 +++++++++++ .../Algorithms/Searchers/PredicateSearcher.swift | 11 +++++++++++ .../Algorithms/Searchers/TwoWaySearcher.swift | 11 +++++++++++ .../Algorithms/Searchers/ZSearcher.swift | 11 +++++++++++ Sources/_StringProcessing/Capture.swift | 11 +++++++++++ Sources/_StringProcessing/CharacterClass.swift | 11 +++++++++++ Sources/_StringProcessing/Compiler.swift | 11 +++++++++++ Sources/_StringProcessing/ConsumerInterface.swift | 11 +++++++++++ Sources/_StringProcessing/Executor.swift | 11 +++++++++++ Sources/_StringProcessing/Legacy/HareVM.swift | 11 +++++++++++ Sources/_StringProcessing/Legacy/LegacyCompile.swift | 11 +++++++++++ Sources/_StringProcessing/Legacy/RECode.swift | 11 +++++++++++ Sources/_StringProcessing/Legacy/TortoiseVM.swift | 11 +++++++++++ Sources/_StringProcessing/Legacy/VirtualMachine.swift | 11 +++++++++++ Sources/_StringProcessing/RegexDSL/Builder.swift | 11 +++++++++++ .../_StringProcessing/RegexDSL/Concatenation.swift | 11 +++++++++++ Sources/_StringProcessing/RegexDSL/Core.swift | 11 +++++++++++ Sources/_StringProcessing/RegexDSL/DSL.swift | 11 +++++++++++ Sources/_StringProcessing/RegexDSL/DSLCapture.swift | 11 +++++++++++ .../_StringProcessing/RegexDSL/DynamicCaptures.swift | 11 +++++++++++ Sources/_Unicode/CaseConversion.swift | 11 +++++++++++ Sources/_Unicode/CharacterProps.swift | 11 +++++++++++ Sources/_Unicode/Comparison.swift | 11 +++++++++++ Sources/_Unicode/Decoding.swift | 11 +++++++++++ Sources/_Unicode/Encodings.swift | 11 +++++++++++ Sources/_Unicode/Formatting.swift | 11 +++++++++++ Sources/_Unicode/Graphemes.swift | 11 +++++++++++ Sources/_Unicode/NecessaryEvils.swift | 11 +++++++++++ Sources/_Unicode/Normaliation.swift | 11 +++++++++++ Sources/_Unicode/NumberParsing.swift | 11 +++++++++++ Sources/_Unicode/ScalarProps.swift | 11 +++++++++++ Sources/_Unicode/Transcoding.swift | 11 +++++++++++ Sources/_Unicode/UCD.swift | 11 +++++++++++ Sources/_Unicode/Validation.swift | 11 +++++++++++ Tests/ExercisesTests/ExercisesTests.swift | 11 +++++++++++ Tests/MatchingEngineTests/MatchingEngineTests.swift | 11 +++++++++++ Tests/MatchingEngineTests/UtilTests.swift | 11 +++++++++++ Tests/PrototypesTests/CombinatorsTests.swift | 11 +++++++++++ Tests/PrototypesTests/PEGTests.swift | 11 +++++++++++ Tests/PrototypesTests/PTCaRetTests.swift | 11 +++++++++++ Tests/RegexTests/AlgorithmsTests.swift | 11 +++++++++++ Tests/RegexTests/AllScalarsTests.swift | 11 +++++++++++ Tests/RegexTests/CompileTests.swift | 11 +++++++++++ Tests/RegexTests/DiagnosticTests.swift | 11 +++++++++++ Tests/RegexTests/LegacyTests.swift | 11 +++++++++++ Tests/RegexTests/LexTests.swift | 11 +++++++++++ Tests/RegexTests/MatchTests.swift | 11 +++++++++++ Tests/RegexTests/ParseTests.swift | 11 +++++++++++ Tests/RegexTests/RegexDSLTests.swift | 11 +++++++++++ Tests/RegexTests/SyntaxOptionsTests.swift | 11 +++++++++++ Tests/UnicodeTests/Decoding.swift | 11 +++++++++++ 132 files changed, 1452 insertions(+) diff --git a/Sources/Exercises/Exercises.swift b/Sources/Exercises/Exercises.swift index bc3fbfc16..f9801ca90 100644 --- a/Sources/Exercises/Exercises.swift +++ b/Sources/Exercises/Exercises.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + public enum Exercises { public static var allParticipants: Array { [ diff --git a/Sources/Exercises/GraphemeBreakData.swift b/Sources/Exercises/GraphemeBreakData.swift index c5dec2257..f0bcb8a17 100644 --- a/Sources/Exercises/GraphemeBreakData.swift +++ b/Sources/Exercises/GraphemeBreakData.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension Unicode.Scalar { // Convert a hexadecimal string to a scalar public init?(hex: S) { diff --git a/Sources/Exercises/Participant.swift b/Sources/Exercises/Participant.swift index cdb793bbd..2f7ec183b 100644 --- a/Sources/Exercises/Participant.swift +++ b/Sources/Exercises/Participant.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /// Participants engage in a number of exercises. /// /// Default implementations will throw `Unsupported`. diff --git a/Sources/Exercises/Participants/HandWrittenParticipant.swift b/Sources/Exercises/Participants/HandWrittenParticipant.swift index e5675f799..e7228b333 100644 --- a/Sources/Exercises/Participants/HandWrittenParticipant.swift +++ b/Sources/Exercises/Participants/HandWrittenParticipant.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + struct HandWrittenParticipant: Participant { static var name: String { "HandWritten" } diff --git a/Sources/Exercises/Participants/NSREParticipant.swift b/Sources/Exercises/Participants/NSREParticipant.swift index 1b3ffb4bd..d366a67f1 100644 --- a/Sources/Exercises/Participants/NSREParticipant.swift +++ b/Sources/Exercises/Participants/NSREParticipant.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import Foundation struct NSREParticipant: Participant { diff --git a/Sources/Exercises/Participants/NaiveParticipant.swift b/Sources/Exercises/Participants/NaiveParticipant.swift index 10cf9a567..f90b0b7cc 100644 --- a/Sources/Exercises/Participants/NaiveParticipant.swift +++ b/Sources/Exercises/Participants/NaiveParticipant.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + struct NaiveParticipant: Participant { static var name: String { "Naive" } diff --git a/Sources/Exercises/Participants/PEGParticipant.swift b/Sources/Exercises/Participants/PEGParticipant.swift index 8238c2ccd..670f286a8 100644 --- a/Sources/Exercises/Participants/PEGParticipant.swift +++ b/Sources/Exercises/Participants/PEGParticipant.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + struct PEGParticipant: Participant { static var name: String { "PEG" } } diff --git a/Sources/Exercises/Participants/ReferenceParticipant.swift b/Sources/Exercises/Participants/ReferenceParticipant.swift index d8122a11b..63221f847 100644 --- a/Sources/Exercises/Participants/ReferenceParticipant.swift +++ b/Sources/Exercises/Participants/ReferenceParticipant.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + struct ReferenceParticipant: Participant { static var name: String { "Reference" } diff --git a/Sources/Exercises/Participants/RegexParticipant.swift b/Sources/Exercises/Participants/RegexParticipant.swift index 89f4965cb..300832a7f 100644 --- a/Sources/Exercises/Participants/RegexParticipant.swift +++ b/Sources/Exercises/Participants/RegexParticipant.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _StringProcessing /* diff --git a/Sources/PatternConverter/PatternConverter.swift b/Sources/PatternConverter/PatternConverter.swift index 39b42b17c..3e5d8485c 100644 --- a/Sources/PatternConverter/PatternConverter.swift +++ b/Sources/PatternConverter/PatternConverter.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // swift run PatternConverter import ArgumentParser diff --git a/Sources/Prototypes/Combinators/Combinators.swift b/Sources/Prototypes/Combinators/Combinators.swift index e76c3e4ce..eddef70b0 100644 --- a/Sources/Prototypes/Combinators/Combinators.swift +++ b/Sources/Prototypes/Combinators/Combinators.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine /* diff --git a/Sources/Prototypes/PEG/PEG.swift b/Sources/Prototypes/PEG/PEG.swift index cb2cb7794..03440fcb7 100644 --- a/Sources/Prototypes/PEG/PEG.swift +++ b/Sources/Prototypes/PEG/PEG.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + public enum PEG {} extension PEG { diff --git a/Sources/Prototypes/PEG/PEGCode.swift b/Sources/Prototypes/PEG/PEGCode.swift index 48e5fc639..2398ca2ff 100644 --- a/Sources/Prototypes/PEG/PEGCode.swift +++ b/Sources/Prototypes/PEG/PEGCode.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine extension PEG.VM { diff --git a/Sources/Prototypes/PEG/PEGCompile.swift b/Sources/Prototypes/PEG/PEGCompile.swift index 63dc3d4ff..7268de450 100644 --- a/Sources/Prototypes/PEG/PEGCompile.swift +++ b/Sources/Prototypes/PEG/PEGCompile.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine extension PEG.VM { diff --git a/Sources/Prototypes/PEG/PEGCore.swift b/Sources/Prototypes/PEG/PEGCore.swift index b73932cd3..f8f4458a7 100644 --- a/Sources/Prototypes/PEG/PEGCore.swift +++ b/Sources/Prototypes/PEG/PEGCore.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine let emitComments = true diff --git a/Sources/Prototypes/PEG/PEGInterpreter.swift b/Sources/Prototypes/PEG/PEGInterpreter.swift index 6f0e61c59..ef849c3c9 100644 --- a/Sources/Prototypes/PEG/PEGInterpreter.swift +++ b/Sources/Prototypes/PEG/PEGInterpreter.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import XCTest extension PEG { struct Grammar { diff --git a/Sources/Prototypes/PEG/PEGTranspile.swift b/Sources/Prototypes/PEG/PEGTranspile.swift index 227076cec..440310b08 100644 --- a/Sources/Prototypes/PEG/PEGTranspile.swift +++ b/Sources/Prototypes/PEG/PEGTranspile.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine extension PEG.VM { diff --git a/Sources/Prototypes/PEG/PEGVM.swift b/Sources/Prototypes/PEG/PEGVM.swift index 6660ec12d..58faef2d2 100644 --- a/Sources/Prototypes/PEG/PEGVM.swift +++ b/Sources/Prototypes/PEG/PEGVM.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine extension PEG { diff --git a/Sources/Prototypes/PEG/PEGVMExecute.swift b/Sources/Prototypes/PEG/PEGVMExecute.swift index db9bd04f2..be7773ebb 100644 --- a/Sources/Prototypes/PEG/PEGVMExecute.swift +++ b/Sources/Prototypes/PEG/PEGVMExecute.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension PEG.VM { // TODO: Consumers need a concept of forward progress. diff --git a/Sources/Prototypes/PEG/Printing.swift b/Sources/Prototypes/PEG/Printing.swift index a85003d35..5d1a8bc64 100644 --- a/Sources/Prototypes/PEG/Printing.swift +++ b/Sources/Prototypes/PEG/Printing.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine extension PEGCore.Instruction: InstructionProtocol { diff --git a/Sources/Prototypes/PTCaRet/Interpreter.swift b/Sources/Prototypes/PTCaRet/Interpreter.swift index 6d2f5de1d..a1246216a 100644 --- a/Sources/Prototypes/PTCaRet/Interpreter.swift +++ b/Sources/Prototypes/PTCaRet/Interpreter.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension PTCaRet { diff --git a/Sources/Prototypes/PTCaRet/PTCaRet.swift b/Sources/Prototypes/PTCaRet/PTCaRet.swift index 5a58264d3..925c84f41 100644 --- a/Sources/Prototypes/PTCaRet/PTCaRet.swift +++ b/Sources/Prototypes/PTCaRet/PTCaRet.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /* diff --git a/Sources/Prototypes/TourOfTypes/CharacterClass.swift b/Sources/Prototypes/TourOfTypes/CharacterClass.swift index 7eed57b68..0196fcdc2 100644 --- a/Sources/Prototypes/TourOfTypes/CharacterClass.swift +++ b/Sources/Prototypes/TourOfTypes/CharacterClass.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // MARK: - Element Consumer /// An alternate formation of consumers: Don't bind collection type as we're just diff --git a/Sources/Prototypes/TourOfTypes/Literal.swift b/Sources/Prototypes/TourOfTypes/Literal.swift index 778bbe145..17b95856b 100644 --- a/Sources/Prototypes/TourOfTypes/Literal.swift +++ b/Sources/Prototypes/TourOfTypes/Literal.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // MARK: - Pitched Compiler/library interface /// Conform to this to support regex literals diff --git a/Sources/VariadicsGenerator/VariadicsGenerator.swift b/Sources/VariadicsGenerator/VariadicsGenerator.swift index d9a9edc73..390bb4577 100644 --- a/Sources/VariadicsGenerator/VariadicsGenerator.swift +++ b/Sources/VariadicsGenerator/VariadicsGenerator.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // swift run VariadicsGenerator --max-arity 7 > Sources/_StringProcessing/RegexDSL/Concatenation.swift import ArgumentParser diff --git a/Sources/_MatchingEngine/Engine/Builder.swift b/Sources/_MatchingEngine/Engine/Builder.swift index fd505d13f..2adfaf762 100644 --- a/Sources/_MatchingEngine/Engine/Builder.swift +++ b/Sources/_MatchingEngine/Engine/Builder.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension Program where Input.Element: Hashable { public struct Builder { var instructions: [Instruction] = [] diff --git a/Sources/_MatchingEngine/Engine/Consume.swift b/Sources/_MatchingEngine/Engine/Consume.swift index b66c59f15..c5e617202 100644 --- a/Sources/_MatchingEngine/Engine/Consume.swift +++ b/Sources/_MatchingEngine/Engine/Consume.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + var checkComments = true extension Engine { diff --git a/Sources/_MatchingEngine/Engine/Engine.swift b/Sources/_MatchingEngine/Engine/Engine.swift index 45b8b2edf..09f3b32c3 100644 --- a/Sources/_MatchingEngine/Engine/Engine.swift +++ b/Sources/_MatchingEngine/Engine/Engine.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // Currently, engine binds the type and consume binds an instance. // But, we can play around with this. public struct Engine where Input.Element: Hashable { diff --git a/Sources/_MatchingEngine/Engine/InstPayload.swift b/Sources/_MatchingEngine/Engine/InstPayload.swift index ee6355403..909d5c3f1 100644 --- a/Sources/_MatchingEngine/Engine/InstPayload.swift +++ b/Sources/_MatchingEngine/Engine/InstPayload.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension Instruction { /// An instruction's payload packs operands and destination diff --git a/Sources/_MatchingEngine/Engine/Instruction.swift b/Sources/_MatchingEngine/Engine/Instruction.swift index 09d5c52b2..dc5e8a6fd 100644 --- a/Sources/_MatchingEngine/Engine/Instruction.swift +++ b/Sources/_MatchingEngine/Engine/Instruction.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /// A single instruction for the matching engine to execute /// /// Instructions are 64-bits, consisting of an 8-bit opcode diff --git a/Sources/_MatchingEngine/Engine/Processor.swift b/Sources/_MatchingEngine/Engine/Processor.swift index f4a0f8c41..aef6f28f4 100644 --- a/Sources/_MatchingEngine/Engine/Processor.swift +++ b/Sources/_MatchingEngine/Engine/Processor.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + public enum MatchMode { case full case `prefix` diff --git a/Sources/_MatchingEngine/Engine/Program.swift b/Sources/_MatchingEngine/Engine/Program.swift index 4deec8785..5737fd8ee 100644 --- a/Sources/_MatchingEngine/Engine/Program.swift +++ b/Sources/_MatchingEngine/Engine/Program.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + public struct Program where Input.Element: Equatable { public typealias ConsumeFunction = (Input, Range) -> Input.Index? public typealias AssertionFunction = diff --git a/Sources/_MatchingEngine/Engine/Registers.swift b/Sources/_MatchingEngine/Engine/Registers.swift index a9e210324..517b8e1aa 100644 --- a/Sources/_MatchingEngine/Engine/Registers.swift +++ b/Sources/_MatchingEngine/Engine/Registers.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension Processor { /// Our register file struct Registers { diff --git a/Sources/_MatchingEngine/Engine/Tracing.swift b/Sources/_MatchingEngine/Engine/Tracing.swift index 37ce20d31..7db740f52 100644 --- a/Sources/_MatchingEngine/Engine/Tracing.swift +++ b/Sources/_MatchingEngine/Engine/Tracing.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension Processor: TracedProcessor { var isFailState: Bool { state == .fail } var isAcceptState: Bool { state == .accept } diff --git a/Sources/_MatchingEngine/Regex/AST/AST.swift b/Sources/_MatchingEngine/Regex/AST/AST.swift index 646cd6b83..4890e4bac 100644 --- a/Sources/_MatchingEngine/Regex/AST/AST.swift +++ b/Sources/_MatchingEngine/Regex/AST/AST.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /// A regex abstract syntax tree public indirect enum AST: Hashable/*, _ASTPrintable ASTValue, ASTAction*/ diff --git a/Sources/_MatchingEngine/Regex/AST/ASTAction.swift b/Sources/_MatchingEngine/Regex/AST/ASTAction.swift index 81f3e860a..0630ebc6d 100644 --- a/Sources/_MatchingEngine/Regex/AST/ASTAction.swift +++ b/Sources/_MatchingEngine/Regex/AST/ASTAction.swift @@ -1,2 +1,13 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO: This might be interesting in the future, but for now // we make trees diff --git a/Sources/_MatchingEngine/Regex/AST/ASTProtocols.swift b/Sources/_MatchingEngine/Regex/AST/ASTProtocols.swift index cb23071d8..52017f51c 100644 --- a/Sources/_MatchingEngine/Regex/AST/ASTProtocols.swift +++ b/Sources/_MatchingEngine/Regex/AST/ASTProtocols.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /* Common protocols for AST nodes and values. These allow us diff --git a/Sources/_MatchingEngine/Regex/AST/Atom.swift b/Sources/_MatchingEngine/Regex/AST/Atom.swift index cdea924a4..e0cb9df66 100644 --- a/Sources/_MatchingEngine/Regex/AST/Atom.swift +++ b/Sources/_MatchingEngine/Regex/AST/Atom.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension AST { public struct Atom: Hashable, _ASTNode { public let kind: Kind diff --git a/Sources/_MatchingEngine/Regex/AST/CustomCharClass.swift b/Sources/_MatchingEngine/Regex/AST/CustomCharClass.swift index 10482db62..c2654e4f8 100644 --- a/Sources/_MatchingEngine/Regex/AST/CustomCharClass.swift +++ b/Sources/_MatchingEngine/Regex/AST/CustomCharClass.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension AST { public struct CustomCharacterClass: Hashable { diff --git a/Sources/_MatchingEngine/Regex/AST/Group.swift b/Sources/_MatchingEngine/Regex/AST/Group.swift index ded05fd57..3ef1b7652 100644 --- a/Sources/_MatchingEngine/Regex/AST/Group.swift +++ b/Sources/_MatchingEngine/Regex/AST/Group.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension AST { public struct Group: Hashable { public let kind: Located diff --git a/Sources/_MatchingEngine/Regex/AST/MatchingOptions.swift b/Sources/_MatchingEngine/Regex/AST/MatchingOptions.swift index e524cac69..dd331ca3e 100644 --- a/Sources/_MatchingEngine/Regex/AST/MatchingOptions.swift +++ b/Sources/_MatchingEngine/Regex/AST/MatchingOptions.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension AST { /// An option written in source that changes matching semantics. public struct MatchingOption: Hashable { diff --git a/Sources/_MatchingEngine/Regex/AST/Quantification.swift b/Sources/_MatchingEngine/Regex/AST/Quantification.swift index bd46179ba..e27493bd6 100644 --- a/Sources/_MatchingEngine/Regex/AST/Quantification.swift +++ b/Sources/_MatchingEngine/Regex/AST/Quantification.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension AST { public struct Quantification: Hashable { public let amount: Located diff --git a/Sources/_MatchingEngine/Regex/Parse/CaptureStructure.swift b/Sources/_MatchingEngine/Regex/Parse/CaptureStructure.swift index 176c2deba..49450f478 100644 --- a/Sources/_MatchingEngine/Regex/Parse/CaptureStructure.swift +++ b/Sources/_MatchingEngine/Regex/Parse/CaptureStructure.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // A tree representing the type of some captures. public enum CaptureStructure: Equatable { case atom(name: String? = nil) diff --git a/Sources/_MatchingEngine/Regex/Parse/CharacterPropertyClassification.swift b/Sources/_MatchingEngine/Regex/Parse/CharacterPropertyClassification.swift index e19b83ad2..6a5740aa1 100644 --- a/Sources/_MatchingEngine/Regex/Parse/CharacterPropertyClassification.swift +++ b/Sources/_MatchingEngine/Regex/Parse/CharacterPropertyClassification.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension Source { typealias PropertyKind = AST.Atom.CharacterProperty.Kind diff --git a/Sources/_MatchingEngine/Regex/Parse/Diagnostics.swift b/Sources/_MatchingEngine/Regex/Parse/Diagnostics.swift index fc7b3c12e..7ee108394 100644 --- a/Sources/_MatchingEngine/Regex/Parse/Diagnostics.swift +++ b/Sources/_MatchingEngine/Regex/Parse/Diagnostics.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // MARK: - Parse errors enum ParseError: Error, Hashable { diff --git a/Sources/_MatchingEngine/Regex/Parse/LexicalAnalysis.swift b/Sources/_MatchingEngine/Regex/Parse/LexicalAnalysis.swift index 7180ef3ca..d9cedee43 100644 --- a/Sources/_MatchingEngine/Regex/Parse/LexicalAnalysis.swift +++ b/Sources/_MatchingEngine/Regex/Parse/LexicalAnalysis.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /* Lexical analysis aids parsing by handling local ("lexical") diff --git a/Sources/_MatchingEngine/Regex/Parse/Mocking.swift b/Sources/_MatchingEngine/Regex/Parse/Mocking.swift index 33f168c48..b6fefc39f 100644 --- a/Sources/_MatchingEngine/Regex/Parse/Mocking.swift +++ b/Sources/_MatchingEngine/Regex/Parse/Mocking.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO: mock up multi-line soon diff --git a/Sources/_MatchingEngine/Regex/Parse/Parse.swift b/Sources/_MatchingEngine/Regex/Parse/Parse.swift index c72d4d345..de725ab47 100644 --- a/Sources/_MatchingEngine/Regex/Parse/Parse.swift +++ b/Sources/_MatchingEngine/Regex/Parse/Parse.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /* Syntactic structure of a regular expression diff --git a/Sources/_MatchingEngine/Regex/Parse/Source.swift b/Sources/_MatchingEngine/Regex/Parse/Source.swift index d48e02f94..d373fefa7 100644 --- a/Sources/_MatchingEngine/Regex/Parse/Source.swift +++ b/Sources/_MatchingEngine/Regex/Parse/Source.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /// The source given to a parser. This can be bytes in memory, a file on disk, /// something streamed over a network connection, etc. /// diff --git a/Sources/_MatchingEngine/Regex/Parse/SourceLocation.swift b/Sources/_MatchingEngine/Regex/Parse/SourceLocation.swift index 0135150b1..42fe8886b 100644 --- a/Sources/_MatchingEngine/Regex/Parse/SourceLocation.swift +++ b/Sources/_MatchingEngine/Regex/Parse/SourceLocation.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension Source { /// The location in the input of a parsed entity, presented as a region over the input public struct Location: Hashable { diff --git a/Sources/_MatchingEngine/Regex/Parse/SyntaxOptions.swift b/Sources/_MatchingEngine/Regex/Parse/SyntaxOptions.swift index b1b6cfbef..457232da5 100644 --- a/Sources/_MatchingEngine/Regex/Parse/SyntaxOptions.swift +++ b/Sources/_MatchingEngine/Regex/Parse/SyntaxOptions.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + public struct SyntaxOptions: OptionSet { public var rawValue: UInt diff --git a/Sources/_MatchingEngine/Regex/Printing/DumpAST.swift b/Sources/_MatchingEngine/Regex/Printing/DumpAST.swift index e5c34f3d7..721d9666a 100644 --- a/Sources/_MatchingEngine/Regex/Printing/DumpAST.swift +++ b/Sources/_MatchingEngine/Regex/Printing/DumpAST.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /// AST entities can be pretty-printed or dumped /// /// Alternative: just use `description` for pretty-print diff --git a/Sources/_MatchingEngine/Regex/Printing/PrettyPrinter.swift b/Sources/_MatchingEngine/Regex/Printing/PrettyPrinter.swift index 89662d46e..eff9b80ce 100644 --- a/Sources/_MatchingEngine/Regex/Printing/PrettyPrinter.swift +++ b/Sources/_MatchingEngine/Regex/Printing/PrettyPrinter.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /// Track and handle state relevant to pretty-printing ASTs. struct PrettyPrinter { // Configuration diff --git a/Sources/_MatchingEngine/Regex/Printing/PrintAsCanonical.swift b/Sources/_MatchingEngine/Regex/Printing/PrintAsCanonical.swift index 283354f70..fec574ffd 100644 --- a/Sources/_MatchingEngine/Regex/Printing/PrintAsCanonical.swift +++ b/Sources/_MatchingEngine/Regex/Printing/PrintAsCanonical.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO: Round-tripping tests extension AST { diff --git a/Sources/_MatchingEngine/Regex/Printing/PrintAsPattern.swift b/Sources/_MatchingEngine/Regex/Printing/PrintAsPattern.swift index ad1edcbd4..5c4b4b716 100644 --- a/Sources/_MatchingEngine/Regex/Printing/PrintAsPattern.swift +++ b/Sources/_MatchingEngine/Regex/Printing/PrintAsPattern.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO: Add an expansion level, both from top to bottom. // After `printAsCanonical` is fleshed out, these two // printers can call each other. This would enable diff --git a/Sources/_MatchingEngine/Regex/Printing/RenderRanges.swift b/Sources/_MatchingEngine/Regex/Printing/RenderRanges.swift index f06a1e440..a056caf17 100644 --- a/Sources/_MatchingEngine/Regex/Printing/RenderRanges.swift +++ b/Sources/_MatchingEngine/Regex/Printing/RenderRanges.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // Useful for testing, debugging, etc. extension AST { func _postOrder() -> Array { diff --git a/Sources/_MatchingEngine/Utility/AllScalars.swift b/Sources/_MatchingEngine/Utility/AllScalars.swift index cab26241b..ec3bf81ea 100644 --- a/Sources/_MatchingEngine/Utility/AllScalars.swift +++ b/Sources/_MatchingEngine/Utility/AllScalars.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension Unicode.Scalar { public struct AllScalars: RandomAccessCollection { // Unicode scalar values are in two discontiguous blocks: diff --git a/Sources/_MatchingEngine/Utility/Formatting.swift b/Sources/_MatchingEngine/Utility/Formatting.swift index e3970a74e..c270aba23 100644 --- a/Sources/_MatchingEngine/Utility/Formatting.swift +++ b/Sources/_MatchingEngine/Utility/Formatting.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO: Place shared formatting and trace infrastructure here diff --git a/Sources/_MatchingEngine/Utility/Misc.swift b/Sources/_MatchingEngine/Utility/Misc.swift index 971812d88..11380cb58 100644 --- a/Sources/_MatchingEngine/Utility/Misc.swift +++ b/Sources/_MatchingEngine/Utility/Misc.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension FixedWidthInteger { var hexStr: String { diff --git a/Sources/_MatchingEngine/Utility/Misc_2.swift b/Sources/_MatchingEngine/Utility/Misc_2.swift index 2b76b434d..2535f48f5 100644 --- a/Sources/_MatchingEngine/Utility/Misc_2.swift +++ b/Sources/_MatchingEngine/Utility/Misc_2.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension CustomStringConvertible { @_alwaysEmitIntoClient public var halfWidthCornerQuoted: String { diff --git a/Sources/_MatchingEngine/Utility/MissingUnicode.swift b/Sources/_MatchingEngine/Utility/MissingUnicode.swift index 0a1a7c953..109aae324 100644 --- a/Sources/_MatchingEngine/Utility/MissingUnicode.swift +++ b/Sources/_MatchingEngine/Utility/MissingUnicode.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // MARK: - Missing stdlib API extension Unicode { diff --git a/Sources/_MatchingEngine/Utility/Protocols.swift b/Sources/_MatchingEngine/Utility/Protocols.swift index 822bb0ea7..9c196c18c 100644 --- a/Sources/_MatchingEngine/Utility/Protocols.swift +++ b/Sources/_MatchingEngine/Utility/Protocols.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // These currently only drive tracing/formatting, but could drive // more diff --git a/Sources/_MatchingEngine/Utility/TypeConstruction.swift b/Sources/_MatchingEngine/Utility/TypeConstruction.swift index d08f142e4..591e7d80c 100644 --- a/Sources/_MatchingEngine/Utility/TypeConstruction.swift +++ b/Sources/_MatchingEngine/Utility/TypeConstruction.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // Swift runtime metadata functions. // SWIFT_RUNTIME_EXPORT SWIFT_CC(swift) // MetadataResponse diff --git a/Sources/_MatchingEngine/Utility/TypedIndex.swift b/Sources/_MatchingEngine/Utility/TypedIndex.swift index 4a370f24c..3bddcadfd 100644 --- a/Sources/_MatchingEngine/Utility/TypedIndex.swift +++ b/Sources/_MatchingEngine/Utility/TypedIndex.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /// Forwarding wrapper around Int-index collections that provide a /// strongly (phantom) typed index. diff --git a/Sources/_MatchingEngine/Utility/TypedInt.swift b/Sources/_MatchingEngine/Utility/TypedInt.swift index d25028e54..60bbe7c72 100644 --- a/Sources/_MatchingEngine/Utility/TypedInt.swift +++ b/Sources/_MatchingEngine/Utility/TypedInt.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // Just a phantom-typed Int wrapper. @frozen diff --git a/Sources/_StringProcessing/ASTBuilder.swift b/Sources/_StringProcessing/ASTBuilder.swift index c2438f2b6..793f90892 100644 --- a/Sources/_StringProcessing/ASTBuilder.swift +++ b/Sources/_StringProcessing/ASTBuilder.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /* These functions are temporary AST construction helpers. As diff --git a/Sources/_StringProcessing/Algorithms/Algorithms/Contains.swift b/Sources/_StringProcessing/Algorithms/Algorithms/Contains.swift index 73aacc24b..fdc718ce4 100644 --- a/Sources/_StringProcessing/Algorithms/Algorithms/Contains.swift +++ b/Sources/_StringProcessing/Algorithms/Algorithms/Contains.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // MARK: `CollectionSearcher` algorithms extension Collection { diff --git a/Sources/_StringProcessing/Algorithms/Algorithms/FirstRange.swift b/Sources/_StringProcessing/Algorithms/Algorithms/FirstRange.swift index 09b5d607d..97f7248cd 100644 --- a/Sources/_StringProcessing/Algorithms/Algorithms/FirstRange.swift +++ b/Sources/_StringProcessing/Algorithms/Algorithms/FirstRange.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // MARK: `CollectionSearcher` algorithms extension Collection { diff --git a/Sources/_StringProcessing/Algorithms/Algorithms/Ranges.swift b/Sources/_StringProcessing/Algorithms/Algorithms/Ranges.swift index 9cddac95a..d4b407202 100644 --- a/Sources/_StringProcessing/Algorithms/Algorithms/Ranges.swift +++ b/Sources/_StringProcessing/Algorithms/Algorithms/Ranges.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // MARK: `RangesCollection` public struct RangesCollection { diff --git a/Sources/_StringProcessing/Algorithms/Algorithms/Replace.swift b/Sources/_StringProcessing/Algorithms/Algorithms/Replace.swift index 5f78d8618..120378cec 100644 --- a/Sources/_StringProcessing/Algorithms/Algorithms/Replace.swift +++ b/Sources/_StringProcessing/Algorithms/Algorithms/Replace.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // MARK: `CollectionSearcher` algorithms extension RangeReplaceableCollection { diff --git a/Sources/_StringProcessing/Algorithms/Algorithms/Split.swift b/Sources/_StringProcessing/Algorithms/Algorithms/Split.swift index 274e49171..cf64af478 100644 --- a/Sources/_StringProcessing/Algorithms/Algorithms/Split.swift +++ b/Sources/_StringProcessing/Algorithms/Algorithms/Split.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // MARK: `SplitCollection` public struct SplitCollection { diff --git a/Sources/_StringProcessing/Algorithms/Algorithms/StartsWith.swift b/Sources/_StringProcessing/Algorithms/Algorithms/StartsWith.swift index a0f8e70a2..0ed6faf2c 100644 --- a/Sources/_StringProcessing/Algorithms/Algorithms/StartsWith.swift +++ b/Sources/_StringProcessing/Algorithms/Algorithms/StartsWith.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // MARK: `CollectionConsumer` algorithms extension Collection { diff --git a/Sources/_StringProcessing/Algorithms/Algorithms/Trim.swift b/Sources/_StringProcessing/Algorithms/Algorithms/Trim.swift index 2161ecb76..9a5afc582 100644 --- a/Sources/_StringProcessing/Algorithms/Algorithms/Trim.swift +++ b/Sources/_StringProcessing/Algorithms/Algorithms/Trim.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // MARK: `CollectionConsumer` algorithms extension Collection { diff --git a/Sources/_StringProcessing/Algorithms/Consumers/CollectionConsumer.swift b/Sources/_StringProcessing/Algorithms/Consumers/CollectionConsumer.swift index d3439880e..95f772d7b 100644 --- a/Sources/_StringProcessing/Algorithms/Consumers/CollectionConsumer.swift +++ b/Sources/_StringProcessing/Algorithms/Consumers/CollectionConsumer.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + public protocol CollectionConsumer { associatedtype Consumed: Collection func consuming( diff --git a/Sources/_StringProcessing/Algorithms/Consumers/FixedPatternConsumer.swift b/Sources/_StringProcessing/Algorithms/Consumers/FixedPatternConsumer.swift index eea037b55..e611f477a 100644 --- a/Sources/_StringProcessing/Algorithms/Consumers/FixedPatternConsumer.swift +++ b/Sources/_StringProcessing/Algorithms/Consumers/FixedPatternConsumer.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + struct FixedPatternConsumer where Consumed.Element: Equatable, Pattern.Element == Consumed.Element { diff --git a/Sources/_StringProcessing/Algorithms/Consumers/ManyConsumer.swift b/Sources/_StringProcessing/Algorithms/Consumers/ManyConsumer.swift index 77f142146..10d9fd5c3 100644 --- a/Sources/_StringProcessing/Algorithms/Consumers/ManyConsumer.swift +++ b/Sources/_StringProcessing/Algorithms/Consumers/ManyConsumer.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + struct ManyConsumer { let base: Base } diff --git a/Sources/_StringProcessing/Algorithms/Consumers/PredicateConsumer.swift b/Sources/_StringProcessing/Algorithms/Consumers/PredicateConsumer.swift index fb7268b50..52b4802d9 100644 --- a/Sources/_StringProcessing/Algorithms/Consumers/PredicateConsumer.swift +++ b/Sources/_StringProcessing/Algorithms/Consumers/PredicateConsumer.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + public struct PredicateConsumer { let predicate: (Consumed.Element) -> Bool } diff --git a/Sources/_StringProcessing/Algorithms/Consumers/RegexConsumer.swift b/Sources/_StringProcessing/Algorithms/Consumers/RegexConsumer.swift index 80a745f82..162248f41 100644 --- a/Sources/_StringProcessing/Algorithms/Consumers/RegexConsumer.swift +++ b/Sources/_StringProcessing/Algorithms/Consumers/RegexConsumer.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine public struct RegexConsumer diff --git a/Sources/_StringProcessing/Algorithms/Searchers/CollectionSearcher.swift b/Sources/_StringProcessing/Algorithms/Searchers/CollectionSearcher.swift index 5eefcafc3..6883becc7 100644 --- a/Sources/_StringProcessing/Algorithms/Searchers/CollectionSearcher.swift +++ b/Sources/_StringProcessing/Algorithms/Searchers/CollectionSearcher.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + public struct DefaultSearcherState { enum Position { case index(Searched.Index) diff --git a/Sources/_StringProcessing/Algorithms/Searchers/ConsumerSearcher.swift b/Sources/_StringProcessing/Algorithms/Searchers/ConsumerSearcher.swift index bf190c7c9..b42cfbc52 100644 --- a/Sources/_StringProcessing/Algorithms/Searchers/ConsumerSearcher.swift +++ b/Sources/_StringProcessing/Algorithms/Searchers/ConsumerSearcher.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /// A collection searcher that naively searches the input by repeatedly trying to consume it using the underlying consumer. struct ConsumerSearcher { let consumer: Consumer diff --git a/Sources/_StringProcessing/Algorithms/Searchers/NaivePatternSearcher.swift b/Sources/_StringProcessing/Algorithms/Searchers/NaivePatternSearcher.swift index 9ed40110c..1ea74ec03 100644 --- a/Sources/_StringProcessing/Algorithms/Searchers/NaivePatternSearcher.swift +++ b/Sources/_StringProcessing/Algorithms/Searchers/NaivePatternSearcher.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + struct NaivePatternSearcher where Searched.Element: Equatable, Pattern.Element == Searched.Element { diff --git a/Sources/_StringProcessing/Algorithms/Searchers/PatternOrEmpty.swift b/Sources/_StringProcessing/Algorithms/Searchers/PatternOrEmpty.swift index 0ee9acaa0..ee1b04adf 100644 --- a/Sources/_StringProcessing/Algorithms/Searchers/PatternOrEmpty.swift +++ b/Sources/_StringProcessing/Algorithms/Searchers/PatternOrEmpty.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /// Wraps a searcher that searches for a given pattern. If the pattern is empty, falls back on matching every empty index range exactly once. public struct PatternOrEmpty { let searcher: Searcher? diff --git a/Sources/_StringProcessing/Algorithms/Searchers/PredicateSearcher.swift b/Sources/_StringProcessing/Algorithms/Searchers/PredicateSearcher.swift index 4e6eb17a8..84f2dc928 100644 --- a/Sources/_StringProcessing/Algorithms/Searchers/PredicateSearcher.swift +++ b/Sources/_StringProcessing/Algorithms/Searchers/PredicateSearcher.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + struct PredicateSearcher { let predicate: (Searched.Element) -> Bool } diff --git a/Sources/_StringProcessing/Algorithms/Searchers/TwoWaySearcher.swift b/Sources/_StringProcessing/Algorithms/Searchers/TwoWaySearcher.swift index 152c6c196..11184f856 100644 --- a/Sources/_StringProcessing/Algorithms/Searchers/TwoWaySearcher.swift +++ b/Sources/_StringProcessing/Algorithms/Searchers/TwoWaySearcher.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + public struct TwoWaySearcher where Searched.Element: Comparable { diff --git a/Sources/_StringProcessing/Algorithms/Searchers/ZSearcher.swift b/Sources/_StringProcessing/Algorithms/Searchers/ZSearcher.swift index 98eae8829..a541dcb7d 100644 --- a/Sources/_StringProcessing/Algorithms/Searchers/ZSearcher.swift +++ b/Sources/_StringProcessing/Algorithms/Searchers/ZSearcher.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + public struct ZSearcher { let pattern: [Searched.Element] let z: [Int] diff --git a/Sources/_StringProcessing/Capture.swift b/Sources/_StringProcessing/Capture.swift index d3d09c19c..7f57c0721 100644 --- a/Sources/_StringProcessing/Capture.swift +++ b/Sources/_StringProcessing/Capture.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine // TODO: what here should be in the compile-time module? diff --git a/Sources/_StringProcessing/CharacterClass.swift b/Sources/_StringProcessing/CharacterClass.swift index 92ef900b1..e83fd564b 100644 --- a/Sources/_StringProcessing/CharacterClass.swift +++ b/Sources/_StringProcessing/CharacterClass.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine // NOTE: This is a model type. We want to be able to get one from diff --git a/Sources/_StringProcessing/Compiler.swift b/Sources/_StringProcessing/Compiler.swift index 15ec4f440..8bd882926 100644 --- a/Sources/_StringProcessing/Compiler.swift +++ b/Sources/_StringProcessing/Compiler.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine struct RegexProgram { diff --git a/Sources/_StringProcessing/ConsumerInterface.swift b/Sources/_StringProcessing/ConsumerInterface.swift index 0304d5f23..70c2e9307 100644 --- a/Sources/_StringProcessing/ConsumerInterface.swift +++ b/Sources/_StringProcessing/ConsumerInterface.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine struct Unsupported: Error, CustomStringConvertible { diff --git a/Sources/_StringProcessing/Executor.swift b/Sources/_StringProcessing/Executor.swift index f46d403c0..2ef3723fb 100644 --- a/Sources/_StringProcessing/Executor.swift +++ b/Sources/_StringProcessing/Executor.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine public struct Executor { diff --git a/Sources/_StringProcessing/Legacy/HareVM.swift b/Sources/_StringProcessing/Legacy/HareVM.swift index 2dd9219d7..a821a0d4c 100644 --- a/Sources/_StringProcessing/Legacy/HareVM.swift +++ b/Sources/_StringProcessing/Legacy/HareVM.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine /// A baby hare, to be spawned and sent down rabbit holes in search of a match diff --git a/Sources/_StringProcessing/Legacy/LegacyCompile.swift b/Sources/_StringProcessing/Legacy/LegacyCompile.swift index 912c6baed..5008e9541 100644 --- a/Sources/_StringProcessing/Legacy/LegacyCompile.swift +++ b/Sources/_StringProcessing/Legacy/LegacyCompile.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine func compile( diff --git a/Sources/_StringProcessing/Legacy/RECode.swift b/Sources/_StringProcessing/Legacy/RECode.swift index 604982b38..dabf0482d 100644 --- a/Sources/_StringProcessing/Legacy/RECode.swift +++ b/Sources/_StringProcessing/Legacy/RECode.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine /// Object code for a regex program, to be interpreted by a VM diff --git a/Sources/_StringProcessing/Legacy/TortoiseVM.swift b/Sources/_StringProcessing/Legacy/TortoiseVM.swift index a49f5f791..f1a8e0d15 100644 --- a/Sources/_StringProcessing/Legacy/TortoiseVM.swift +++ b/Sources/_StringProcessing/Legacy/TortoiseVM.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine /// A baby tortoise, to be spawned and march in lock-step with all the others diff --git a/Sources/_StringProcessing/Legacy/VirtualMachine.swift b/Sources/_StringProcessing/Legacy/VirtualMachine.swift index 4e871201a..503d6071f 100644 --- a/Sources/_StringProcessing/Legacy/VirtualMachine.swift +++ b/Sources/_StringProcessing/Legacy/VirtualMachine.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine public enum MatchMode { diff --git a/Sources/_StringProcessing/RegexDSL/Builder.swift b/Sources/_StringProcessing/RegexDSL/Builder.swift index 4c2f7c5a9..bf4fb9544 100644 --- a/Sources/_StringProcessing/RegexDSL/Builder.swift +++ b/Sources/_StringProcessing/RegexDSL/Builder.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + @resultBuilder public enum RegexBuilder { public static func buildBlock(_ r0: R0) -> R0 { diff --git a/Sources/_StringProcessing/RegexDSL/Concatenation.swift b/Sources/_StringProcessing/RegexDSL/Concatenation.swift index cb05fa1ca..0cb783f89 100644 --- a/Sources/_StringProcessing/RegexDSL/Concatenation.swift +++ b/Sources/_StringProcessing/RegexDSL/Concatenation.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // BEGIN AUTO-GENERATED CONTENT import _MatchingEngine diff --git a/Sources/_StringProcessing/RegexDSL/Core.swift b/Sources/_StringProcessing/RegexDSL/Core.swift index ac0649ca8..9ff07de88 100644 --- a/Sources/_StringProcessing/RegexDSL/Core.swift +++ b/Sources/_StringProcessing/RegexDSL/Core.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine @dynamicMemberLookup diff --git a/Sources/_StringProcessing/RegexDSL/DSL.swift b/Sources/_StringProcessing/RegexDSL/DSL.swift index 80b92fec1..2ffb1b3c6 100644 --- a/Sources/_StringProcessing/RegexDSL/DSL.swift +++ b/Sources/_StringProcessing/RegexDSL/DSL.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine // MARK: - Primitives diff --git a/Sources/_StringProcessing/RegexDSL/DSLCapture.swift b/Sources/_StringProcessing/RegexDSL/DSLCapture.swift index 31843e194..11bd257e3 100644 --- a/Sources/_StringProcessing/RegexDSL/DSLCapture.swift +++ b/Sources/_StringProcessing/RegexDSL/DSLCapture.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + extension RegexProtocol { public func capture() -> CapturingGroup> where Match.Capture: EmptyCaptureProtocol { .init(self) diff --git a/Sources/_StringProcessing/RegexDSL/DynamicCaptures.swift b/Sources/_StringProcessing/RegexDSL/DynamicCaptures.swift index 3ffaa9f5a..18f0b31a1 100644 --- a/Sources/_StringProcessing/RegexDSL/DynamicCaptures.swift +++ b/Sources/_StringProcessing/RegexDSL/DynamicCaptures.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import _MatchingEngine extension Regex where Match == Tuple2 { diff --git a/Sources/_Unicode/CaseConversion.swift b/Sources/_Unicode/CaseConversion.swift index 1750a874f..cfa68c425 100644 --- a/Sources/_Unicode/CaseConversion.swift +++ b/Sources/_Unicode/CaseConversion.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO diff --git a/Sources/_Unicode/CharacterProps.swift b/Sources/_Unicode/CharacterProps.swift index 1750a874f..cfa68c425 100644 --- a/Sources/_Unicode/CharacterProps.swift +++ b/Sources/_Unicode/CharacterProps.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO diff --git a/Sources/_Unicode/Comparison.swift b/Sources/_Unicode/Comparison.swift index 1750a874f..cfa68c425 100644 --- a/Sources/_Unicode/Comparison.swift +++ b/Sources/_Unicode/Comparison.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO diff --git a/Sources/_Unicode/Decoding.swift b/Sources/_Unicode/Decoding.swift index 52d792187..1499ae0e5 100644 --- a/Sources/_Unicode/Decoding.swift +++ b/Sources/_Unicode/Decoding.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /* Provide very low-level interfaces for scalar decoding. diff --git a/Sources/_Unicode/Encodings.swift b/Sources/_Unicode/Encodings.swift index 0ade447ec..e0be4e386 100644 --- a/Sources/_Unicode/Encodings.swift +++ b/Sources/_Unicode/Encodings.swift @@ -1,2 +1,13 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO diff --git a/Sources/_Unicode/Formatting.swift b/Sources/_Unicode/Formatting.swift index 1750a874f..cfa68c425 100644 --- a/Sources/_Unicode/Formatting.swift +++ b/Sources/_Unicode/Formatting.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO diff --git a/Sources/_Unicode/Graphemes.swift b/Sources/_Unicode/Graphemes.swift index 1750a874f..cfa68c425 100644 --- a/Sources/_Unicode/Graphemes.swift +++ b/Sources/_Unicode/Graphemes.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO diff --git a/Sources/_Unicode/NecessaryEvils.swift b/Sources/_Unicode/NecessaryEvils.swift index f9701b57d..747708503 100644 --- a/Sources/_Unicode/NecessaryEvils.swift +++ b/Sources/_Unicode/NecessaryEvils.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + /* Pull in shims and other things so our code is closer to the diff --git a/Sources/_Unicode/Normaliation.swift b/Sources/_Unicode/Normaliation.swift index 1750a874f..cfa68c425 100644 --- a/Sources/_Unicode/Normaliation.swift +++ b/Sources/_Unicode/Normaliation.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO diff --git a/Sources/_Unicode/NumberParsing.swift b/Sources/_Unicode/NumberParsing.swift index 1750a874f..cfa68c425 100644 --- a/Sources/_Unicode/NumberParsing.swift +++ b/Sources/_Unicode/NumberParsing.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO diff --git a/Sources/_Unicode/ScalarProps.swift b/Sources/_Unicode/ScalarProps.swift index 1750a874f..cfa68c425 100644 --- a/Sources/_Unicode/ScalarProps.swift +++ b/Sources/_Unicode/ScalarProps.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO diff --git a/Sources/_Unicode/Transcoding.swift b/Sources/_Unicode/Transcoding.swift index 0ade447ec..e0be4e386 100644 --- a/Sources/_Unicode/Transcoding.swift +++ b/Sources/_Unicode/Transcoding.swift @@ -1,2 +1,13 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO diff --git a/Sources/_Unicode/UCD.swift b/Sources/_Unicode/UCD.swift index 1750a874f..cfa68c425 100644 --- a/Sources/_Unicode/UCD.swift +++ b/Sources/_Unicode/UCD.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO diff --git a/Sources/_Unicode/Validation.swift b/Sources/_Unicode/Validation.swift index 1750a874f..cfa68c425 100644 --- a/Sources/_Unicode/Validation.swift +++ b/Sources/_Unicode/Validation.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + // TODO diff --git a/Tests/ExercisesTests/ExercisesTests.swift b/Tests/ExercisesTests/ExercisesTests.swift index e3d95ccf3..8b5142815 100644 --- a/Tests/ExercisesTests/ExercisesTests.swift +++ b/Tests/ExercisesTests/ExercisesTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import Exercises import XCTest diff --git a/Tests/MatchingEngineTests/MatchingEngineTests.swift b/Tests/MatchingEngineTests/MatchingEngineTests.swift index 743babbc1..817e8d3dd 100644 --- a/Tests/MatchingEngineTests/MatchingEngineTests.swift +++ b/Tests/MatchingEngineTests/MatchingEngineTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import XCTest @testable import _MatchingEngine diff --git a/Tests/MatchingEngineTests/UtilTests.swift b/Tests/MatchingEngineTests/UtilTests.swift index 77c2e0338..e63b1e6d1 100644 --- a/Tests/MatchingEngineTests/UtilTests.swift +++ b/Tests/MatchingEngineTests/UtilTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import XCTest @testable import _MatchingEngine diff --git a/Tests/PrototypesTests/CombinatorsTests.swift b/Tests/PrototypesTests/CombinatorsTests.swift index ce98dcb53..e34d0f832 100644 --- a/Tests/PrototypesTests/CombinatorsTests.swift +++ b/Tests/PrototypesTests/CombinatorsTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import XCTest @testable import Combinators import _MatchingEngine diff --git a/Tests/PrototypesTests/PEGTests.swift b/Tests/PrototypesTests/PEGTests.swift index 3c1e9d03c..0fac674f3 100644 --- a/Tests/PrototypesTests/PEGTests.swift +++ b/Tests/PrototypesTests/PEGTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import XCTest @testable import Prototypes import _MatchingEngine diff --git a/Tests/PrototypesTests/PTCaRetTests.swift b/Tests/PrototypesTests/PTCaRetTests.swift index 5445c73d7..0e05e1231 100644 --- a/Tests/PrototypesTests/PTCaRetTests.swift +++ b/Tests/PrototypesTests/PTCaRetTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import XCTest @testable import Prototypes import _MatchingEngine diff --git a/Tests/RegexTests/AlgorithmsTests.swift b/Tests/RegexTests/AlgorithmsTests.swift index 7e790065b..b51f12100 100644 --- a/Tests/RegexTests/AlgorithmsTests.swift +++ b/Tests/RegexTests/AlgorithmsTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + @testable import _StringProcessing import XCTest diff --git a/Tests/RegexTests/AllScalarsTests.swift b/Tests/RegexTests/AllScalarsTests.swift index a8a30c2aa..c826151f3 100644 --- a/Tests/RegexTests/AllScalarsTests.swift +++ b/Tests/RegexTests/AllScalarsTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import XCTest @testable import _StringProcessing diff --git a/Tests/RegexTests/CompileTests.swift b/Tests/RegexTests/CompileTests.swift index 89b5e30c7..6d8a45544 100644 --- a/Tests/RegexTests/CompileTests.swift +++ b/Tests/RegexTests/CompileTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + @testable import _MatchingEngine @testable import _StringProcessing diff --git a/Tests/RegexTests/DiagnosticTests.swift b/Tests/RegexTests/DiagnosticTests.swift index 97ba4493b..0c06a5937 100644 --- a/Tests/RegexTests/DiagnosticTests.swift +++ b/Tests/RegexTests/DiagnosticTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + @testable import _MatchingEngine @testable import _StringProcessing diff --git a/Tests/RegexTests/LegacyTests.swift b/Tests/RegexTests/LegacyTests.swift index b84c57ace..785d4293e 100644 --- a/Tests/RegexTests/LegacyTests.swift +++ b/Tests/RegexTests/LegacyTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + @testable import _MatchingEngine import XCTest diff --git a/Tests/RegexTests/LexTests.swift b/Tests/RegexTests/LexTests.swift index f88f564d0..d6fdae9c4 100644 --- a/Tests/RegexTests/LexTests.swift +++ b/Tests/RegexTests/LexTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + @testable import _MatchingEngine import XCTest diff --git a/Tests/RegexTests/MatchTests.swift b/Tests/RegexTests/MatchTests.swift index 4cecc3a8c..364a70649 100644 --- a/Tests/RegexTests/MatchTests.swift +++ b/Tests/RegexTests/MatchTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import XCTest @testable import _MatchingEngine @testable import _StringProcessing diff --git a/Tests/RegexTests/ParseTests.swift b/Tests/RegexTests/ParseTests.swift index 5fe3fe5ff..1d96f2c51 100644 --- a/Tests/RegexTests/ParseTests.swift +++ b/Tests/RegexTests/ParseTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + @testable import _MatchingEngine import XCTest diff --git a/Tests/RegexTests/RegexDSLTests.swift b/Tests/RegexTests/RegexDSLTests.swift index 52fbcb496..6c1da0e6e 100644 --- a/Tests/RegexTests/RegexDSLTests.swift +++ b/Tests/RegexTests/RegexDSLTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import XCTest @testable import _StringProcessing diff --git a/Tests/RegexTests/SyntaxOptionsTests.swift b/Tests/RegexTests/SyntaxOptionsTests.swift index 35bc3ddcf..d6e0d6bc5 100644 --- a/Tests/RegexTests/SyntaxOptionsTests.swift +++ b/Tests/RegexTests/SyntaxOptionsTests.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + @testable import _MatchingEngine @testable import _StringProcessing import XCTest diff --git a/Tests/UnicodeTests/Decoding.swift b/Tests/UnicodeTests/Decoding.swift index dc87a6721..bd608120c 100644 --- a/Tests/UnicodeTests/Decoding.swift +++ b/Tests/UnicodeTests/Decoding.swift @@ -1,3 +1,14 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift.org open source project +// +// Copyright (c) 2021-2022 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +//===----------------------------------------------------------------------===// + import XCTest import _Unicode