Returns the next line from the
File
, suppressing comments
and blank lines and handling line continuations, if so desired.
Generic Parameters:
Suppress_Blank_Lines |
If True, this function will never return blank lines or lines
containing only a comment. If false, empty lines will be returned;
lines containing only a comment will also be returned as empty
lines. A blank is defined by White_Space .
|
White_Space |
Character set used to determine what is whitespace for use with
Suppress_Blank_Lines and line continuations.
|
Line_Continuation |
A line continuation marker must be the last non-blank stuff on a
line (except if a comment follows; in this case, blanks between
the line continuation marker and the beginning of the comment are
allowed (and ignored)).
If Line_Continuation is the empty string, no line
continuation handling is done, i.e. lines are never merged.
|
Comment_Start |
The text that marks the beginning of a comment. If empty, no comment
handling is done.
A comment is always treated as a line comment, i.e. extending
up to the end of the line. Bracketed comments like C's /* ... */
are not supported.
|
Delimiters |
Give the set of characters that shall be string delimiters. Line
continuations and comments are valid only if not within a string.
If Delimiters is the empty set, no string parsing on the
line occurs.
|
Strings |
Used only if Delimiters is not the empty set. This function is
called whenever an opening string delimiter is found with the rest of
the line (including the opening delimiter) and the delimiter character.
It shall return zero if no matching end delimiter is found, S'First
if despite everything this string delimiter is not to be considered the
start of a string, and the index of the closing string delimiter
otherwise.
|
Line continuations must come before comments if on the same
line; they're not allowed within comments. I.e., something like
"xxx \ # comment" is read as "xxx " and a line continuation (hence
the following physical line, if any, is appended automatically),
while "xxx # comment \" is read as "xxx " only.
Raises End_Error
if called at the end of File
.
If EOF is hit while skipping blank lines and comments, no
exception is raised but an empty string is returned. A line
continuation on the last line of the file is ignored.