In package com.copperleaf.kudzu.parser

class com.copperleaf.kudzu.parser.TokenParser

Consume a sequence of letter or digit characters of the input.

Predicts true when:

  • there is remaining input
  • the next character is a letter of digit

Parsing stops when:

  • the next character is not a letter or digit
  • there is no more input remaining

Parsing fails when:

  • no input was consumed

Constructors

constructor(name: String = "")

Consume a sequence of letter or digit characters of the input.

Predicts true when:

  • there is remaining input
  • the next character is a letter of digit

Parsing stops when:

  • the next character is not a letter or digit
  • there is no more input remaining

Parsing fails when:

  • no input was consumed

Parameters:
  • name: String = ""

Methods

fun predict(input: ParserContext): Boolean

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

Parameters:

Extensions

fun checkNotEmpty(input: ParserContext)

Parameters: