Class AssemblySymbol
java.lang.Object
ghidra.app.plugin.assembler.sleigh.symbol.AssemblySymbol
- All Implemented Interfaces:
Comparable<AssemblySymbol>
- Direct Known Subclasses:
AssemblyNonTerminal
,AssemblyTerminal
A symbol in a context-free grammar
Symbols can be either terminals or non-terminals. Non-terminals must have a defining production, i.e., it must appear as the left-hand side of some production in the grammar.
Traditionally, when displayed, non-terminals should be immediately distinguishable from terminals. In classic CS literature, this usually means non-terminals are in CAPS, and terminals are in lower-case. Because the assembler doesn't control the names provided by SLEIGH, we surround non-terminals in [brackets].
- See Also:
-
Field Details
-
name
-
-
Constructor Details
-
AssemblySymbol
Construct a new symbol with the given name- Parameters:
name
- the name
-
-
Method Details
-
toString
-
getName
Get the name of this symbol- Returns:
- the name
-
compareTo
- Specified by:
compareTo
in interfaceComparable<AssemblySymbol>
-
equals
-
hashCode
public int hashCode() -
takesOperandIndex
public boolean takesOperandIndex()Check if this symbol consumes an operand index of its constructor- Returns:
- true if the symbol represents an operand
-