In package com.copperleaf.kudzu.parser

class com.copperleaf.kudzu.parser.AtMostParser

Consume input from its parser up to maxSize 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
  • we have parsed maxSize number of times already

Parsing fails when:

  • its parser fails to parse

Constructors

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

Consume input from its parser up to maxSize 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
  • we have parsed maxSize number of times already

Parsing fails when:

  • its parser fails to parse

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

Methods

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

Parameters:

Extensions

fun checkNotEmpty(input: ParserContext)

Parameters: