Skip to content

Commit

Permalink
[Docs] [Swift] update link, remove expired descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
100mango committed Jan 4, 2022
1 parent fb8a23c commit 47c0307
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions doc/swift-target.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# ANTLR4 Language Target, Runtime for Swift

## Requirements

ANTLR 4.7.2 requires Swift 4.2. It works on Swift 4.2.1 also.

ANTLR 4.7.1 requires Swift 4.0, and does not work on Swift 4.2. (The status of
Swift 4.1 support is unknown.)

## Performance Note

To use ANTLR4 Swift target in production environment, make sure to turn on compiler optimizations by following [these instructions](https://github.com/apple/swift-package-manager/blob/master/Documentation/Usage.md#build-configurations) if you use SwiftPM to build your project. If you are using Xcode to build your project, it's unlikely you will not use `release` build for production build.
To use ANTLR4 Swift target in production environment, make sure to turn on compiler optimizations by following [these instructions](https://github.com/apple/swift-package-manager/blob/main/Documentation/Usage.md#setting-the-build-configuration) if you use SwiftPM to build your project.

If you are using Xcode to build your project, it's unlikely you will not use `release` build for production build.

Conclusion is, you need to turn on `release` mode (which will have all the optimization pre configured for you) so the ANTLR4 Swift target can have reasonable parsing speed.

Expand Down Expand Up @@ -134,9 +129,6 @@ The runtime and generated grammar should now build correctly.

Add Antlr4 as a dependency to your `Package.swift` file. For more information, please see the [Swift Package Manager documentation](https://github.com/apple/swift-package-manager/tree/master/Documentation).

Since we cannot have a separate repository for Swift target (see issue [#1774](https://github.com/antlr/antlr4/issues/1774)),
and Swift is currently not ABI stable. We currently support SPM-based
projects by creating temporary local repository.

```swift
.package(name: "Antlr4", url: "https://github.com/antlr/antlr4", from: "4.9.3"
Expand Down

0 comments on commit 47c0307

Please sign in to comment.