nis-util
1.0.D108
|
#include <space.h>
The space class is used to represent the parse state when reading files who's rows contains space separared columns of values (/etc/hosts and the like).
typedef std::vector<rcstring> space::line_t [protected] |
enum space::token_ty [protected] |
space::~space | ( | ) | [virtual] |
space::space | ( | const rcstring & | filename | ) | [protected] |
space::space | ( | ) | [private] |
The default constructor. Do not use.
space::space | ( | const space & | ) | [private] |
The copy constructor. Do not use.
void space::close | ( | void | ) | [protected] |
void space::discard_backslash_newline | ( | void | ) | [protected] |
void space::discard_blank_lines | ( | void | ) | [protected] |
void space::discard_comments | ( | void | ) | [protected] |
void space::error | ( | const source_location & | locn, |
const char * | fmt, | ||
... | |||
) |
The error method is used to report fatal errors. The message is printed on the standard error, along with the file name and line number, and the error count incremented.
locn | Where the error occurred in the source file. |
fmt | The text to be printed, also contains the number and types of the remaining arguments. |
void space::explain_sequence_errors | ( | void | ) | [protected] |
rcstring space::get_file_name | ( | void | ) | const [inline, protected] |
const source_location& space::get_location | ( | void | ) | const [inline, protected] |
token_ty space::get_token | ( | void | ) | const [inline, protected] |
rcstring space::get_value | ( | void | ) | const [inline, protected] |
int space::getch | ( | void | ) | [private] |
void space::lex | ( | void | ) | [protected] |
Fetch the next input token. Sets the token instance variable, and also the token_value instance variable for strings.
void space::open | ( | void | ) | [protected] |
bool space::read_one_line | ( | line_t & | result | ) | [protected] |
bool space::read_one_line | ( | source_location & | locn, |
line_t & | result | ||
) | [protected] |
The get_one_line method is used to read one line from the file, splitting it into space-separated fields.
result | where to put the lien obce it is read in |
locn | returned as rthe source location of the first word on the first line. |
void space::verror | ( | const source_location & | locn, |
const char * | fmt, | ||
va_list | ap | ||
) | [protected] |
The verror method is used to report fatal errors. The message is printed on the standard error, along with the file name and line number, and the error count incremented.
locn | Where the error occurred in the source file. |
fmt | The text to be printed, and the number and types of the arguments |
ap | the remaining arguments. |
void space::vwarning | ( | const source_location & | locn, |
const char * | fmt, | ||
va_list | ap | ||
) | [protected] |
The vwarning method is used to report non-fatal errors. The message is printed on the standard error, along with the file name and line number. The error count is NOT incremented.
locn | Where the error occurred in the source file. |
fmt | The text to be printed |
ap | the values of the arguments |
void space::warning | ( | const source_location & | locn, |
const char * | fmt, | ||
... | |||
) | [protected] |
The warning method is used to report non-fatal errors. The message is printed on the standard error, along with the file name and line number. The error count is NOT incremented.
locn | Where the error occurred in the source file. |
fmt | The text to be printed, and the number and types of the arguments |
void const source_location& space::yak_location | ( | void | ) | const [inline] |
The yak_location method is used to obtain the source file location of the most recent token returned by the yak_lex method. It would not be public except for the need for yacc (bison) to call it.
Reimplemented in space_auto_master.
bool space::current_line_is_blank [private] |
The current_line_is_blank instance variable is used to remember whether or not the current line being parsed is blank or not. This is used by the lex method in combination with the discard_blank_lines_flag to determine the existence of blank source input lines.
bool space::discard_backslash_newline_flag [private] |
bool space::discard_blank_lines_flag [private] |
bool space::discard_comments_flag [private] |
int space::error_count [private] |
bool space::explained_sequence_errors [private] |
The explained_sequence_errors instance variable is used to remember whether or not we have explain what the sequence errors are for. This is used by the explain_sequence_errors method.
rcstring space::filename [private] |
input::pointer space::ip [private] |
source_location space::locn [private] |
bool space::non_printing_whine [private] |
token_ty space::token [private] |
rcstring space::token_value [private] |