Mercurial > hg > octave-nkf
comparison src/symtab.h @ 5864:e884ab4f29ee
[project @ 2006-06-22 00:57:27 by jwe]
author | jwe |
---|---|
date | Thu, 22 Jun 2006 00:57:28 +0000 |
parents | 2a6cb4ed8f1e |
children | 4036e6fca790 |
comparison
equal
deleted
inserted
replaced
5863:4c16f3104aa5 | 5864:e884ab4f29ee |
---|---|
72 USER_VARIABLE = 2, | 72 USER_VARIABLE = 2, |
73 DLD_FUNCTION = 4, | 73 DLD_FUNCTION = 4, |
74 BUILTIN_FUNCTION = 8, | 74 BUILTIN_FUNCTION = 8, |
75 COMMAND = 16, | 75 COMMAND = 16, |
76 RAWCOMMAND = 32, | 76 RAWCOMMAND = 32, |
77 MAPPER_FUNCTION = 64 | 77 MAPPER_FUNCTION = 64, |
78 MEX_FUNCTION = 128, | |
78 }; | 79 }; |
79 | 80 |
80 private: | 81 private: |
81 | 82 |
82 // Variables or functions. | 83 // Variables or functions. |
101 | 102 |
102 bool is_function (void) const | 103 bool is_function (void) const |
103 { | 104 { |
104 return (symbol_type & symbol_record::USER_FUNCTION | 105 return (symbol_type & symbol_record::USER_FUNCTION |
105 || symbol_type & symbol_record::DLD_FUNCTION | 106 || symbol_type & symbol_record::DLD_FUNCTION |
107 || symbol_type & symbol_record::MEX_FUNCTION | |
106 || symbol_type & symbol_record::BUILTIN_FUNCTION); | 108 || symbol_type & symbol_record::BUILTIN_FUNCTION); |
107 } | 109 } |
108 | 110 |
109 bool is_user_variable (void) const | 111 bool is_user_variable (void) const |
110 { return (symbol_type & symbol_record::USER_VARIABLE); } | 112 { return (symbol_type & symbol_record::USER_VARIABLE); } |
138 bool is_builtin_function (void) const | 140 bool is_builtin_function (void) const |
139 { return (symbol_type & symbol_record::BUILTIN_FUNCTION); } | 141 { return (symbol_type & symbol_record::BUILTIN_FUNCTION); } |
140 | 142 |
141 bool is_dld_function (void) const | 143 bool is_dld_function (void) const |
142 { return (symbol_type & symbol_record::DLD_FUNCTION); } | 144 { return (symbol_type & symbol_record::DLD_FUNCTION); } |
145 | |
146 bool is_mex_function (void) const | |
147 { return (symbol_type & symbol_record::MEX_FUNCTION); } | |
143 | 148 |
144 // FIXME | 149 // FIXME |
145 bool is_map_element (const std::string& /* elts */) const | 150 bool is_map_element (const std::string& /* elts */) const |
146 { return false; } | 151 { return false; } |
147 | 152 |
314 bool is_builtin_function (void) const | 319 bool is_builtin_function (void) const |
315 { return definition->is_builtin_function (); } | 320 { return definition->is_builtin_function (); } |
316 | 321 |
317 bool is_dld_function (void) const | 322 bool is_dld_function (void) const |
318 { return definition->is_dld_function (); } | 323 { return definition->is_dld_function (); } |
324 | |
325 bool is_mex_function (void) const | |
326 { return definition->is_mex_function (); } | |
319 | 327 |
320 bool is_variable (void) const | 328 bool is_variable (void) const |
321 { return definition->is_variable (); } | 329 { return definition->is_variable (); } |
322 | 330 |
323 bool is_user_variable (void) const | 331 bool is_user_variable (void) const |
483 | symbol_record::USER_VARIABLE \ | 491 | symbol_record::USER_VARIABLE \ |
484 | symbol_record::DLD_FUNCTION \ | 492 | symbol_record::DLD_FUNCTION \ |
485 | symbol_record::BUILTIN_FUNCTION \ | 493 | symbol_record::BUILTIN_FUNCTION \ |
486 | symbol_record::COMMAND \ | 494 | symbol_record::COMMAND \ |
487 | symbol_record::RAWCOMMAND \ | 495 | symbol_record::RAWCOMMAND \ |
488 | symbol_record::MAPPER_FUNCTION) | 496 | symbol_record::MAPPER_FUNCTION \ |
497 | symbol_record::MEX_FUNCTION) | |
489 | 498 |
490 #define SYMTAB_VARIABLES (symbol_record::USER_VARIABLE) | 499 #define SYMTAB_VARIABLES (symbol_record::USER_VARIABLE) |
491 | 500 |
492 class | 501 class |
493 symbol_table | 502 symbol_table |
553 string_vector | 562 string_vector |
554 user_function_name_list (void) const | 563 user_function_name_list (void) const |
555 { | 564 { |
556 return name_list | 565 return name_list |
557 (string_vector (), false, | 566 (string_vector (), false, |
558 symbol_record::USER_FUNCTION|symbol_record::DLD_FUNCTION, | 567 symbol_record::USER_FUNCTION|symbol_record::DLD_FUNCTION|symbol_record::MEX_FUNCTION, |
559 SYMTAB_ALL_SCOPES); | 568 SYMTAB_ALL_SCOPES); |
560 } | 569 } |
561 | 570 |
562 string_vector | 571 string_vector |
563 global_variable_name_list (void) const | 572 global_variable_name_list (void) const |