GNU Octave
3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "token.h"
Public Types | |
enum | end_tok_type { simple_end, classdef_end, enumeration_end, events_end, for_end, function_end, if_end, methods_end, parfor_end, properties_end, switch_end, while_end, try_catch_end, unwind_protect_end } |
enum | token_type { generic_token, keyword_token, string_token, double_token, ettype_token, sym_rec_token, scls_rec_token, meta_rec_token } |
Private Member Functions | |
token (const token &tok) | |
token & | operator= (const token &tok) |
Private Attributes | |
union { | |
end_tok_type et | |
struct { | |
symbol_table::symbol_record * cr | |
symbol_table::symbol_record * pr | |
} mc | |
double num | |
struct { | |
symbol_table::symbol_record * cr | |
symbol_table::symbol_record * mr | |
symbol_table::symbol_record * pr | |
} sc | |
symbol_table::symbol_record * sr | |
std::string * str | |
}; | |
int | column_num |
int | line_num |
bool | maybe_cmd |
std::string | orig_text |
int | tok_val |
bool | tspc |
token_type | type_tag |
enum token::end_tok_type |
enum token::token_type |
Definition at line 35 of file token.cc.
References column_num, generic_token, line_num, maybe_cmd, tok_val, tspc, and type_tag.
Definition at line 45 of file token.cc.
References column_num, generic_token, keyword_token, line_num, maybe_cmd, tok_val, tspc, and type_tag.
Definition at line 55 of file token.cc.
References column_num, line_num, maybe_cmd, str, string_token, tok_val, tspc, and type_tag.
token::token | ( | int | tv, |
end_tok_type | t, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
Definition at line 78 of file token.cc.
References column_num, et, ettype_token, line_num, maybe_cmd, tok_val, tspc, and type_tag.
token::token | ( | int | tv, |
symbol_table::symbol_record * | s, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
Definition at line 89 of file token.cc.
References column_num, line_num, maybe_cmd, sr, sym_rec_token, tok_val, tspc, and type_tag.
token::token | ( | int | tv, |
symbol_table::symbol_record * | cls, | ||
symbol_table::symbol_record * | pkg, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
Definition at line 100 of file token.cc.
References column_num, line_num, maybe_cmd, mc, meta_rec_token, tok_val, tspc, and type_tag.
token::token | ( | int | tv, |
symbol_table::symbol_record * | mth, | ||
symbol_table::symbol_record * | cls, | ||
symbol_table::symbol_record * | pkg, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
Definition at line 113 of file token.cc.
References column_num, line_num, maybe_cmd, sc, scls_rec_token, tok_val, tspc, and type_tag.
token::~token | ( | void | ) |
Definition at line 128 of file token.cc.
References str, string_token, and type_tag.
|
private |
symbol_table::symbol_record * token::class_rec | ( | void | ) |
Definition at line 183 of file token.cc.
References sc, scls_rec_token, and type_tag.
token::end_tok_type token::ettype | ( | void | ) | const |
Definition at line 162 of file token.cc.
References et, ettype_token, and type_tag.
Definition at line 92 of file token.h.
Referenced by lexical_feedback::previous_token_is_keyword().
Definition at line 97 of file token.h.
Referenced by lexical_feedback::maybe_mark_previous_token_as_variable().
Definition at line 80 of file token.h.
Referenced by octave_base_lexer::handle_identifier().
Definition at line 83 of file token.h.
Referenced by lexical_feedback::mark_previous_token_trailing_space().
Definition at line 81 of file token.h.
Referenced by lexical_feedback::previous_token_may_be_command().
symbol_table::symbol_record * token::meta_class_rec | ( | void | ) |
Definition at line 197 of file token.cc.
References mc, meta_rec_token, and type_tag.
symbol_table::symbol_record * token::meta_package_rec | ( | void | ) |
Definition at line 204 of file token.cc.
References mc, meta_rec_token, and type_tag.
symbol_table::symbol_record * token::method_rec | ( | void | ) |
Definition at line 176 of file token.cc.
References sc, scls_rec_token, and type_tag.
Definition at line 149 of file token.cc.
References double_token, num, and type_tag.
Referenced by octave_base_lexer::display_token().
symbol_table::symbol_record * token::package_rec | ( | void | ) |
Definition at line 190 of file token.cc.
References sc, scls_rec_token, and type_tag.
Definition at line 84 of file token.h.
Referenced by lexical_feedback::space_follows_previous_token().
symbol_table::symbol_record * token::sym_rec | ( | void | ) |
Definition at line 169 of file token.cc.
References sr, sym_rec_token, and type_tag.
Referenced by octave_base_lexer::display_token().
std::string token::symbol_name | ( | void | ) | const |
Definition at line 142 of file token.cc.
References symbol_table::symbol_record::name(), sr, sym_rec_token, and type_tag.
Referenced by lexical_feedback::maybe_mark_previous_token_as_variable().
std::string token::text | ( | void | ) | const |
Definition at line 135 of file token.cc.
References str, string_token, and type_tag.
Referenced by octave_base_lexer::display_token().
Definition at line 86 of file token.h.
Referenced by lexical_feedback::previous_token_value().
Definition at line 87 of file token.h.
Referenced by lexical_feedback::previous_token_value_is().
token::token_type token::ttype | ( | void | ) | const |
union { ... } |
symbol_table::symbol_record* token::cr |
end_tok_type token::et |
struct { ... } token::mc |
Referenced by meta_class_rec(), meta_package_rec(), and token().
symbol_table::symbol_record* token::mr |
|
private |
Definition at line 150 of file token.h.
Referenced by text_rep(), and token().
symbol_table::symbol_record* token::pr |
struct { ... } token::sc |
Referenced by class_rec(), method_rec(), package_rec(), and token().
symbol_table::symbol_record* token::sr |
Definition at line 137 of file token.h.
Referenced by sym_rec(), symbol_name(), and token().
std::string* token::str |
|
private |
Definition at line 131 of file token.h.
Referenced by class_rec(), ettype(), meta_class_rec(), meta_package_rec(), method_rec(), number(), package_rec(), sym_rec(), symbol_name(), text(), token(), ttype(), and ~token().