Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdapterBuilder ¶
type AdapterBuilder interface { Create() AdapterBuilder WithName(name string) AdapterBuilder WithRoot(root string) AdapterBuilder WithFileFetcher(fileFetcher grammar.FileFetcher) AdapterBuilder WithGrammarFilePath(grammarFilePath string) AdapterBuilder WithGrammarRetrieverCriteria(grammarRetrieverCriteria grammar.RetrieverCriteria) AdapterBuilder WithGrammar(grammar grammar.Grammar) AdapterBuilder WithEvents(events []Event) AdapterBuilder Now() (Adapter, error) }
AdapterBuilder represents an adapter builder
func NewAdapterBuilder ¶
func NewAdapterBuilder() AdapterBuilder
NewAdapterBuilder creates a new lexer adapter builder
type Builder ¶
type Builder interface { Create() Builder WithGrammar(grammar grammar.Grammar) Builder WithNodeTree(tree NodeTree) Builder WithScript(script string) Builder WithEvents(evts []Event) Builder Now() (Lexer, error) }
Builder represents a lexer builder
type ElementBuilder ¶
type ElementBuilder interface { Create() ElementBuilder WithRule(rule grammar.Rule) ElementBuilder WithCode(code string) ElementBuilder Now() (Element, error) }
ElementBuilder represents an element builder
type EventBuilder ¶
type EventBuilder interface { Create() EventBuilder WithToken(token string) EventBuilder WithFn(fn EventFn) EventBuilder Now() (Event, error) }
EventBuilder represents an event builder
func NewEventBuilder ¶
func NewEventBuilder() EventBuilder
NewEventBuilder creates a new EventBuilder instance
type Node ¶
type Node interface { HasRecursiveName() bool RecursiveName() string HasTrees() bool Trees() []NodeTree HasElements() bool Elements() []Element Code() string CodeFromName(name string) string CodesFromName(name string) []string }
Node represents a node
type NodeBuilder ¶
type NodeBuilder interface { Create() NodeBuilder WithTrees(trees []NodeTree) NodeBuilder WithElements(elements []Element) NodeBuilder WithRecursiveName(recursiveName string) NodeBuilder Now() (Node, error) }
NodeBuilder represents a node builder
type NodeTree ¶
type NodeTree interface { Grammar() grammar.Grammar Token() grammar.Token Nodes() []Node HasSubNodeTrees() bool Code() string CodeFromName(name string) string CodesFromName(name string) []string BestMatchFromNames(names []string) (string, string) NextNodeTree() NodeTree NextNodeTrees() []NodeTree SubTreeFromName(name string) NodeTree }
NodeTree represents a nodeTree
type NodeTreeAdapter ¶
NodeTreeAdapter represents a nodeTree adapter
type NodeTreeAdapterBuilder ¶
type NodeTreeAdapterBuilder interface { Create() NodeTreeAdapterBuilder WithGrammar(grammar grammar.Grammar) NodeTreeAdapterBuilder Now() (NodeTreeAdapter, error) }
NodeTreeAdapterBuilder represents a nodeTreeAdapter builder
type NodeTreeBuilder ¶
type NodeTreeBuilder interface { Create() NodeTreeBuilder WithRuleTree(tree grammar.RuleTree) NodeTreeBuilder WithScript(script string) NodeTreeBuilder Now() (NodeTree, error) }
NodeTreeBuilder represents a nodeTree builder
type ScriptApplication ¶
ScriptApplication represents a script application
type ScriptApplicationBuilder ¶
type ScriptApplicationBuilder interface { Create() ScriptApplicationBuilder WithGrammar(grammar grammar.Grammar) ScriptApplicationBuilder WithEvents(evts []Event) ScriptApplicationBuilder Now() (ScriptApplication, error) }
ScriptApplicationBuilder represents a script application builder