28 #ifndef _util_keyval_ipv2_ipv2_h
29 #define _util_keyval_ipv2_ipv2_h
35 #include <util/misc/exenv.h>
36 #include <util/keyval/ipv2_scan.h>
39 #define yyFlexLexer IPV2FlexLexer
40 #include <FlexLexer.h>
94 enum { KEYWORD_LENGTH=256 };
103 int table_row_number;
104 int table_array_depth;
117 char lastkeyword[KEYWORD_LENGTH];
121 std::ostream* ip_out;
127 void ip_push_table_col(
char*);
128 void ip_next_table_entry();
129 char* dup_string(
const char*);
131 char* ip_get_variable_value(
char*);
132 void ip_internal_values();
133 void ip_push_keyword(
char*);
135 void ip_pop_keyword();
137 void ip_done_table();
140 void ip_assign_variable(
char*);
141 double ip_get_variable_double(
char*);
142 char* ip_double_to_string(
double);
143 void ip_assign_value(
char*value);
144 void ip_start_karray();
145 void ip_init_karray();
146 void ip_incr_karray();
147 void ip_lastkeyword(
const char*);
155 char* ip_key_value(
const char*);
159 void ip_cwk_karray_add_v(
int,
int*);
160 void ip_cwk_karray_add(
int,...);
164 int ip_special_characters(
char*);
165 char* ip_append_keystrings(
char*,
char*);
166 void ip_pop_karray();
167 void ip_initialize(std::istream&,std::ostream&);
168 void ip_append(std::istream&,std::ostream&);
173 IPV2FlexLexer *lexer;
175 int ylex() {
return lexer->yylex(); }
177 void yerror(
const char* s);
182 static int have_global();
183 static void set_global(
IPV2*);
184 static IPV2* global();
186 void read(std::istream&,std::ostream&,
const char *filename=0);
187 void append_from_input(
const char*,std::ostream&);
189 const char* error_message(IPV2::Status);
190 void error(
const char*);
191 void warn(
const char*);
194 void cwk_add(
const char*);
197 IPV2::Status boolean(
const char*,
int*,
int,...);
198 IPV2::Status boolean_v(
const char*,
int*,
int,
int*);
199 int exist(
const char*,
int,...);
200 int exist_v(
const char*,
int,
int*);
201 IPV2::Status data(
const char*,
const char*,
void*,
int,...);
202 IPV2::Status data_v(
const char*,
const char*,
void*,
int,
int*);
204 IPV2::Status classname(
const char*,
const char**,
int,...);
205 IPV2::Status classname_v(
const char*,
const char**,
int,
int*);
209 IPV2::Status truekeyword(
const char*,
const char**,
int,...);
210 IPV2::Status truekeyword_v(
const char*,
const char**,
int,
int*);
211 IPV2::Status string(
const char*,
char**,
int,...);
212 IPV2::Status string_v(
const char*,
char**,
int,
int*);
215 IPV2::Status value(
const char*,
const char**,
int,...);
216 IPV2::Status value_v(
const char*,
const char**,
int,
int*);
218 IPV2::Status construct_key_v(
const char*,
char*,
int,
int*);
219 IPV2::Status count(
const char*,
int*,
int,...);
220 IPV2::Status count_v(
const char*,
int*,
int,
int*);