finished : 'a list -> int * 'a list
Parser that checks emptiness of the input.
The function finished tests if its input is the empty list, and if so returns
a pair of zero and that input. Otherwise it fails.
- FAILURE CONDITIONS
Fails on nonempty input.
This function is intended to check that some parsing operation has absorbed all
This is one of a suite of combinators for manipulating ``parsers''. A parser is
simply a function whose OCaml type is some instance of
:('a)list -> 'b * ('a)list. The function should take a list of objects of
type :'a (e.g. characters or tokens), parse as much of it as possible from
left to right, and return a pair consisting of the object derived from parsing
(e.g. a term or a special syntax tree) and the list of elements that were not
- SEE ALSO
++, ||, >>, a, atleast, elistof, fix, leftbin, listof, many, nothing, possibly,