Class AssemblyParseResult

  • All Implemented Interfaces:
    Direct Known Subclasses:
    AssemblyParseAcceptResult, AssemblyParseErrorResult

    public abstract class AssemblyParseResult
    extends java.lang.Object
    implements java.lang.Comparable<AssemblyParseResult>
    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 Detail

      • AssemblyParseResult

        public AssemblyParseResult()
    • Method Detail

      • error

        public static AssemblyParseErrorResult error​(java.lang.String got,
                                                     java.util.Set<java.lang.String> suggestions)
        Construct an error parse result
        got - the input buffer when the error occurred
        suggestions - 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
        true if the result describes an error