Class AssemblyStringMapTerminal
java.lang.Object
ghidra.app.plugin.assembler.sleigh.symbol.AssemblySymbol
ghidra.app.plugin.assembler.sleigh.symbol.AssemblyTerminal
ghidra.app.plugin.assembler.sleigh.symbol.AssemblyStringMapTerminal
- All Implemented Interfaces:
Comparable<AssemblySymbol>
A terminal that accepts only a particular set of strings, mapping each to a numeric value
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class ghidra.app.plugin.assembler.sleigh.symbol.AssemblySymbol
name -
Constructor Summary
ConstructorsConstructorDescriptionAssemblyStringMapTerminal(String name, org.apache.commons.collections4.MultiValuedMap<String, Integer> map) Construct a terminal with the given name, accepting only the keys of a given map -
Method Summary
Modifier and TypeMethodDescriptiongetMap()getSuggestions(String string, AssemblyNumericSymbols symbols) Provide a collection of strings that this terminal would have acceptedmatch(String buffer, int pos, AssemblyGrammar grammar, AssemblyNumericSymbols symbols) Attempt to match a token from the input buffer starting at a given positiontoString()Methods inherited from class ghidra.app.plugin.assembler.sleigh.symbol.AssemblySymbol
compareTo, equals, getName, hashCode, takesOperandIndex
-
Field Details
-
map
-
-
Constructor Details
-
Method Details
-
match
public Collection<AssemblyParseNumericToken> match(String buffer, int pos, AssemblyGrammar grammar, AssemblyNumericSymbols symbols) Description copied from class:AssemblyTerminalAttempt to match a token from the input buffer starting at a given position- Specified by:
matchin classAssemblyTerminal- Parameters:
buffer- the input bufferpos- the cursor position in the buffergrammar- the grammar containing this terminalsymbols- symbols from the program, suitable for use as numeric terminals- Returns:
- the matched token, or null
-
getSuggestions
Description copied from class:AssemblyTerminalProvide a collection of strings that this terminal would have accepted- Specified by:
getSuggestionsin classAssemblyTerminal- Parameters:
string- the remaining contents of the input buffersymbols- the program symbols, if applicable- Returns:
- a, possibly empty, collection of suggestions
-
toString
- Specified by:
toStringin classAssemblySymbol
-
getMap
-