pLiteral: Create a Primitive Parser from a Regex

Description Usage Arguments Details Value

Description

Create a parser to parse text matching a literal string.

Usage

1
pLiteral(tag, string = tag)

Arguments

tag

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

string

The string literal to match.

Details

This function creates a parser that accepts input that matches a given string.

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 matched literal string.

Value

Returns a parser.


SWotherspoon/Combin8R documentation built on May 9, 2019, 12:05 p.m.