8
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
8
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
5307
|
19 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
20 02110-1301, USA. |
8
|
21 |
|
22 */ |
|
23 |
383
|
24 #if !defined (octave_symtab_h) |
|
25 #define octave_symtab_h 1 |
8
|
26 |
3011
|
27 #include <cassert> |
|
28 |
1755
|
29 #include <string> |
4214
|
30 #include <stack> |
5765
|
31 #include <sstream> |
220
|
32 |
3011
|
33 #include "oct-alloc.h" |
1755
|
34 #include "str-vec.h" |
|
35 |
2975
|
36 #include "ov.h" |
|
37 |
2979
|
38 class octave_lvalue; |
8
|
39 |
1755
|
40 class string_vector; |
|
41 |
8
|
42 class symbol_record; |
|
43 class symbol_table; |
|
44 |
4913
|
45 struct |
|
46 whos_parameter |
|
47 { |
4914
|
48 char command; |
|
49 char modifier; |
|
50 int parameter_length; |
|
51 int first_parameter_length; |
|
52 int dimensions; |
|
53 int balance; |
4913
|
54 std::string text; |
|
55 std::string line; |
|
56 }; |
|
57 |
3011
|
58 // Individual records in a symbol table. |
8
|
59 |
3011
|
60 class |
|
61 symbol_record |
|
62 { |
|
63 public: |
8
|
64 |
3258
|
65 // If you add or delete an entry here, you'll also need to change |
3325
|
66 // the width parameter in the declaration for symbol_type below... |
3258
|
67 |
195
|
68 enum TYPE |
|
69 { |
|
70 UNKNOWN = 0, |
|
71 USER_FUNCTION = 1, |
|
72 USER_VARIABLE = 2, |
3325
|
73 DLD_FUNCTION = 4, |
|
74 BUILTIN_FUNCTION = 8, |
4208
|
75 COMMAND = 16, |
5102
|
76 RAWCOMMAND = 32, |
5864
|
77 MAPPER_FUNCTION = 64, |
|
78 MEX_FUNCTION = 128, |
195
|
79 }; |
|
80 |
8
|
81 private: |
|
82 |
3011
|
83 // Variables or functions. |
|
84 |
|
85 class symbol_def |
|
86 { |
|
87 public: |
|
88 |
|
89 symbol_def (const octave_value& val = octave_value (), |
|
90 unsigned int sym_type = 0) |
|
91 : symbol_type (sym_type), eternal (0), read_only (0), help_string (), |
5399
|
92 definition (val), count (1) { } |
3011
|
93 |
|
94 ~symbol_def (void) { } |
|
95 |
|
96 bool is_variable (void) const |
5794
|
97 { return (symbol_type & symbol_record::USER_VARIABLE); } |
3011
|
98 |
4208
|
99 // It's not necessary to check for COMMAND and MAPPER_FUNCTION |
3968
|
100 // here. Those tags are just used as additional qualifiers for |
|
101 // the other types of functions. |
|
102 |
3011
|
103 bool is_function (void) const |
|
104 { |
|
105 return (symbol_type & symbol_record::USER_FUNCTION |
3325
|
106 || symbol_type & symbol_record::DLD_FUNCTION |
5864
|
107 || symbol_type & symbol_record::MEX_FUNCTION |
3011
|
108 || symbol_type & symbol_record::BUILTIN_FUNCTION); |
|
109 } |
|
110 |
|
111 bool is_user_variable (void) const |
|
112 { return (symbol_type & symbol_record::USER_VARIABLE); } |
195
|
113 |
5136
|
114 // Don't use |= here to avoid error with AIX compiler. |
4208
|
115 void mark_as_command (void) |
5136
|
116 { symbol_type = symbol_type | symbol_record::COMMAND; } |
4207
|
117 |
4208
|
118 void unmark_command (void) |
|
119 { symbol_type &= ~symbol_record::COMMAND; } |
4207
|
120 |
4208
|
121 bool is_command (void) const |
|
122 { return (symbol_type & symbol_record::COMMAND); } |
3011
|
123 |
5102
|
124 void mark_as_rawcommand (void) |
|
125 { symbol_type |= (symbol_record::COMMAND |
|
126 | symbol_record::RAWCOMMAND); } |
|
127 |
|
128 void unmark_rawcommand (void) |
|
129 { symbol_type &= ~symbol_record::RAWCOMMAND; } |
|
130 |
|
131 bool is_rawcommand (void) const |
|
132 { return (symbol_type & symbol_record::RAWCOMMAND); } |
|
133 |
3011
|
134 bool is_mapper_function (void) const |
|
135 { return (symbol_type & symbol_record::MAPPER_FUNCTION); } |
|
136 |
|
137 bool is_user_function (void) const |
|
138 { return (symbol_type & symbol_record::USER_FUNCTION); } |
|
139 |
|
140 bool is_builtin_function (void) const |
|
141 { return (symbol_type & symbol_record::BUILTIN_FUNCTION); } |
|
142 |
3325
|
143 bool is_dld_function (void) const |
|
144 { return (symbol_type & symbol_record::DLD_FUNCTION); } |
|
145 |
5864
|
146 bool is_mex_function (void) const |
|
147 { return (symbol_type & symbol_record::MEX_FUNCTION); } |
|
148 |
5775
|
149 // FIXME |
3523
|
150 bool is_map_element (const std::string& /* elts */) const |
3011
|
151 { return false; } |
|
152 |
|
153 bool is_defined (void) const |
|
154 { return definition.is_defined (); } |
|
155 |
|
156 bool is_read_only (void) const |
|
157 { return read_only; } |
|
158 |
|
159 bool is_eternal (void) const |
|
160 { return eternal; } |
8
|
161 |
4913
|
162 bool is_matrix_type (void) const |
|
163 { return definition.is_matrix_type (); } |
|
164 |
5659
|
165 bool is_sparse_type (void) const |
|
166 { return definition.is_sparse_type (); } |
|
167 |
|
168 bool is_complex_type (void) const |
|
169 { return definition.is_complex_type (); } |
|
170 |
|
171 std::string class_name (void) const |
|
172 { return definition.class_name (); } |
|
173 |
|
174 Matrix size (void) const |
|
175 { return definition.size (); } |
|
176 |
4913
|
177 size_t byte_size (void) const |
|
178 { return definition.byte_size (); }; |
|
179 |
5275
|
180 octave_idx_type numel (void) const |
4913
|
181 { return definition.numel (); }; |
|
182 |
5275
|
183 octave_idx_type capacity (void) const |
5164
|
184 { return definition.capacity (); }; |
|
185 |
4913
|
186 dim_vector dims (void) const |
|
187 { return definition.dims (); } |
|
188 |
5275
|
189 octave_idx_type rows (void) const { return definition.rows (); } |
|
190 octave_idx_type columns (void) const { return definition.columns (); } |
3013
|
191 |
3523
|
192 std::string type_name (void) const { return definition.type_name (); } |
3013
|
193 |
3523
|
194 std::string type_as_string (void) const; |
3355
|
195 |
3523
|
196 void type (std::ostream& os, const std::string& name, bool pr_type_info, |
3356
|
197 bool quiet, bool pr_orig_txt); |
|
198 |
3523
|
199 std::string which (const std::string& name); |
3355
|
200 |
3523
|
201 void which (std::ostream& os, const std::string& name); |
3355
|
202 |
3011
|
203 void define (const octave_value& val, unsigned int sym_type) |
|
204 { |
|
205 definition = val; |
|
206 symbol_type = sym_type; |
|
207 } |
|
208 |
|
209 void protect (void) { read_only = 1; } |
|
210 |
|
211 void unprotect (void) { read_only = 0; } |
|
212 |
|
213 void make_eternal (void) { eternal = 1; } |
|
214 |
|
215 octave_value& def (void) { return definition; } |
|
216 |
3523
|
217 std::string help (void) const { return help_string; } |
3011
|
218 |
5823
|
219 void document (const std::string& h); |
3011
|
220 |
|
221 unsigned int type (void) { return symbol_type; } |
|
222 |
|
223 void *operator new (size_t size) |
|
224 { return allocator.alloc (size); } |
|
225 |
|
226 void operator delete (void *p, size_t size) |
|
227 { allocator.free (p, size); } |
|
228 |
|
229 static octave_allocator allocator; |
8
|
230 |
3011
|
231 // The type of this symbol (see the enum above). |
5102
|
232 unsigned int symbol_type : 9; |
3011
|
233 |
|
234 // Nonzero means this variable cannot be cleared. |
|
235 unsigned int eternal : 1; |
|
236 |
|
237 // Nonzero means this variable cannot be given a new value. |
|
238 unsigned int read_only : 1; |
|
239 |
|
240 // The doc string associated with this variable. |
3523
|
241 std::string help_string; |
3011
|
242 |
|
243 // The value of this definition. See ov.h and related files. |
|
244 octave_value definition; |
767
|
245 |
3011
|
246 // Reference count. |
|
247 int count; |
|
248 |
3933
|
249 void print_info (std::ostream& os, |
|
250 const std::string& prefix = std::string ()) const; |
3239
|
251 |
3011
|
252 // No copying! |
|
253 |
|
254 symbol_def (const symbol_def& sd); |
|
255 |
|
256 symbol_def& operator = (const symbol_def& sd); |
|
257 }; |
8
|
258 |
|
259 public: |
2953
|
260 |
3011
|
261 typedef int (*change_function) (void); |
2953
|
262 |
3011
|
263 symbol_record (void) |
5861
|
264 : formal_param (false), automatic_variable (false), |
|
265 linked_to_global (false), tagged_static (false), |
|
266 can_hide_function (true), visible (true), nm (), chg_fcn (0), |
4234
|
267 definition (new symbol_def ()), next_elem (0) { } |
|
268 |
5775
|
269 // FIXME -- kluge alert! We obviously need a better way of |
4234
|
270 // handling allow_shadow! |
3011
|
271 |
3523
|
272 symbol_record (const std::string& n, symbol_record *nxt) |
5861
|
273 : formal_param (false), automatic_variable (false), |
|
274 linked_to_global (false), tagged_static (false), |
|
275 can_hide_function (n != "__end__"), visible (true), nm (n), |
|
276 chg_fcn (0), definition (new symbol_def ()), next_elem (nxt) { } |
8
|
277 |
5013
|
278 ~symbol_record (void) |
|
279 { |
|
280 if (--definition->count <= 0) |
|
281 delete definition; |
|
282 } |
8
|
283 |
3523
|
284 std::string name (void) const { return nm; } |
2975
|
285 |
3523
|
286 std::string help (void) const { return definition->help (); } |
3011
|
287 |
|
288 octave_value& def (void) { return definition->def (); } |
8
|
289 |
3523
|
290 void rename (const std::string& new_name); |
195
|
291 |
3011
|
292 bool is_function (void) const |
|
293 { return definition->is_function (); } |
|
294 |
4208
|
295 void mark_as_command (void) |
|
296 { definition->mark_as_command (); } |
4207
|
297 |
4208
|
298 void unmark_command (void) |
|
299 { definition->unmark_command (); } |
4207
|
300 |
4208
|
301 bool is_command (void) const |
|
302 { return definition->is_command (); } |
3011
|
303 |
5102
|
304 void mark_as_rawcommand (void) |
|
305 { definition->mark_as_rawcommand (); } |
|
306 |
|
307 void unmark_rawcommand (void) |
|
308 { definition->unmark_rawcommand (); } |
|
309 |
|
310 bool is_rawcommand (void) const |
|
311 { return definition->is_rawcommand (); } |
|
312 |
3011
|
313 bool is_mapper_function (void) const |
|
314 { return definition->is_mapper_function (); } |
|
315 |
|
316 bool is_user_function (void) const |
|
317 { return definition->is_user_function (); } |
195
|
318 |
3011
|
319 bool is_builtin_function (void) const |
|
320 { return definition->is_builtin_function (); } |
|
321 |
3325
|
322 bool is_dld_function (void) const |
|
323 { return definition->is_dld_function (); } |
|
324 |
5864
|
325 bool is_mex_function (void) const |
|
326 { return definition->is_mex_function (); } |
|
327 |
3011
|
328 bool is_variable (void) const |
|
329 { return definition->is_variable (); } |
8
|
330 |
3011
|
331 bool is_user_variable (void) const |
|
332 { return definition->is_user_variable (); } |
|
333 |
3523
|
334 bool is_map_element (const std::string& elts) const |
3011
|
335 { return definition->is_map_element (elts); } |
8
|
336 |
3011
|
337 unsigned int type (void) const { return definition->type (); } |
|
338 |
|
339 bool is_defined (void) const { return definition->is_defined (); } |
|
340 |
|
341 bool is_read_only (void) const { return definition->is_read_only (); } |
8
|
342 |
3011
|
343 bool is_eternal (void) const { return definition->is_eternal (); } |
|
344 |
|
345 void protect (void) { definition->protect (); } |
195
|
346 |
3011
|
347 void unprotect (void) { definition->unprotect (); } |
|
348 |
|
349 void make_eternal (void) { definition->make_eternal (); } |
2893
|
350 |
5399
|
351 void hide (void) { visible = false; } |
|
352 void show (void) { visible = true; } |
|
353 bool is_visible (void) const { return visible; } |
5397
|
354 |
3011
|
355 void set_change_function (change_function f) { chg_fcn = f; } |
2893
|
356 |
3011
|
357 void define (const octave_value& v, unsigned int sym_type = USER_VARIABLE); |
|
358 |
|
359 bool define (octave_function *f, unsigned int sym_type); |
2893
|
360 |
3523
|
361 void document (const std::string& h) { definition->document (h); } |
195
|
362 |
3011
|
363 void clear (void); |
195
|
364 |
5397
|
365 void alias (symbol_record *s, bool mark_to_clear = false); |
8
|
366 |
|
367 void mark_as_formal_parameter (void); |
3011
|
368 bool is_formal_parameter (void) const { return formal_param; } |
8
|
369 |
5861
|
370 void mark_as_automatic_variable (void); |
|
371 bool is_automatic_variable (void) const { return automatic_variable; } |
|
372 |
195
|
373 void mark_as_linked_to_global (void); |
3011
|
374 bool is_linked_to_global (void) const { return linked_to_global; } |
8
|
375 |
2846
|
376 void mark_as_static (void); |
3011
|
377 bool is_static (void) const { return tagged_static; } |
4319
|
378 void unmark_static (void) { tagged_static = false; } |
2846
|
379 |
4913
|
380 bool is_matrix_type (void) const |
|
381 { return definition->is_matrix_type (); } |
|
382 |
5659
|
383 bool is_sparse_type (void) const |
|
384 { return definition->is_sparse_type (); } |
|
385 |
|
386 bool is_complex_type (void) const |
|
387 { return definition->is_complex_type (); } |
|
388 |
|
389 std::string class_name (void) const |
|
390 { return definition->class_name (); } |
|
391 |
|
392 Matrix size (void) const |
|
393 { return definition->size (); } |
|
394 |
4913
|
395 size_t byte_size (void) const |
|
396 { return definition->byte_size (); }; |
|
397 |
5275
|
398 octave_idx_type numel (void) const |
4913
|
399 { return definition->numel (); }; |
|
400 |
5275
|
401 octave_idx_type capacity (void) const |
5164
|
402 { return definition->capacity (); }; |
|
403 |
4913
|
404 dim_vector dims (void) const { return definition->dims (); } |
|
405 |
|
406 int dimensions_string_req_first_space (int print_dims) const; |
|
407 |
|
408 int dimensions_string_req_total_space (int print_dims) const; |
|
409 |
|
410 std::string make_dimensions_string (int print_dims) const; |
|
411 |
5275
|
412 octave_idx_type rows (void) const { return definition->rows (); } |
|
413 octave_idx_type columns (void) const { return definition->columns (); } |
3013
|
414 |
3523
|
415 std::string type_name (void) const { return definition->type_name (); } |
3013
|
416 |
3523
|
417 std::string type_as_string (void) const |
3355
|
418 { return definition->type_as_string (); } |
|
419 |
3523
|
420 void type (std::ostream& os, bool pr_type_info, bool quiet, bool pr_orig_txt) |
3356
|
421 { definition->type (os, name (), pr_type_info, quiet, pr_orig_txt); } |
|
422 |
3523
|
423 std::string which (void) { return definition->which (name ()); } |
3355
|
424 |
3523
|
425 void which (std::ostream& os) { definition->which (os, name ()); } |
3355
|
426 |
2975
|
427 octave_value& variable_value (void); |
2979
|
428 octave_lvalue variable_reference (void); |
2390
|
429 |
3011
|
430 symbol_record *next (void) const { return next_elem; } |
8
|
431 |
3011
|
432 void chain (symbol_record *s) { next_elem = s; } |
195
|
433 |
220
|
434 void push_context (void); |
3011
|
435 |
220
|
436 void pop_context (void); |
|
437 |
4913
|
438 void print_symbol_info_line (std::ostream& os, |
|
439 std::list<whos_parameter>& params) const; |
3013
|
440 |
3933
|
441 void print_info (std::ostream& os, |
|
442 const std::string& prefix = std::string ()) const; |
3239
|
443 |
8
|
444 private: |
|
445 |
2893
|
446 unsigned int formal_param : 1; |
5861
|
447 unsigned int automatic_variable : 1; |
2893
|
448 unsigned int linked_to_global : 1; |
|
449 unsigned int tagged_static : 1; |
4234
|
450 unsigned int can_hide_function : 1; |
5399
|
451 unsigned int visible : 1; |
195
|
452 |
3523
|
453 std::string nm; |
3011
|
454 change_function chg_fcn; |
195
|
455 symbol_def *definition; |
8
|
456 symbol_record *next_elem; |
395
|
457 |
3011
|
458 // This should maybe be one stack with a structure containing all the |
|
459 // items we need to save for recursive calls... |
4214
|
460 std::stack <symbol_def *> context; |
|
461 std::stack <unsigned int> global_link_context; |
8
|
462 |
5397
|
463 std::stack <symbol_record *> aliases_to_clear; |
|
464 |
|
465 void push_alias_to_clear (symbol_record *s) |
|
466 { aliases_to_clear.push (s); } |
|
467 |
3011
|
468 bool read_only_error (const char *action); |
195
|
469 |
5397
|
470 void maybe_delete_def (void) |
|
471 { |
|
472 if (--definition->count <= 0) |
|
473 delete definition; |
|
474 } |
|
475 |
3011
|
476 // No copying! |
|
477 |
|
478 symbol_record (const symbol_record& s); |
195
|
479 |
8
|
480 symbol_record& operator = (const symbol_record& s); |
|
481 }; |
|
482 |
767
|
483 // A symbol table. |
200
|
484 |
|
485 #define SYMTAB_LOCAL_SCOPE 1 |
|
486 #define SYMTAB_GLOBAL_SCOPE 2 |
|
487 |
|
488 #define SYMTAB_ALL_SCOPES (SYMTAB_LOCAL_SCOPE | SYMTAB_GLOBAL_SCOPE) |
|
489 |
3011
|
490 #define SYMTAB_ALL_TYPES (symbol_record::USER_FUNCTION \ |
|
491 | symbol_record::USER_VARIABLE \ |
3325
|
492 | symbol_record::DLD_FUNCTION \ |
3011
|
493 | symbol_record::BUILTIN_FUNCTION \ |
4208
|
494 | symbol_record::COMMAND \ |
5102
|
495 | symbol_record::RAWCOMMAND \ |
5864
|
496 | symbol_record::MAPPER_FUNCTION \ |
|
497 | symbol_record::MEX_FUNCTION) |
200
|
498 |
5794
|
499 #define SYMTAB_VARIABLES (symbol_record::USER_VARIABLE) |
1412
|
500 |
8
|
501 class |
|
502 symbol_table |
|
503 { |
|
504 public: |
|
505 |
4238
|
506 symbol_table (unsigned int tab_size = 128, |
|
507 const std::string& nm = std::string ()) |
|
508 : table_size (tab_size), table (new symbol_record [table_size]), |
|
509 table_name (nm) |
4009
|
510 { |
|
511 assert ((tab_size % 2) == 0); |
4238
|
512 |
|
513 if (table_name.empty ()) |
|
514 { |
5765
|
515 std::ostringstream buf; |
|
516 buf << symtab_count++; |
|
517 table_name = buf.str (); |
4238
|
518 } |
4009
|
519 } |
3011
|
520 |
5013
|
521 ~symbol_table (void); |
8
|
522 |
3523
|
523 symbol_record *lookup (const std::string& nm, bool insert = false, |
2856
|
524 bool warn = false); |
8
|
525 |
3523
|
526 void rename (const std::string& old_name, const std::string& new_name); |
572
|
527 |
4009
|
528 void clear (void); |
|
529 |
|
530 void clear_variables (void); |
|
531 void clear_functions (void); |
|
532 void clear_globals (void); |
|
533 |
|
534 bool clear (const std::string& nm); |
|
535 |
|
536 bool clear_variable (const std::string& nm); |
|
537 bool clear_function (const std::string& nm); |
|
538 bool clear_global (const std::string& nm); |
|
539 |
|
540 bool clear_variable_pattern (const std::string& pat); |
|
541 bool clear_function_pattern (const std::string& pat); |
|
542 bool clear_global_pattern (const std::string& pat); |
8
|
543 |
164
|
544 int size (void) const; |
8
|
545 |
3013
|
546 Array<symbol_record *> |
4913
|
547 subsymbol_list (const string_vector& pats = string_vector (), |
|
548 unsigned int type = SYMTAB_ALL_TYPES, |
|
549 unsigned int scope = SYMTAB_ALL_SCOPES) const; |
|
550 |
|
551 Array<symbol_record *> |
3355
|
552 symbol_list (const string_vector& pats = string_vector (), |
3013
|
553 unsigned int type = SYMTAB_ALL_TYPES, |
|
554 unsigned int scope = SYMTAB_ALL_SCOPES) const; |
|
555 |
195
|
556 |
1755
|
557 string_vector |
3355
|
558 name_list (const string_vector& pats = string_vector (), |
3013
|
559 bool sort = false, unsigned int type = SYMTAB_ALL_TYPES, |
|
560 unsigned int scope = SYMTAB_ALL_SCOPES) const; |
605
|
561 |
4009
|
562 string_vector |
|
563 user_function_name_list (void) const |
|
564 { |
|
565 return name_list |
|
566 (string_vector (), false, |
5864
|
567 symbol_record::USER_FUNCTION|symbol_record::DLD_FUNCTION|symbol_record::MEX_FUNCTION, |
4009
|
568 SYMTAB_ALL_SCOPES); |
|
569 } |
|
570 |
|
571 string_vector |
|
572 global_variable_name_list (void) const |
|
573 { |
|
574 return name_list |
|
575 (string_vector (), false, SYMTAB_VARIABLES, SYMTAB_GLOBAL_SCOPE); |
|
576 } |
|
577 |
|
578 string_vector |
|
579 variable_name_list (void) const |
|
580 { |
|
581 return name_list |
|
582 (string_vector (), false, SYMTAB_VARIABLES, SYMTAB_LOCAL_SCOPE); |
|
583 } |
3011
|
584 |
|
585 int maybe_list (const char *header, const string_vector& argv, |
3523
|
586 std::ostream& os, bool show_verbose, |
3011
|
587 unsigned type, unsigned scope); |
|
588 |
3523
|
589 Array<symbol_record *> glob (const std::string& pat = std::string ("*"), |
3355
|
590 unsigned int type = SYMTAB_ALL_TYPES, |
|
591 unsigned int scope = SYMTAB_ALL_SCOPES) const; |
8
|
592 |
220
|
593 void push_context (void); |
3011
|
594 |
220
|
595 void pop_context (void); |
|
596 |
5861
|
597 // Create a new symbol table with the same entries. Only the symbol |
|
598 // names and some attributes are copied, not values. |
|
599 symbol_table *dup (void); |
|
600 |
|
601 // Inherit some values from the parent_sym_tab. |
|
602 void inherit (symbol_table *parent_sym_tab); |
|
603 |
3941
|
604 void print_info (std::ostream& os) const; |
3011
|
605 |
8
|
606 private: |
|
607 |
3011
|
608 unsigned int table_size; |
|
609 |
|
610 symbol_record *table; |
|
611 |
4238
|
612 std::string table_name; |
|
613 |
|
614 static unsigned long int symtab_count; |
|
615 |
4913
|
616 void |
|
617 print_descriptor (std::ostream& os, |
|
618 std::list<whos_parameter> params) const; |
|
619 |
|
620 std::list<whos_parameter> |
|
621 parse_whos_line_format (Array<symbol_record *>& symbols) const; |
|
622 |
3523
|
623 unsigned int hash (const std::string& s); |
8
|
624 |
3011
|
625 // No copying! |
8
|
626 |
3011
|
627 symbol_table (const symbol_table&); |
1962
|
628 |
3011
|
629 symbol_table& operator = (const symbol_table&); |
|
630 }; |
2790
|
631 |
4913
|
632 // Defines layout for the whos/who -long command. |
|
633 extern std::string Vwhos_line_format; |
|
634 |
8
|
635 #endif |
|
636 |
|
637 /* |
|
638 ;;; Local Variables: *** |
|
639 ;;; mode: C++ *** |
|
640 ;;; End: *** |
|
641 */ |