Class AssemblyFixedNumericTerminal
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.AssemblyFixedNumericTerminal
- All Implemented Interfaces:
Comparable<AssemblySymbol>
A terminal that accepts only a particular numeric value
This is different from a fixed string, because it will accept any encoding of the given numeric value.
-
Field Summary
Fields inherited from class ghidra.app.plugin.assembler.sleigh.symbol.AssemblyNumericTerminal
bitsize, MAX_LABEL_SUGGESTIONS, PREFIX_HEX, PREFIX_OCT, space, SUGGESTIONS
Fields inherited from class ghidra.app.plugin.assembler.sleigh.symbol.AssemblySymbol
name
-
Constructor Summary
ConstructorDescriptionAssemblyFixedNumericTerminal
(long val) Construct a terminal that accepts only the given numeric value -
Method Summary
Modifier and TypeMethodDescriptiongetSuggestions
(String got, AssemblyNumericSymbols symbols) Provide a collection of strings that this terminal would have acceptedlong
getVal()
match
(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.AssemblyNumericTerminal
getBitSize, getSpace, makeToken, match, match, matchDec, matchHex, matchLiteral, matchOct
Methods inherited from class ghidra.app.plugin.assembler.sleigh.symbol.AssemblySymbol
compareTo, equals, getName, hashCode, takesOperandIndex
-
Field Details
-
val
protected final long val
-
-
Constructor Details
-
AssemblyFixedNumericTerminal
public AssemblyFixedNumericTerminal(long val) Construct a terminal that accepts only the given numeric value- Parameters:
val
- the value to accept
-
-
Method Details
-
toString
- Overrides:
toString
in classAssemblyNumericTerminal
-
getSuggestions
Description copied from class:AssemblyTerminal
Provide a collection of strings that this terminal would have accepted- Overrides:
getSuggestions
in classAssemblyNumericTerminal
- Parameters:
got
- the remaining contents of the input buffersymbols
- the program symbols, if applicable- Returns:
- a, possibly empty, collection of suggestions
-
match
public Collection<AssemblyParseNumericToken> match(String buffer, int pos, AssemblyGrammar grammar, AssemblyNumericSymbols symbols) Description copied from class:AssemblyTerminal
Attempt to match a token from the input buffer starting at a given position- Overrides:
match
in classAssemblyNumericTerminal
- 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
-
getVal
public long getVal()
-