C# Class Antlr4.Runtime.Tree.Trees

A set of utility routines useful for all kinds of ANTLR trees.
Afficher le fichier Open project: antlr/antlr4

Méthodes publiques

Méthode Description
Descendants ( IParseTree t ) : IList
FindAllNodes ( IParseTree t, int index, bool findTokens ) : IList
FindAllRuleNodes ( IParseTree t, int ruleIndex ) : ICollection
FindAllTokenNodes ( IParseTree t, int ttype ) : ICollection
GetChildren ( ITree t ) : IList

Return ordered list of all children of this node

GetNodeText ( ITree t, IList ruleNames ) : string
GetNodeText ( ITree t, Parser recog ) : string
ToStringTree ( ITree t ) : string

Print out a whole tree in LISP form.

Print out a whole tree in LISP form. GetNodeText(ITree, Antlr4.Runtime.Parser) is used on the node payloads to get the text for the nodes. Detect parse trees and extract data appropriately.

ToStringTree ( ITree t, IList ruleNames ) : string

Print out a whole tree in LISP form.

Print out a whole tree in LISP form. GetNodeText(ITree, Antlr4.Runtime.Parser) is used on the node payloads to get the text for the nodes. Detect parse trees and extract data appropriately.

ToStringTree ( ITree t, Parser recog ) : string

Print out a whole tree in LISP form.

Print out a whole tree in LISP form. GetNodeText(ITree, Antlr4.Runtime.Parser) is used on the node payloads to get the text for the nodes. Detect parse trees and extract data appropriately.

Private Methods

Méthode Description
GetAncestors ( ITree t ) : IList
Trees ( ) : System.Collections.Generic
_findAllNodes ( IParseTree t, int index, bool findTokens, IList nodes ) : void

Method Details

Descendants() public static méthode

public static Descendants ( IParseTree t ) : IList
t IParseTree
Résultat IList

FindAllNodes() public static méthode

public static FindAllNodes ( IParseTree t, int index, bool findTokens ) : IList
t IParseTree
index int
findTokens bool
Résultat IList

FindAllRuleNodes() public static méthode

public static FindAllRuleNodes ( IParseTree t, int ruleIndex ) : ICollection
t IParseTree
ruleIndex int
Résultat ICollection

FindAllTokenNodes() public static méthode

public static FindAllTokenNodes ( IParseTree t, int ttype ) : ICollection
t IParseTree
ttype int
Résultat ICollection

GetChildren() public static méthode

Return ordered list of all children of this node
public static GetChildren ( ITree t ) : IList
t ITree
Résultat IList

GetNodeText() public static méthode

public static GetNodeText ( ITree t, IList ruleNames ) : string
t ITree
ruleNames IList
Résultat string

GetNodeText() public static méthode

public static GetNodeText ( ITree t, Parser recog ) : string
t ITree
recog Parser
Résultat string

ToStringTree() public static méthode

Print out a whole tree in LISP form.
Print out a whole tree in LISP form. GetNodeText(ITree, Antlr4.Runtime.Parser) is used on the node payloads to get the text for the nodes. Detect parse trees and extract data appropriately.
public static ToStringTree ( ITree t ) : string
t ITree
Résultat string

ToStringTree() public static méthode

Print out a whole tree in LISP form.
Print out a whole tree in LISP form. GetNodeText(ITree, Antlr4.Runtime.Parser) is used on the node payloads to get the text for the nodes. Detect parse trees and extract data appropriately.
public static ToStringTree ( ITree t, IList ruleNames ) : string
t ITree
ruleNames IList
Résultat string

ToStringTree() public static méthode

Print out a whole tree in LISP form.
Print out a whole tree in LISP form. GetNodeText(ITree, Antlr4.Runtime.Parser) is used on the node payloads to get the text for the nodes. Detect parse trees and extract data appropriately.
public static ToStringTree ( ITree t, Parser recog ) : string
t ITree
recog Parser
Résultat string