md_line.pl -- Line-based parsing primitives.

Contains line-based parsing primitives.

merge_lines(+Lines, -Codes) is det
Merges list of lines into a flat code list.
indent// is semidet
Recognizes normal indent which is a tab or 4 spaces.
non_empty_line(-Codes)// is semidet
Single non-empty line ending with newline or end-of-stream.
discard_to_line_end// is det
Discards zero or more symbol codes untill the first line end or eos is reached.
empty_lines// is det
List of consequtive empty lines. Consumes as many empty lines as possible.
empty_line// is semidet
Recognizes a single empty line.
lookahead(?Code)// is semidet
Looks ahead a single symbol code.
lookahead_ln_or_eos// is semidet
Looks ahead a line end or end-of-stream. Puts back \n when a line end is recognized.
lookahead_ln// is semidet
Looks ahead a line end. Puts back \n when it is recognized.
ln_or_eos// is semidet
Recognizes either a line end or eos.
ln// is semidet
Recognizes line ending.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

inline_string(Arg1, Arg2, Arg3)
string_limit(Arg1, Arg2, Arg3, Arg4)