Class AssemblyParseState
- java.lang.Object
-
- org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>
-
- org.apache.commons.collections4.set.AbstractSetDecorator<AssemblyParseStateItem>
-
- ghidra.app.plugin.assembler.sleigh.parse.AssemblyParseState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AssemblyParseState>
,java.lang.Iterable<AssemblyParseStateItem>
,java.util.Collection<AssemblyParseStateItem>
,java.util.Set<AssemblyParseStateItem>
public class AssemblyParseState extends org.apache.commons.collections4.set.AbstractSetDecorator<AssemblyParseStateItem> implements java.lang.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.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AssemblyParseState(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(AssemblyParseState that)
protected java.util.Set<AssemblyParseStateItem>
decorated()
boolean
equals(java.lang.Object that)
java.util.Set<AssemblyParseStateItem>
getClosure()
Get the closure of this item, caching the resultint
hashCode()
java.lang.String
toString()
-
Methods inherited from class org.apache.commons.collections4.collection.AbstractCollectionDecorator
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, setCollection, size, toArray, toArray
-
-
-
-
Constructor Detail
-
AssemblyParseState
public AssemblyParseState(AssemblyGrammar grammar)
Construct a new state associated with the given grammar- Parameters:
grammar
- the grammar
-
AssemblyParseState
public AssemblyParseState(AssemblyGrammar grammar, AssemblyParseStateItem item)
Construct a new state associated with the given grammar, seeded with the given item- Parameters:
grammar
- the grammaritem
- an item in the state
-
-
Method Detail
-
decorated
protected java.util.Set<AssemblyParseStateItem> decorated()
- Overrides:
decorated
in classorg.apache.commons.collections4.set.AbstractSetDecorator<AssemblyParseStateItem>
-
getClosure
public java.util.Set<AssemblyParseStateItem> getClosure()
Get the closure of this item, caching the result- Returns:
- the closure
-
equals
public boolean equals(java.lang.Object that)
- Specified by:
equals
in interfacejava.util.Collection<AssemblyParseStateItem>
- Specified by:
equals
in interfacejava.util.Set<AssemblyParseStateItem>
- Overrides:
equals
in classorg.apache.commons.collections4.set.AbstractSetDecorator<AssemblyParseStateItem>
-
compareTo
public int compareTo(AssemblyParseState that)
- Specified by:
compareTo
in interfacejava.lang.Comparable<AssemblyParseState>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classorg.apache.commons.collections4.collection.AbstractCollectionDecorator<AssemblyParseStateItem>
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.util.Collection<AssemblyParseStateItem>
- Specified by:
hashCode
in interfacejava.util.Set<AssemblyParseStateItem>
- Overrides:
hashCode
in classorg.apache.commons.collections4.set.AbstractSetDecorator<AssemblyParseStateItem>
-
-