In package com.copperleaf.kudzu.parser

class com.copperleaf.kudzu.parser.AtLeastParser

Consume input as many times as its parser is able to, but it must be able to parse a minSize number of times.

Predicts true when:

  • there is remaining input
  • its parser predicts true

Parsing stops when:

  • its parser predicts false
  • there is no more input remaining

Parsing fails when:

  • its parser fails to parse
  • its parser could not parse at least minSize number of times.

Constructors

constructor(minSize: Int, parser: Parser, name: String = "")

Consume input as many times as its parser is able to, but it must be able to parse a minSize number of times.

Predicts true when:

  • there is remaining input
  • its parser predicts true

Parsing stops when:

  • its parser predicts false
  • there is no more input remaining

Parsing fails when:

  • its parser fails to parse
  • its parser could not parse at least minSize number of times.

Parameters:
  • minSize: Int
  • parser: Parser
  • name: String = ""

Methods

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

Parameters:

Extensions

fun checkNotEmpty(input: ParserContext)

Parameters: