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.Stringstrprotected AssemblyTerminalterm-
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 booleanequals(java.lang.Object obj)java.lang.StringgenerateString()Generate the string that this node parsedjava.lang.StringgetString()Get the portion of the input comprising the tokenAssemblyTerminalgetSym()Get the symbol for which this node is substituted For a branch, this is the LHS of the corresponding production.inthashCode()protected voidprint(java.io.PrintStream out, java.lang.String indent)For debugging: Display the tree with the given indentjava.lang.StringtoString()-
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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin 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:AssemblyParseTreeNodeGet 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:
getSymin classAssemblyParseTreeNode- Returns:
- the symbol
-
print
protected void print(java.io.PrintStream out, java.lang.String indent)Description copied from class:AssemblyParseTreeNodeFor debugging: Display the tree with the given indent- Specified by:
printin classAssemblyParseTreeNode- Parameters:
out- the streamindent- the indent
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
generateString
public java.lang.String generateString()
Description copied from class:AssemblyParseTreeNodeGenerate the string that this node parsed- Specified by:
generateStringin classAssemblyParseTreeNode- Returns:
- the string
-
-