STLR

public struct STLR : Codable

Undocumented

  • Undocumented

    See more

    Declaration

    Swift

    public enum Quantifier : Swift.String, Codable, CaseIterable
  • String

    See more

    Declaration

    Swift

    public struct String : Codable
  • TerminalString

    See more

    Declaration

    Swift

    public struct TerminalString : Codable
  • Undocumented

    See more

    Declaration

    Swift

    public enum CharacterSetName : Swift.String, Codable, CaseIterable
  • CharacterSet

    See more

    Declaration

    Swift

    public struct CharacterSet : Codable
  • Undocumented

    Declaration

    Swift

    public typealias CharacterRange = [TerminalString]
  • Undocumented

    See more

    Declaration

    Swift

    public enum Boolean : Swift.String, Codable, CaseIterable
  • Undocumented

    See more

    Declaration

    Swift

    public enum Literal : Codable
  • Annotation

    See more

    Declaration

    Swift

    public struct Annotation : Codable
  • Undocumented

    Declaration

    Swift

    public typealias Annotations = [Annotation]
  • Undocumented

    See more

    Declaration

    Swift

    public enum DefinedLabel : Swift.String, Codable, CaseIterable
  • Undocumented

    See more

    Declaration

    Swift

    public enum Label : Codable
  • Undocumented

    See more

    Declaration

    Swift

    public enum Terminal : Codable
  • Group

    See more

    Declaration

    Swift

    public class Group : Codable
  • Element

    See more

    Declaration

    Swift

    public class Element : Codable
  • Undocumented

    See more

    Declaration

    Swift

    public enum AssignmentOperators : Swift.String, Codable, CaseIterable
  • Undocumented

    Declaration

    Swift

    public typealias Choice = [Element]
  • Undocumented

    Declaration

    Swift

    public typealias Sequence = [Element]
  • Undocumented

    See more

    Declaration

    Swift

    public enum Expression : Codable
  • Undocumented

    See more

    Declaration

    Swift

    public enum TokenType : Codable
  • Undocumented

    See more

    Declaration

    Swift

    public enum StandardType : Swift.String, Codable, CaseIterable
  • Rule

    See more

    Declaration

    Swift

    public struct Rule : Codable
  • ModuleImport

    See more

    Declaration

    Swift

    public struct ModuleImport : Codable
  • Grammar

    See more

    Declaration

    Swift

    public struct Grammar : Codable
  • Undocumented

    Declaration

    Swift

    public typealias Modules = [ModuleImport]
  • Undocumented

    Declaration

    Swift

    public typealias Rules = [Rule]
  • Undocumented

    Declaration

    Swift

    public let grammar: Grammar
  • Parses the supplied string using the generated grammar into a new instance of the generated data structure

    Declaration

    Swift

    public static func build(_ source: Swift.String) throws -> STLR

    Parameters

    source

    The string to parse

    Return Value

    A new instance of the data-structure

  • Undocumented

    Declaration

    Swift

    public static var grammar: OysterKit.Grammar { get }
  • Generates Swift code that uses OysterKit to implement the parsed grammar

    Declaration

    Swift

    public func swift(in file: TextFile)

    Parameters

    grammar

    The name of the class that will be generated

    platform

    The target platform for the class (note this will be depricated in a subsequent release so it is no longer required)

    colors

    A dictionary of colors that can be used by syntax coloring engines

    Return Value

    A String containing the Swift source or nil if an error occured.

  • Validates the AST throwing an exception if validation fails

    Declaration

    Swift

    public func validate() throws
  • Registers a new optimizer. Optimizers are applied in the order they are registered

    Declaration

    Swift

    public static func register(optimizer: STLROptimizer)

    Parameters

    optimizer

    The optimizer

  • Removes all registered optimizers

    Declaration

    Swift

    public static func removeAllOptimizations()