Class AssemblyParseTreeNode
java.lang.Object
ghidra.app.plugin.assembler.sleigh.tree.AssemblyParseTreeNode
- Direct Known Subclasses:
AssemblyParseBranch
,AssemblyParseHiddenNode
,AssemblyParseToken
A node in a parse tree
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAssemblyParseTreeNode
(AssemblyGrammar grammar) Construct a node for a tree parsed by the given grammar -
Method Summary
Modifier and TypeMethodDescriptionabstract String
Generate the string that this node parsedGet the grammar used to parse the treeGet the branch which contains this nodeabstract AssemblySymbol
getSym()
Get the symbol for which this node is substitutedvoid
print
(PrintStream out) For debugging: Display this parse tree via the given streamprotected abstract void
print
(PrintStream out, String indent) For debugging: Display the tree with the given indentprotected void
setParent
(AssemblyParseBranch parent) Set the branch which contains this node
-
Field Details
-
parent
-
grammar
-
-
Constructor Details
-
AssemblyParseTreeNode
Construct a node for a tree parsed by the given grammar- Parameters:
grammar
- the grammar
-
-
Method Details
-
getSym
Get the symbol for which this node is substitutedFor a branch, this is the LHS of the corresponding production. For a token, this is the terminal whose tokenizer matched it.
- Returns:
- the symbol
-
getParent
Get the branch which contains this node- Returns:
-
setParent
Set the branch which contains this node- Parameters:
parent
-
-
print
For debugging: Display this parse tree via the given stream- Parameters:
out
- the stream
-
print
For debugging: Display the tree with the given indent- Parameters:
out
- the streamindent
- the indent
-
getGrammar
Get the grammar used to parse the tree- Returns:
- the grammar
-
generateString
Generate the string that this node parsed- Returns:
- the string
-