GrammarUtils

Utilities for grammar parsing.

Functions

Link copied to clipboard
fun balancedDelimitersMatch(string: CharSequence, position: Int, begin: Char, end: Char): Int

Matches a balanced sequence delimited by begin and end, ignoring escaped delimiters.

Link copied to clipboard
fun unescapedMatch(string: CharSequence, position: Int, char: Char, onMatch: () -> Unit = {}): Int

Matches a character if it is not escaped.