GNU Octave
4.2.1
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, try_catch_end, unwind_protect_end, while_end } |
enum | token_type { generic_token, keyword_token, string_token, double_token, ettype_token, sym_rec_token, scls_name_token } |
Private Member Functions | |
token (const token &tok) | |
token & | operator= (const token &tok) |
Private Attributes | |
union { | |
end_tok_type et | |
double num | |
struct { | |
std::string * class_nm | |
std::string * method_nm | |
} 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 c, column_num, generic_token, line_num, maybe_cmd, tok_val, tspc, and type_tag.
Definition at line 45 of file token.cc.
References c, column_num, generic_token, keyword_token, line_num, maybe_cmd, tok_val, tspc, and type_tag.
token::token | ( | int | tv, |
const std::string & | s, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
token::token | ( | int | tv, |
double | d, | ||
const std::string & | s = "" , |
||
int | l = -1 , |
||
int | c = -1 |
||
) |
token::token | ( | int | tv, |
end_tok_type | t, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
token::token | ( | int | tv, |
symbol_table::symbol_record * | s, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
token::token | ( | int | tv, |
const std::string & | mth, | ||
const std::string & | cls, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
token::~token | ( | void | ) |
Definition at line 124 of file token.cc.
References sc, scls_name_token, str, string_token, and type_tag.
|
private |
|
inline |
Definition at line 89 of file token.h.
Referenced by octave::base_parser::end_token_error(), octave::base_parser::finish_if_command(), octave::base_parser::finish_switch_command(), octave::base_parser::make_assign_op(), octave::base_parser::make_binary_op(), octave::base_parser::make_boolean_op(), octave::base_parser::make_break_command(), octave::base_parser::make_classdef(), octave::base_parser::make_classdef_enum_block(), octave::base_parser::make_classdef_events_block(), octave::base_parser::make_classdef_methods_block(), octave::base_parser::make_classdef_properties_block(), octave::base_parser::make_constant(), octave::base_parser::make_continue_command(), octave::base_parser::make_decl_command(), octave::base_parser::make_do_until_command(), octave::base_parser::make_elseif_clause(), octave::base_parser::make_fcn_handle(), octave::base_parser::make_for_command(), octave::base_parser::make_postfix_op(), octave::base_parser::make_prefix_op(), octave::base_parser::make_return_command(), octave::base_parser::make_switch_case(), octave::base_parser::make_try_command(), octave::base_parser::make_unwind_command(), and octave::base_parser::make_while_command().
token::end_tok_type token::ettype | ( | void | ) | const |
Definition at line 164 of file token.cc.
References et, ettype_token, and type_tag.
Referenced by octave::base_parser::end_token_error(), and octave::base_parser::end_token_ok().
|
inline |
Definition at line 96 of file token.h.
Referenced by looks_like_copyright().
|
inline |
Definition at line 88 of file token.h.
Referenced by octave::base_parser::end_token_error(), octave::base_parser::finish_if_command(), octave::base_parser::finish_switch_command(), octave::base_parser::make_assign_op(), octave::base_parser::make_binary_op(), octave::base_parser::make_boolean_op(), octave::base_parser::make_break_command(), octave::base_parser::make_classdef(), octave::base_parser::make_classdef_enum_block(), octave::base_parser::make_classdef_events_block(), octave::base_parser::make_classdef_methods_block(), octave::base_parser::make_classdef_properties_block(), octave::base_parser::make_constant(), octave::base_parser::make_continue_command(), octave::base_parser::make_decl_command(), octave::base_parser::make_do_until_command(), octave::base_parser::make_elseif_clause(), octave::base_parser::make_fcn_handle(), octave::base_parser::make_for_command(), octave::base_parser::make_postfix_op(), octave::base_parser::make_prefix_op(), octave::base_parser::make_return_command(), octave::base_parser::make_switch_case(), octave::base_parser::make_try_command(), octave::base_parser::make_unwind_command(), and octave::base_parser::make_while_command().
double token::number | ( | void | ) | const |
Definition at line 151 of file token.cc.
References double_token, num, and type_tag.
Referenced by octave::base_parser::make_constant().
std::string token::superclass_class_name | ( | void | ) |
Definition at line 185 of file token.cc.
References sc, scls_name_token, and type_tag.
std::string token::superclass_method_name | ( | void | ) |
Definition at line 178 of file token.cc.
References sc, scls_name_token, and type_tag.
symbol_table::symbol_record * token::sym_rec | ( | void | ) |
Definition at line 171 of file token.cc.
References sr, sym_rec_token, and type_tag.
std::string token::symbol_name | ( | void | ) | const |
Definition at line 144 of file token.cc.
References symbol_table::symbol_record::name(), sr, sym_rec_token, and type_tag.
Referenced by looks_like_copyright().
std::string token::text | ( | void | ) | const |
Definition at line 137 of file token.cc.
References str, string_token, and type_tag.
Referenced by octave::base_parser::make_constant(), and octave::base_parser::make_fcn_handle().
std::string token::text_rep | ( | void | ) |
Definition at line 192 of file token.cc.
References orig_text.
Referenced by octave::base_parser::make_constant().
|
inline |
Definition at line 85 of file token.h.
Referenced by octave::lexical_feedback::space_follows_previous_token().
Definition at line 86 of file token.h.
Referenced by octave::lexical_feedback::previous_token_is_binop().
token::token_type token::ttype | ( | void | ) | const |
union { ... } |
std::string* token::class_nm |
end_tok_type token::et |
std::string* token::method_nm |
|
private |
Definition at line 139 of file token.h.
Referenced by text_rep(), and token().
struct { ... } token::sc |
Referenced by superclass_class_name(), superclass_method_name(), token(), and ~token().
symbol_table::symbol_record* token::sr |
Definition at line 132 of file token.h.
Referenced by sym_rec(), symbol_name(), and token().
std::string* token::str |
|
private |
Definition at line 126 of file token.h.
Referenced by ettype(), number(), superclass_class_name(), superclass_method_name(), sym_rec(), symbol_name(), text(), token(), ttype(), and ~token().