Class AbstractAssemblyProduction<NT extends AssemblyNonTerminal>
java.lang.Object
ghidra.app.plugin.assembler.sleigh.grammars.AbstractAssemblyProduction<NT>
- Type Parameters:
NT
- the type of non-terminals
- All Implemented Interfaces:
Comparable<AbstractAssemblyProduction<NT>>
- Direct Known Subclasses:
AssemblyExtendedProduction
,AssemblyProduction
public abstract class AbstractAssemblyProduction<NT extends AssemblyNonTerminal>
extends Object
implements Comparable<AbstractAssemblyProduction<NT>>
Defines a production in a context-free grammar, usually for parsing mnemonic assembly
- See Also:
-
Constructor Summary
ConstructorDescriptionAbstractAssemblyProduction
(NT lhs, AssemblySentential<NT> rhs) Construct a production with the given LHS and RHS -
Method Summary
-
Constructor Details
-
AbstractAssemblyProduction
Construct a production with the given LHS and RHS- Parameters:
lhs
- the left-hand siderhs
- the right-hand side
-
-
Method Details
-
getIndex
public int getIndex()Get the index of the productionInstead of using deep comparison, the index is often used as the identity of the production within a grammar.
- Returns:
- the index
-
getLHS
Get the left-hand side- Returns:
- the LHS
-
getRHS
Get the right-hand side- Returns:
- the RHS
-
toString
-
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<NT extends AssemblyNonTerminal>
-
hashCode
public int hashCode() -
getName
Get the "name" of this productionThis is mostly just notional and for debugging. The name is taken as the name of the LHS.
- Returns:
- the name of the LHS
-