Swiftpack.co - tayloraswift/swift-grammar as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by tayloraswift.
tayloraswift/swift-grammar v0.3.2
debuggable parsing tools for performance-sensitive libraries
⭐️ 9
🕓 37 weeks ago
iOS macOS watchOS tvOS linux macOS iOS
.package(url: "https://github.com/tayloraswift/swift-grammar.git", from: "v0.3.2")


ci build status ci devices build status ci windows build status

swift package index versions swift package index platforms

High-performance constructive parsing, in pure Swift. This module powers the swift-json library!

Importing this module will expose the following top-level symbols:

  • enum Pattern

  • enum UnicodeDigit

  • enum UnicodeEncoding

  • protocol TraceableError

  • protocol TraceableErrorRoot

  • struct ParsingError<Index>

  • struct ParsingInput<Diagnostics>

  • struct NoDiagnostics<Source>

  • struct DefaultDiagnostics<Source>

  • protocol ParsingDiagnostics

  • protocol ParsingRule

  • protocol TerminalRule

  • protocol LiteralRule

  • protocol DigitRule

  • protocol ASCIITerminal

  • protocol UTF8Terminal

  • protocol UTF16Terminal

  • protocol UnicodeTerminal

  • protocol CharacterTerminal

adding swift-grammar as a dependency

To use swift-grammar in a project, add the following to your Package.swift file:

let package = Package(
        // other dependencies
        .package(url: "https://github.com/tayloraswift/swift-grammar", from: "0.3.3"),
        .target(name: "example",
                .product(name: "Grammar", package: "swift-grammar"),
                // other dependencies
        // other targets

toolchain requirement

swift-grammar requires Swift 5.8 or newer.


Stars: 9
Last commit: 2 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups


Release Notes

2 weeks ago

In 0.3.4, the AsyncTests and SyncTests protocols became deprecated, and have been replaced with TestMain and TestBattery.

The minimum toolchain requirement increased from 5.7 to 5.8.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics