Grammar
open class Grammar
Undocumented
-
Undocumented
See moreDeclaration
Swift
public enum Visibility : Hashable
-
Undocumented
See moreDeclaration
Swift
public enum Structure : Hashable
-
Undocumented
See moreDeclaration
Swift
public enum Availability : Hashable
-
Undocumented
See moreDeclaration
Swift
public struct Properties : Hashable
-
Undocumented
Declaration
Swift
public typealias Symbols = [SymbolName : Properties]
-
Undocumented
Declaration
Swift
public typealias Rules = [SymbolName : Set<Rule>]
-
Undocumented
Declaration
Swift
public var language: Language { get }
-
Undocumented
Declaration
Swift
public var symbols: Symbols { get }
-
Undocumented
Declaration
Swift
public var rules: Rules { get }
-
Undocumented
Declaration
Swift
public func rulesOf(symbol: SymbolName) -> Set<Rule>
-
Undocumented
Declaration
Swift
public var terminalPriorities: Set<TerminalPriority> { get }
-
Undocumented
Declaration
Swift
public var lookaheads: [SymbolName : Bool] { get }
-
Undocumented
Declaration
Swift
public init(parents: [Grammar] = [], sealed: Bool = true)
-
Undocumented
Declaration
Swift
public var isSealed: Bool { get }
-
Undocumented
Declaration
Swift
public func seal()
-
Undocumented
Declaration
Swift
public func kindOf(_ name: SymbolName) -> SymbolKind?
-
Undocumented
Declaration
Swift
public func propertiesOf(_ name: SymbolName) -> Properties?
-
Undocumented
Declaration
Swift
public func exists(_ name: SymbolName) -> Bool
-
Undocumented
Declaration
Swift
public func isDeep(_ name: SymbolName) -> Bool
-
Undocumented
Declaration
Swift
public func isFlat(_ name: SymbolName) -> Bool
-
Undocumented
Declaration
Swift
public func isVisible(_ name: SymbolName) -> Bool
-
Undocumented
Declaration
Swift
public func isAuxiliary(_ name: SymbolName) -> Bool
-
Undocumented
Declaration
Swift
public func isHidden(_ name: SymbolName) -> Bool
-
Undocumented
Declaration
Swift
public func makeFlat(_ name: SymbolName)
-
Undocumented
Declaration
Swift
public func makeDeep<I, O>(_ terminal: Terminal<I, O>) where I : Sort, O : Sort
-
Undocumented
Declaration
Swift
public func install(sort: Sort)
-
Undocumented
Declaration
Swift
public func install<In, Out>(symbol: Symbol<In, Out>, properties: Grammar.Properties) -> Bool where In : Sort, Out : Sort
-
Undocumented
Declaration
Swift
public func terminal<In, Out>(_ name: SymbolName, in: In = In(), out: Out = Out()) -> Terminal<In, Out> where In : Sort, Out : Sort
-
Undocumented
Declaration
Swift
public func terminal<In>(_ name: SymbolName, in: In = In()) -> Terminal<In, UNIT> where In : Sort
-
Undocumented
Declaration
Swift
public func terminal<Out>(_ name: SymbolName, out: Out = Out()) -> Terminal<UNIT, Out> where Out : Sort
-
Undocumented
Declaration
Swift
public func terminal(_ name: SymbolName) -> Terminal<UNIT, UNIT>
-
Undocumented
Declaration
Swift
public func fresh<In, Out>(terminal name: SymbolName, in: In = In(), out: Out = Out()) -> Terminal<In, Out> where In : Sort, Out : Sort
-
Undocumented
Declaration
Swift
public func nonterminal<In, Out>(_ name: SymbolName, in: In = In(), out: Out = Out()) -> Nonterminal<In, Out> where In : Sort, Out : Sort
-
Undocumented
Declaration
Swift
public func nonterminal<In>(_ name: SymbolName, in: In = In()) -> Nonterminal<In, UNIT> where In : Sort
-
Undocumented
Declaration
Swift
public func nonterminal<Out>(_ name: SymbolName, out: Out = Out()) -> Nonterminal<UNIT, Out> where Out : Sort
-
Undocumented
Declaration
Swift
public func nonterminal(_ name: SymbolName) -> Nonterminal<UNIT, UNIT>
-
Undocumented
Declaration
Swift
public func fresh<In, Out>(nonterminal name: SymbolName, in: In, out: Out) -> Nonterminal<In, Out> where In : Sort, Out : Sort
-
Undocumented
Declaration
Swift
public var EMPTY: RuleBody { get }
-
Undocumented
Declaration
Swift
public func prioritise<In1 : Sort, Out1 : Sort, In2 : Sort, Out2 : Sort>( terminal terminal2 : Terminal<In1, Out1>, over terminal1 : Terminal<In2, Out2>, file : String = #file, line : Int = #line) -> TerminalPriority
-
Undocumented
Declaration
Swift
public func prioritise<In1 : ASort, Out1 : ASort, In2 : ASort, Out2 : ASort>( terminal terminal2 : Terminal<In1, Out1>, over terminal1 : Terminal<In2, Out2>, when : TerminalPriority.Condition, file : String = #file, line : Int = #line) -> TerminalPriority
-
Undocumented
Declaration
Swift
public func prioritiseLongest(_ terminals : SymbolWithName..., file : String = #file, line : Int = #line) -> GrammarElement
-
Undocumented
Declaration
Swift
public func prioritiseLongest(_ terminalNames : [IndexedSymbolName], file : String = #file, line : Int = #line) -> GrammarElement
-
Undocumented
Declaration
Swift
public func prioritiseExclusionary(_ terminals : SymbolWithName..., file : String = #file, line : Int = #line) -> GrammarElement
-
Undocumented
Declaration
Swift
public func prioritiseExclusionary(_ terminalNames : [IndexedSymbolName], file : String = #file, line : Int = #line) -> GrammarElement
-
Undocumented
Declaration
Swift
public func add(@GrammarBuilder _ builder: () -> GrammarElement)
-
Undocumented
Declaration
Swift
public func add(component: GrammarComponent)
-
Undocumented
Declaration
Swift
open func build()
-
Undocumented
Declaration
Swift
public func assign<S, T>(_ symbol1: Symbol<S, T>, _ symbol2: Symbol<S, T>) -> GrammarElement where S : Sort, T : Sort
-
Undocumented
Declaration
Swift
public func freshTerminal<S, T>(_ name: String) -> Terminal<S, T> where S : Sort, T : Sort
-
Undocumented
Declaration
Swift
public func freshNonterminal<S, T>(_ name: String) -> Nonterminal<S, T> where S : Sort, T : Sort
-
Undocumented
Declaration
Swift
public func Empty<S>() -> Nonterminal<S, S> where S : Sort
-
Undocumented
Declaration
Swift
public func Mute<S, T>(_ symbol: Symbol<S, T>) -> Nonterminal<S, UNIT> where S : Sort, T : Sort
-
Undocumented
Declaration
Swift
public func Repeat<S>(_ symbol: Symbol<S, S>) -> Nonterminal<S, S> where S : Sort
-
Undocumented
Declaration
Swift
public func Iterate<S>(_ symbol: Symbol<S, UNIT>) -> Nonterminal<S, UNIT> where S : Sort
-
Undocumented
Declaration
Swift
public func Repeat1<S>(_ symbol: Symbol<S, S>) -> Nonterminal<S, S> where S : Sort
-
Undocumented
Declaration
Swift
public func Maybe<S>(_ symbol: Symbol<S, S>) -> Nonterminal<S, S> where S : Sort
-
Undocumented
Declaration
Swift
public func MaybeGreedy<S>(_ symbol: Symbol<S, S>) -> Nonterminal<S, S> where S : Sort
-
Undocumented
Declaration
Swift
public func MaybeGreedy<S>(_ symbol: Symbol<S, UNIT>) -> Nonterminal<S, UNIT> where S : Sort
-
Undocumented
Declaration
Swift
public func Or<S, T>(_ symbols: Symbol<S, T>...) -> Nonterminal<S, T> where S : Sort, T : Sort
-
Undocumented
Declaration
Swift
public func OrGreedy<S, T>(_ symbols: Symbol<S, T>...) -> Nonterminal<S, T> where S : Sort, T : Sort
-
Undocumented
Declaration
Swift
public func Seq<S, U, V>(_ symbol1: Symbol<S, U>, _ symbol2: Symbol<U, V>) -> Nonterminal<S, V> where S : Sort, U : Sort, V : Sort
-
Undocumented
Declaration
Swift
public func Seq<S, U, V, W>(_ symbol1: Symbol<S, U>, _ symbol2: Symbol<U, V>, _ symbol3: Symbol<V, W>) -> Nonterminal<S, W> where S : Sort, U : Sort, V : Sort, W : Sort
-
Undocumented
Declaration
Swift
public func Seq<S, U, V, W, X>(_ symbol1 : Symbol<S, U>, _ symbol2 : Symbol<U, V>, _ symbol3 : Symbol<V, W>, _ symbol4 : Symbol<W, X>) -> Nonterminal<S, X>
-
Undocumented
Declaration
Swift
public func Supply<S, T>(_ input: S = S.default(), _ symbol: Symbol<S, T>) -> Nonterminal<UNIT, T> where S : Sort, T : Sort