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

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 June 22, 2024, 10:31 a.m.