Learn R Programming

parcr (version 0.5.1)

finished: Test whether the parser has completely consumed the input

Description

A parser has completely consumed its input when the input has satisfied eof().

Usage

finished(o)

Value

A logical value.

Arguments

o

Output from a parser.

Examples

Run this code
finished((literal("A") %then% eof())("A")) # TRUE
finished((literal("A"))("A")) # FALSE
finished((literal("A") %then% eof())(c("A","C"))) # FALSE

Run the code above in your browser using DataLab