pAlt: "Alt" Parser Combinator

View source: R/Combin8R.R

pAltR Documentation

"Alt" Parser Combinator

Description

Creates a parser that accepts input that is accepted by any one of a number of simpler parsers.

Usage

pAlt(tag, ...)

Arguments

tag

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

...

Alternative simpler parsers.

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 result of the first alternative parser satisfied by the input.

Value

Returns a parser.


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