Class AssemblyNumericMapTerminal
- java.lang.Object
- 
- ghidra.app.plugin.assembler.sleigh.symbol.AssemblySymbol
- 
- ghidra.app.plugin.assembler.sleigh.symbol.AssemblyTerminal
- 
- ghidra.app.plugin.assembler.sleigh.symbol.AssemblyNumericTerminal
- 
- ghidra.app.plugin.assembler.sleigh.symbol.AssemblyNumericMapTerminal
 
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Comparable<AssemblySymbol>
 
 public class AssemblyNumericMapTerminal extends AssemblyNumericTerminal A terminal that accepts only a particular set of numeric values, mapping each to another value This often used for non-conventional numeric encodings.- See Also:
- ValueMapSymbol
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.Map<java.lang.Long,java.lang.Integer>map- 
Fields inherited from class ghidra.app.plugin.assembler.sleigh.symbol.AssemblyNumericTerminalbitsize, MAX_LABEL_SUGGESTIONS, PREFIX_HEX, PREFIX_OCT, suggestions
 - 
Fields inherited from class ghidra.app.plugin.assembler.sleigh.symbol.AssemblySymbolname
 
- 
 - 
Constructor SummaryConstructors Constructor Description AssemblyNumericMapTerminal(java.lang.String name, java.util.Map<java.lang.Long,java.lang.Integer> map)Construct a terminal with the given name, accepting only the keys of a given map
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<java.lang.String>getSuggestions(java.lang.String got, java.util.Map<java.lang.String,java.lang.Long> labels)Provide a collection of strings that this terminal would have acceptedjava.util.Collection<AssemblyParseNumericToken>match(java.lang.String buffer, int pos, AssemblyGrammar grammar, java.util.Map<java.lang.String,java.lang.Long> labels)Attempt to match a token from the input buffer starting at a given position- 
Methods inherited from class ghidra.app.plugin.assembler.sleigh.symbol.AssemblyNumericTerminalgetBitSize, makeToken, match, match, matchDec, matchHex, matchLiteral, matchOct, toString
 - 
Methods inherited from class ghidra.app.plugin.assembler.sleigh.symbol.AssemblySymbolcompareTo, equals, getName, hashCode, takesOperandIndex
 
- 
 
- 
- 
- 
Constructor Detail- 
AssemblyNumericMapTerminalpublic AssemblyNumericMapTerminal(java.lang.String name, java.util.Map<java.lang.Long,java.lang.Integer> map)Construct a terminal with the given name, accepting only the keys of a given map- Parameters:
- name- the name
- map- the map from display value to token value
 
 
- 
 - 
Method Detail- 
matchpublic java.util.Collection<AssemblyParseNumericToken> match(java.lang.String buffer, int pos, AssemblyGrammar grammar, java.util.Map<java.lang.String,java.lang.Long> labels) Description copied from class:AssemblyTerminalAttempt to match a token from the input buffer starting at a given position- Overrides:
- matchin class- AssemblyNumericTerminal
- Parameters:
- buffer- the input buffer
- pos- the cursor position in the buffer
- grammar- the grammar containing this terminal
- labels- the program labels, if applicable
- Returns:
- the matched token, or null
 
 - 
getSuggestionspublic java.util.Collection<java.lang.String> getSuggestions(java.lang.String got, java.util.Map<java.lang.String,java.lang.Long> labels)Description copied from class:AssemblyTerminalProvide a collection of strings that this terminal would have accepted- Overrides:
- getSuggestionsin class- AssemblyNumericTerminal
- Parameters:
- got- the remaining contents of the input buffer
- labels- the program labels, if applicable
- Returns:
- a, possibly empty, collection of suggestions
 
 
- 
 
-