In package com.copperleaf.kudzu.parser

class com.copperleaf.kudzu.parser.TimesParser

Consume input from its parser a specific number of times.

Predicts true when:

  • there is remaining input
  • its parser predicts true

Parsing stops when:

  • we have parsed times number of times already

Parsing fails when:

  • its parser fails to parse
  • there is no more input remaining

Constructors

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

Consume input from its parser a specific number of times.

Predicts true when:

  • there is remaining input
  • its parser predicts true

Parsing stops when:

  • we have parsed times number of times already

Parsing fails when:

  • its parser fails to parse
  • there is no more input remaining

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

Methods

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

Parameters:

Extensions

fun checkNotEmpty(input: ParserContext)

Parameters: