Class AbstractAssemblyProduction<NT extends AssemblyNonTerminal>
- java.lang.Object
-
- org.apache.commons.collections4.collection.AbstractCollectionDecorator<E>
-
- org.apache.commons.collections4.list.AbstractListDecorator<AssemblySymbol>
-
- ghidra.app.plugin.assembler.sleigh.grammars.AbstractAssemblyProduction<NT>
-
- Type Parameters:
NT
- the type of non-terminals
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AbstractAssemblyProduction<NT>>
,java.lang.Iterable<AssemblySymbol>
,java.util.Collection<AssemblySymbol>
,java.util.List<AssemblySymbol>
- Direct Known Subclasses:
AssemblyExtendedProduction
,AssemblyProduction
public abstract class AbstractAssemblyProduction<NT extends AssemblyNonTerminal> extends org.apache.commons.collections4.list.AbstractListDecorator<AssemblySymbol> implements java.lang.Comparable<AbstractAssemblyProduction<NT>>
Defines a production in a context-free grammar, usually for parsing mnemonic assembly- See Also:
AbstractAssemblyGrammar
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractAssemblyProduction(NT lhs, AssemblySentential<NT> rhs)
Construct a production with the given LHS and RHS
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(AbstractAssemblyProduction<NT> that)
protected java.util.List<AssemblySymbol>
decorated()
boolean
equals(java.lang.Object that)
int
getIndex()
Get the index of the production Instead of using deep comparison, the index is often used as the identify of the production within a grammar.NT
getLHS()
Get the left-hand sidejava.lang.String
getName()
Get the "name" of this production This is mostly just notional and for debugging.AssemblySentential<NT>
getRHS()
Get the right-hand sideint
hashCode()
AssemblySentential<NT>
subList(int fromIndex, int toIndex)
java.lang.String
toString()
-
Methods inherited from class org.apache.commons.collections4.list.AbstractListDecorator
add, addAll, get, indexOf, lastIndexOf, listIterator, listIterator, remove, set
-
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
-
AbstractAssemblyProduction
public AbstractAssemblyProduction(NT lhs, AssemblySentential<NT> rhs)
Construct a production with the given LHS and RHS- Parameters:
lhs
- the left-hand siderhs
- the right-hand side
-
-
Method Detail
-
decorated
protected java.util.List<AssemblySymbol> decorated()
- Overrides:
decorated
in classorg.apache.commons.collections4.list.AbstractListDecorator<AssemblySymbol>
-
getIndex
public int getIndex()
Get the index of the production Instead of using deep comparison, the index is often used as the identify of the production within a grammar.- Returns:
- the index
-
getLHS
public NT getLHS()
Get the left-hand side- Returns:
- the LHS
-
getRHS
public AssemblySentential<NT> getRHS()
Get the right-hand side- Returns:
- the RHS
-
toString
public java.lang.String toString()
- Overrides:
toString
in classorg.apache.commons.collections4.collection.AbstractCollectionDecorator<AssemblySymbol>
-
equals
public boolean equals(java.lang.Object that)
- Specified by:
equals
in interfacejava.util.Collection<NT extends AssemblyNonTerminal>
- Specified by:
equals
in interfacejava.util.List<NT extends AssemblyNonTerminal>
- Overrides:
equals
in classorg.apache.commons.collections4.list.AbstractListDecorator<AssemblySymbol>
-
compareTo
public int compareTo(AbstractAssemblyProduction<NT> that)
- Specified by:
compareTo
in interfacejava.lang.Comparable<NT extends AssemblyNonTerminal>
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.util.Collection<NT extends AssemblyNonTerminal>
- Specified by:
hashCode
in interfacejava.util.List<NT extends AssemblyNonTerminal>
- Overrides:
hashCode
in classorg.apache.commons.collections4.list.AbstractListDecorator<AssemblySymbol>
-
subList
public AssemblySentential<NT> subList(int fromIndex, int toIndex)
- Specified by:
subList
in interfacejava.util.List<NT extends AssemblyNonTerminal>
- Overrides:
subList
in classorg.apache.commons.collections4.list.AbstractListDecorator<AssemblySymbol>
-
getName
public java.lang.String getName()
Get the "name" of this production This is mostly just notional and for debugging. The name is taken as the name of the LHS.- Returns:
- the name of the LHS
-
-