finished: Test whether the parser has completely consumed the input

View source: R/marker.R

finishedR Documentation

Test whether the parser has completely consumed the input

Description

Checks if the parser result indicates that the entire input was consumed. A parser has completely consumed its input when the input has satisfied eof().

Usage

finished(o)

Arguments

o

Output from a parser.

Value

A logical value.

Examples

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

parcr documentation built on Feb. 17, 2026, 5:06 p.m.