In package com.copperleaf.kudzu.parser

class com.copperleaf.kudzu.parser.UntilParser

Consume input as many times as its parser is able to, or until a stopping condition is reached.

Predicts true when:

  • there is remaining input
  • its parser predicts true

Parsing stops when:

  • its parser predicts false
  • the stopping condition predicts true
  • there is no more input remaining

Parsing fails when:

  • its parser fails to parse

Constructors

constructor(parser: Parser, stoppingCondition: Parser, name: String = "")

Consume input as many times as its parser is able to, or until a stopping condition is reached.

Predicts true when:

  • there is remaining input
  • its parser predicts true

Parsing stops when:

  • its parser predicts false
  • the stopping condition predicts true
  • there is no more input remaining

Parsing fails when:

  • its parser fails to parse

Parameters:
  • parser: Parser
  • stoppingCondition: Parser
  • name: String = ""

Methods

fun parse(input: ParserContext): <Node, ParserContext>

Parameters:

Extensions

fun checkNotEmpty(input: ParserContext)

Parameters: