pSome: "Some" Parser Combinator

View source: R/Combin8R.R

pSomeR Documentation

"Some" Parser Combinator

Description

Create a parser that succeeds on input for which a simpler parser succeeds one or more times in succession.

Usage

pSome(tag, p)

Arguments

tag

a class name or a function of a single argument that constructs an object representing the result of the parse.

p

A parser to match zero or more times.

Details

The tag argument should either be a string naming the class of the result, or a function that constructs a object representing the result of the parse given the list of results of the constituent parser.

Value

Return a parser.


SWotherspoon/Combin8R documentation built on June 10, 2025, 6:15 a.m.