Class AssemblyParseResult
java.lang.Object
ghidra.app.plugin.assembler.sleigh.parse.AssemblyParseResult
- All Implemented Interfaces:
Comparable<AssemblyParseResult>
- Direct Known Subclasses:
AssemblyParseAcceptResult
,AssemblyParseErrorResult
A result of parsing a sentence
If the sentence was accepted, this yields a parse tree. If not, this describes the error and provides suggestions to correct the error.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AssemblyParseAcceptResult
accept
(AssemblyParseBranch tree) Construct a successful parse resultint
compareTo
(AssemblyParseResult that) static AssemblyParseErrorResult
Construct an error parse resultabstract boolean
isError()
Check if the parse result is successful or an error
-
Constructor Details
-
AssemblyParseResult
public AssemblyParseResult()
-
-
Method Details
-
accept
Construct a successful parse result- Parameters:
tree
- the tree output by the parser
-
error
Construct an error parse result- Parameters:
got
- the input buffer when the error occurredsuggestions
- a subset of strings that would have allowed parsing to proceed
-
isError
public abstract boolean isError()Check if the parse result is successful or an error- Returns:
- true if the result describes an error
-
compareTo
- Specified by:
compareTo
in interfaceComparable<AssemblyParseResult>
-