Swift Grammar

0.4.0

debuggable parsing tools for performance-sensitive libraries
tayloraswift/swift-grammar

What's New

0.4.0

2024-04-22T21:25:10Z

This release renames the Testing module to Testing_ to deconflict with the module of the same name in the swift-testing library. Although SwiftPM module aliases enable building despite the name conflict, it causes major tooling problems in VSCode.

grammar
0.3

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(
    ...
    dependencies:
    [
        // other dependencies
        .package(url: "https://github.com/tayloraswift/swift-grammar", from: "0.3.3"),
    ],
    targets:
    [
        .target(name: "example",
            dependencies:
            [
                .product(name: "Grammar", package: "swift-grammar"),
                // other dependencies
            ]),
        // other targets
    ]
)

toolchain requirement

swift-grammar requires Swift 5.8 or newer.

Description

  • Swift Tools 5.8.0
View More Packages from this Author

Dependencies

Last updated: Mon Dec 16 2024 05:45:52 GMT-1000 (Hawaii-Aleutian Standard Time)