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

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by kelvin13.
kelvin13/swift-grammar v0.1.5
constructive parsing and chained error-handling in swift
⭐️ 4
🕓 4 days ago
linux macOS iOS
.package(url: "https://github.com/kelvin13/swift-grammar.git", from: "v0.1.5")


ci 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 Grammar
  • protocol TraceableError
  • protocol TraceableErrorRoot
  • struct ParsingError<Index>
  • struct ParsingInput<Diagnostics>
  • 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/kelvin13/swift-grammar", from: "0.2.0"),
        .target(name: "example", 
                .product(name: "Grammar", package: "swift-grammar"),
                // other dependencies
        // other targets


Stars: 4
Last commit: 4 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

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