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 Change Modifier and Type Field Description NEW protected java.lang.StringstrNEW protected AssemblyTerminalterm-
Fields inherited from class ghidra.app.plugin.assembler.sleigh.tree.AssemblyParseTreeNode
grammar, parent
-
-
Constructor Summary
Constructors Change 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 Change 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()NEW 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 NEW
protected final AssemblyTerminal term
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 NEW
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
-
-