C# Class Antlr4.Runtime.Tree.Pattern.ParseTreePattern

A pattern like <ID> = <expr>; converted to a Antlr4.Runtime.Tree.IParseTree by ParseTreePatternMatcher.Compile(string, int) .
Datei anzeigen Open project: antlr/antlr4 Class Usage Examples

Private Properties

Property Type Description
FindAll IList
Match ParseTreeMatch

Public Methods

Method Description
Matches ( IParseTree tree ) : bool

Determine whether or not a parse tree matches this tree pattern.

Determine whether or not a parse tree matches this tree pattern.

ParseTreePattern ( ParseTreePatternMatcher matcher, string pattern, int patternRuleIndex, IParseTree patternTree ) : System.Collections.Generic

Construct a new instance of the ParseTreePattern class.

Private Methods

Method Description
FindAll ( IParseTree tree, string xpath ) : IList
Match ( IParseTree tree ) : ParseTreeMatch

Method Details

Matches() public method

Determine whether or not a parse tree matches this tree pattern.
Determine whether or not a parse tree matches this tree pattern.
public Matches ( IParseTree tree ) : bool
tree IParseTree The parse tree to match against this tree pattern.
return bool

ParseTreePattern() public method

Construct a new instance of the ParseTreePattern class.
public ParseTreePattern ( ParseTreePatternMatcher matcher, string pattern, int patternRuleIndex, IParseTree patternTree ) : System.Collections.Generic
matcher ParseTreePatternMatcher /// The /// /// which created this /// tree pattern. ///
pattern string The tree pattern in concrete syntax form.
patternRuleIndex int /// The parser rule which serves as the root of the /// tree pattern. ///
patternTree IParseTree /// The tree pattern in /// /// form. ///
return System.Collections.Generic