Tests whether the end of the input character vector has been reached,
which boils down to detection of character(0) in the R-element (see
succeed()). Since the intended application of this parser is parsing of
text files the function has been called after the end of file (EOF) signal.
To indicate that an end of file has been detected, the R-element side of
the parser output will be converted to an empty list.
Usage
eof()
Arguments
Value
A parser.
Pseudocode
eof()(x):
if x==null then succeed(x)(list())
else fail()(x)