Class AssemblyParseToken
- java.lang.Object
-
- ghidra.app.plugin.assembler.sleigh.tree.AssemblyParseTreeNode
-
- ghidra.app.plugin.assembler.sleigh.tree.AssemblyParseToken
-
- Direct Known Subclasses:
AssemblyParseNumericToken
,AssemblySentential.WhiteSpaceParseToken
public class AssemblyParseToken extends AssemblyParseTreeNode
A string token- See Also:
AssemblyStringTerminal
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
str
protected AssemblyTerminal
term
-
Fields inherited from class ghidra.app.plugin.assembler.sleigh.tree.AssemblyParseTreeNode
grammar, parent
-
-
Constructor Summary
Constructors Constructor Description AssemblyParseToken(AssemblyGrammar grammar, AssemblyTerminal term, java.lang.String str)
Construct a new token having the given string value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
generateString()
Generate the string that this node parsedjava.lang.String
getString()
Get the portion of the input comprising the tokenAssemblyTerminal
getSym()
Get the symbol for which this node is substituted For a branch, this is the LHS of the corresponding production.int
hashCode()
protected void
print(java.io.PrintStream out, java.lang.String indent)
For debugging: Display the tree with the given indentjava.lang.String
toString()
-
Methods inherited from class ghidra.app.plugin.assembler.sleigh.tree.AssemblyParseTreeNode
getGrammar, getParent, isConstructor, isNumeric, print, setParent
-
-
-
-
Field Detail
-
term
protected final AssemblyTerminal term
-
str
protected final java.lang.String str
-
-
Constructor Detail
-
AssemblyParseToken
public AssemblyParseToken(AssemblyGrammar grammar, AssemblyTerminal term, java.lang.String str)
Construct a new token having the given string value- Parameters:
grammar
- the grammar containing the terminalterm
- the terminal that matched this tokenstr
- the portion of the input comprising this token
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
getString
public java.lang.String getString()
Get the portion of the input comprising the token- Returns:
- the string value
-
getSym
public AssemblyTerminal getSym()
Description copied from class:AssemblyParseTreeNode
Get the symbol for which this node is substituted For a branch, this is the LHS of the corresponding production. For a token, this is the terminal whose tokenizer matched it.- Specified by:
getSym
in classAssemblyParseTreeNode
- Returns:
- the symbol
-
print
protected void print(java.io.PrintStream out, java.lang.String indent)
Description copied from class:AssemblyParseTreeNode
For debugging: Display the tree with the given indent- Specified by:
print
in classAssemblyParseTreeNode
- Parameters:
out
- the streamindent
- the indent
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
generateString
public java.lang.String generateString()
Description copied from class:AssemblyParseTreeNode
Generate the string that this node parsed- Specified by:
generateString
in classAssemblyParseTreeNode
- Returns:
- the string
-
-