Class AssemblyParseState
java.lang.Object
ghidra.app.plugin.assembler.sleigh.parse.AssemblyParseState
- All Implemented Interfaces:
Comparable<AssemblyParseState>
A state in an LR(0) parsing machine
Each item consists of a kernel and an implied closure. Only the kernel is necessary to define the
item, but the whole closure must be considered when deriving new states. The kernel can be
retrieved and mutated via getKernel()
, then the closure derived from it via
getClosure()
.
-
Constructor Summary
ConstructorDescriptionAssemblyParseState
(AssemblyGrammar grammar) Construct a new state associated with the given grammarAssemblyParseState
(AssemblyGrammar grammar, AssemblyParseStateItem item) Construct a new state associated with the given grammar, seeded with the given item -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(AssemblyParseState that) boolean
Get the closure of this item, caching the resultGet the (mutable) kernel for this stateint
hashCode()
toString()
-
Constructor Details
-
AssemblyParseState
Construct a new state associated with the given grammar- Parameters:
grammar
- the grammar
-
AssemblyParseState
Construct a new state associated with the given grammar, seeded with the given item- Parameters:
grammar
- the grammaritem
- an item in the state
-
-
Method Details
-
getKernel
Get the (mutable) kernel for this state- Returns:
- the kernel
-
getClosure
Get the closure of this item, caching the result- Returns:
- the closure
-
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<AssemblyParseState>
-
toString
-
hashCode
public int hashCode()
-