Class AssemblyStringTerminal
java.lang.Object
ghidra.app.plugin.assembler.sleigh.symbol.AssemblySymbol
ghidra.app.plugin.assembler.sleigh.symbol.AssemblyTerminal
ghidra.app.plugin.assembler.sleigh.symbol.AssemblyStringTerminal
- All Implemented Interfaces:
Comparable<AssemblySymbol>
A terminal that accepts only a particular string
-
Field Summary
Fields inherited from class ghidra.app.plugin.assembler.sleigh.symbol.AssemblySymbol
name
-
Constructor Summary
ConstructorDescriptionAssemblyStringTerminal
(String str, VarnodeSymbol defsym) Construct a terminal that accepts only the given string -
Method Summary
Modifier and TypeMethodDescriptiongetSuggestions
(String got, AssemblyNumericSymbols symbols) Provide a collection of strings that this terminal would have acceptedboolean
match
(String buffer, int pos, AssemblyGrammar grammar, AssemblyNumericSymbols symbols) Attempt to match a token from the input buffer starting at a given positionboolean
Check if this symbol consumes an operand index of its constructortoString()
Methods inherited from class ghidra.app.plugin.assembler.sleigh.symbol.AssemblySymbol
compareTo, equals, getName, hashCode
-
Field Details
-
str
-
defsym
-
-
Constructor Details
-
AssemblyStringTerminal
Construct a terminal that accepts only the given string- Parameters:
str
- the string to accept
-
-
Method Details
-
toString
- Specified by:
toString
in classAssemblySymbol
-
match
public Collection<AssemblyParseToken> 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- Specified by:
match
in 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:AssemblyTerminal
Provide a collection of strings that this terminal would have accepted- Specified by:
getSuggestions
in classAssemblyTerminal
- Parameters:
got
- the remaining contents of the input buffersymbols
- the program symbols, if applicable- Returns:
- a, possibly empty, collection of suggestions
-
takesOperandIndex
public boolean takesOperandIndex()Description copied from class:AssemblySymbol
Check if this symbol consumes an operand index of its constructor- Overrides:
takesOperandIndex
in classAssemblySymbol
- Returns:
- true if the symbol represents an operand
-
getDefiningSymbol
-
getString
-
isWhiteSpace
public boolean isWhiteSpace()
-