Protocols
The following protocols are available globally.
-
Information about the right-hand side of a rule that has successfully completed parsing. This information is used when constructing the result of a successful parse.
See moreSeealso
ConstructResultDeclaration
Swift
public protocol CompletedRightHandSide : GrammarComponent -
A
See moreConstructResultis a specification for how to compute the result of a successful parse.Declaration
Swift
public protocol ConstructResult : GrammarComponent -
Hosts the associated types
See moreParamamdResultwhich are needed throughout the grammar specification.Declaration
Swift
public protocol GrammarComponent -
A
Lexermanages the custom parsing of terminals.Given a
positionin someinput, and a given terminal with given associated input parameter, the lexer returns a set of tokens.Note
Terminals can not only be parsed via the lexer, but also via rules, therefore enabling scannerless parsing. In those cases the returned set of tokens will typically be empty, but does not have to be, thus making it possible to mix scannerless and scannerful parsing of terminals. Nevertheless, even in a fully scannerless parser, there needs to be one terminal parsed via the lexer, representing a general character.See moreSeealso
RuleDeclaration
Swift
public protocol Lexer : GrammarComponent -
A
See moreSelectorselects a subset of tokens from those tokens which have been successfully parsed at at particular position.Declaration
Swift
public protocol Selector : GrammarComponent
Protocols Reference