28 #ifndef _util_keyval_ipv2_ipv2_h
29 #define _util_keyval_ipv2_ipv2_h
32 #include <util/misc/exenv.h>
33 #include <util/keyval/ipv2_scan.h>
36 #define yyFlexLexer IPV2FlexLexer
37 #include <FlexLexer.h>
91 enum { KEYWORD_LENGTH=256 };
100 int table_row_number;
101 int table_array_depth;
114 char lastkeyword[KEYWORD_LENGTH];
118 std::ostream* ip_out;
124 void ip_push_table_col(
char*);
125 void ip_next_table_entry();
126 char* dup_string(
const char*);
128 char* ip_get_variable_value(
char*);
129 void ip_internal_values();
130 void ip_push_keyword(
char*);
132 void ip_pop_keyword();
134 void ip_done_table();
137 void ip_assign_variable(
char*);
138 double ip_get_variable_double(
char*);
139 char* ip_double_to_string(
double);
140 void ip_assign_value(
char*value);
141 void ip_start_karray();
142 void ip_init_karray();
143 void ip_incr_karray();
144 void ip_lastkeyword(
const char*);
152 char* ip_key_value(
const char*);
156 void ip_cwk_karray_add_v(
int,
int*);
157 void ip_cwk_karray_add(
int,...);
161 int ip_special_characters(
char*);
162 char* ip_append_keystrings(
char*,
char*);
163 void ip_pop_karray();
164 void ip_initialize(std::istream&,std::ostream&);
165 void ip_append(std::istream&,std::ostream&);
170 IPV2FlexLexer *lexer;
172 int ylex() {
return lexer->yylex(); }
174 void yerror(
const char* s);
179 static int have_global();
180 static void set_global(
IPV2*);
181 static IPV2* global();
183 void read(std::istream&,std::ostream&,
const char *filename=0);
184 void append_from_input(
const char*,std::ostream&);
186 const char* error_message(IPV2::Status);
187 void error(
const char*);
188 void warn(
const char*);
191 void cwk_add(
const char*);
194 IPV2::Status boolean(
const char*,
int*,
int,...);
195 IPV2::Status boolean_v(
const char*,
int*,
int,
int*);
196 int exist(
const char*,
int,...);
197 int exist_v(
const char*,
int,
int*);
198 IPV2::Status data(
const char*,
const char*,
void*,
int,...);
199 IPV2::Status data_v(
const char*,
const char*,
void*,
int,
int*);
201 IPV2::Status classname(
const char*,
const char**,
int,...);
202 IPV2::Status classname_v(
const char*,
const char**,
int,
int*);
206 IPV2::Status truekeyword(
const char*,
const char**,
int,...);
207 IPV2::Status truekeyword_v(
const char*,
const char**,
int,
int*);
208 IPV2::Status string(
const char*,
char**,
int,...);
209 IPV2::Status string_v(
const char*,
char**,
int,
int*);
212 IPV2::Status value(
const char*,
const char**,
int,...);
213 IPV2::Status value_v(
const char*,
const char**,
int,
int*);
215 IPV2::Status construct_key_v(
const char*,
char*,
int,
int*);
216 IPV2::Status count(
const char*,
int*,
int,...);
217 IPV2::Status count_v(
const char*,
int*,
int,
int*);