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 intcompareTo(AbstractAssemblyProduction<NT> that)protected java.util.List<AssemblySymbol>decorated()booleanequals(java.lang.Object that)intgetIndex()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.NTgetLHS()Get the left-hand sidejava.lang.StringgetName()Get the "name" of this production This is mostly just notional and for debugging.AssemblySentential<NT>getRHS()Get the right-hand sideinthashCode()AssemblySentential<NT>subList(int fromIndex, int toIndex)java.lang.StringtoString()-
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:
decoratedin 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:
toStringin classorg.apache.commons.collections4.collection.AbstractCollectionDecorator<AssemblySymbol>
-
equals
public boolean equals(java.lang.Object that)
- Specified by:
equalsin interfacejava.util.Collection<NT extends AssemblyNonTerminal>- Specified by:
equalsin interfacejava.util.List<NT extends AssemblyNonTerminal>- Overrides:
equalsin classorg.apache.commons.collections4.list.AbstractListDecorator<AssemblySymbol>
-
compareTo
public int compareTo(AbstractAssemblyProduction<NT> that)
- Specified by:
compareToin interfacejava.lang.Comparable<NT extends AssemblyNonTerminal>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Collection<NT extends AssemblyNonTerminal>- Specified by:
hashCodein interfacejava.util.List<NT extends AssemblyNonTerminal>- Overrides:
hashCodein classorg.apache.commons.collections4.list.AbstractListDecorator<AssemblySymbol>
-
subList
public AssemblySentential<NT> subList(int fromIndex, int toIndex)
- Specified by:
subListin interfacejava.util.List<NT extends AssemblyNonTerminal>- Overrides:
subListin 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
-
-