Click or drag to resize

TreeWizardParse Method (Object, String, IDictionaryString, Object)

Given a pattern like (ASSIGN %lhs:ID %rhs:.) with optional labels on the various nodes and '.' (dot) as the node/subtree wildcard, return true if the pattern matches and fill the labels Map with the labels pointing at the appropriate nodes. Return false if the pattern is malformed or the tree does not match.

Namespace:  Stimulsoft.Data.Expressions.Antlr.Runtime.Tree
Assembly:  Stimulsoft.Data (in Stimulsoft.Data.dll) Version: 2019.3.1.0
Syntax
public bool Parse(
	Object t,
	string pattern,
	IDictionary<string, Object> labels
)

Parameters

t
Type: SystemObject

[Missing <param name="t"/> documentation for "M:Stimulsoft.Data.Expressions.Antlr.Runtime.Tree.TreeWizard.Parse(System.Object,System.String,System.Collections.Generic.IDictionary{System.String,System.Object})"]

pattern
Type: SystemString

[Missing <param name="pattern"/> documentation for "M:Stimulsoft.Data.Expressions.Antlr.Runtime.Tree.TreeWizard.Parse(System.Object,System.String,System.Collections.Generic.IDictionary{System.String,System.Object})"]

labels
Type: System.Collections.GenericIDictionaryString, Object

[Missing <param name="labels"/> documentation for "M:Stimulsoft.Data.Expressions.Antlr.Runtime.Tree.TreeWizard.Parse(System.Object,System.String,System.Collections.Generic.IDictionary{System.String,System.Object})"]

Return Value

Type: Boolean

[Missing <returns> documentation for "M:Stimulsoft.Data.Expressions.Antlr.Runtime.Tree.TreeWizard.Parse(System.Object,System.String,System.Collections.Generic.IDictionary{System.String,System.Object})"]

Remarks
If a node specifies a text arg in pattern, then that must match for that node in t. TODO: what's a better way to indicate bad pattern? Exceptions are a hassle
See Also