Class ErrorLocatingParseRunner<V>

    • Constructor Detail

      • ErrorLocatingParseRunner

        public ErrorLocatingParseRunner​(Rule rule)
        Creates a new ErrorLocatingParseRunner instance for the given rule.
        Parameters:
        rule - the parser rule
      • ErrorLocatingParseRunner

        public ErrorLocatingParseRunner​(Rule rule,
                                        MatchHandler inner)
        Creates a new ErrorLocatingParseRunner instance for the given rule. The given MatchHandler is used as a delegate for the actual match handling.
        Parameters:
        rule - the parser rule
        inner - another MatchHandler to delegate the actual match handling to, can be null
    • Method Detail

      • run

        public ParsingResult<V> run​(InputBuffer inputBuffer)
        Description copied from interface: ParseRunner
        Performs the actual parse and creates a corresponding ParsingResult instance.
        Specified by:
        run in interface ParseRunner<V>
        Parameters:
        inputBuffer - the inputBuffer to use
        Returns:
        the ParsingResult for the run
      • match

        public boolean match​(MatcherContext<?> context)
        Description copied from interface: MatchHandler
        Runs the given MatcherContext.
        Specified by:
        match in interface MatchHandler
        Parameters:
        context - the MatcherContext
        Returns:
        true if matched