#include "token.h"
Classes | |
union | tok_info |
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 } |
Public Member Functions | |
token (const token &)=delete | |
token (int tv, bool is_keyword, const filepos &beg_pos, const filepos &end_pos) | |
token (int tv, const char *s, const filepos &beg_pos, const filepos &end_pos) | |
token (int tv, const filepos &beg_pos, const filepos &end_pos) | |
token (int tv, const std::string &mth, const std::string &cls, const filepos &beg_pos, const filepos &end_pos) | |
token (int tv, const std::string &s, const filepos &beg_pos, const filepos &end_pos) | |
token (int tv, const symbol_record &s, const filepos &beg_pos, const filepos &end_pos) | |
token (int tv, double d, const std::string &s, const filepos &beg_pos, const filepos &end_pos) | |
token (int tv, end_tok_type t, const filepos &beg_pos, const filepos &end_pos) | |
~token (void) | |
void | beg_pos (const filepos &pos) |
filepos | beg_pos (void) const |
int | column (void) const |
void | end_pos (const filepos &pos) |
filepos | end_pos (void) const |
end_tok_type | ettype (void) const |
bool | is_keyword (void) const |
bool | is_symbol (void) const |
bool | iskeyword (void) const |
int | line (void) const |
void | mark_may_be_command (void) |
void | mark_trailing_space (void) |
bool | may_be_command (void) const |
double | number (void) const |
token & | operator= (const token &)=delete |
bool | space_follows_token (void) const |
std::string | superclass_class_name (void) const |
std::string | superclass_method_name (void) const |
symbol_record | sym_rec (void) const |
std::string | symbol_name (void) const |
std::string | text (void) const |
std::string | text_rep (void) const |
int | token_value (void) const |
bool | token_value_is (int tv) const |
token_type | ttype (void) const |
Private Attributes | |
filepos | m_beg_pos |
filepos | m_end_pos |
bool | m_maybe_cmd |
std::string | m_orig_text |
tok_info | m_tok_info |
int | m_tok_val |
bool | m_tspc |
token_type | m_type_tag |
octave::token::token | ( | int | tv, |
end_tok_type | t, | ||
const filepos & | beg_pos, | ||
const filepos & | end_pos | ||
) |
octave::token::token | ( | int | tv, |
const symbol_record & | s, | ||
const filepos & | beg_pos, | ||
const filepos & | end_pos | ||
) |
|
delete |
octave::token::~token | ( | void | ) |
Definition at line 93 of file token.cc.
References octave::token::tok_info::m_sr, octave::token::tok_info::m_str, octave::token::tok_info::m_superclass_info, m_tok_info, m_type_tag, scls_name_token, string_token, and sym_rec_token.
|
inline |
|
inline |
Definition at line 111 of file token.h.
References m_beg_pos.
Referenced by octave::base_parser::end_token_error(), and octave::base_parser::make_assign_op().
|
inline |
Definition at line 119 of file token.h.
References octave::filepos::column(), and m_beg_pos.
Referenced by octave::base_parser::finish_array_list(), octave::base_parser::finish_cell(), octave::base_parser::finish_if_command(), octave::base_parser::finish_matrix(), 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_function(), 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().
|
inline |
|
inline |
token::end_tok_type octave::token::ettype | ( | void | ) | const |
Definition at line 131 of file token.cc.
References ettype_token, octave::token::tok_info::m_et, m_tok_info, and m_type_tag.
Referenced by octave::base_parser::end_token_error(), and octave::base_parser::end_token_ok().
|
inline |
Definition at line 127 of file token.h.
References iskeyword().
|
inline |
Definition at line 132 of file token.h.
References m_type_tag, and sym_rec_token.
Referenced by octave::lexical_feedback::maybe_mark_previous_token_as_variable().
|
inline |
Definition at line 121 of file token.h.
References ettype_token, keyword_token, and m_type_tag.
Referenced by is_keyword(), and octave::lexical_feedback::previous_token_is_keyword().
|
inline |
Definition at line 118 of file token.h.
References octave::filepos::line(), and m_beg_pos.
Referenced by octave::base_parser::finish_array_list(), octave::base_parser::finish_cell(), octave::base_parser::finish_if_command(), octave::base_parser::finish_matrix(), 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_function(), 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().
|
inline |
Definition at line 102 of file token.h.
References m_maybe_cmd.
Referenced by octave::base_lexer::handle_identifier().
|
inline |
Definition at line 105 of file token.h.
References m_tspc.
Referenced by octave::lexical_feedback::mark_previous_token_trailing_space().
|
inline |
Definition at line 103 of file token.h.
References m_maybe_cmd.
Referenced by octave::lexical_feedback::previous_token_may_be_command().
double octave::token::number | ( | void | ) | const |
Definition at line 118 of file token.cc.
References double_token, octave::token::tok_info::m_num, m_tok_info, and m_type_tag.
Referenced by octave::base_lexer::display_token(), and octave::base_parser::make_constant().
|
inline |
Definition at line 106 of file token.h.
References m_tspc.
Referenced by octave::lexical_feedback::space_follows_previous_token().
std::string octave::token::superclass_class_name | ( | void | ) | const |
Definition at line 152 of file token.cc.
References octave::token::tok_info::superclass_info::m_class_name, octave::token::tok_info::m_superclass_info, m_tok_info, m_type_tag, and scls_name_token.
std::string octave::token::superclass_method_name | ( | void | ) | const |
Definition at line 145 of file token.cc.
References octave::token::tok_info::superclass_info::m_method_name, octave::token::tok_info::m_superclass_info, m_tok_info, m_type_tag, and scls_name_token.
symbol_record octave::token::sym_rec | ( | void | ) | const |
Definition at line 138 of file token.cc.
References octave::token::tok_info::m_sr, m_tok_info, m_type_tag, and sym_rec_token.
Referenced by octave::base_lexer::display_token().
std::string octave::token::symbol_name | ( | void | ) | const |
Definition at line 111 of file token.cc.
References octave::token::tok_info::m_sr, m_tok_info, m_type_tag, octave::symbol_record::name(), and sym_rec_token.
Referenced by octave::lexical_feedback::maybe_mark_previous_token_as_variable().
std::string octave::token::text | ( | void | ) | const |
Definition at line 104 of file token.cc.
References octave::token::tok_info::m_str, m_tok_info, m_type_tag, and string_token.
Referenced by octave::base_lexer::display_token(), octave::base_parser::make_constant(), and octave::base_parser::make_fcn_handle().
std::string octave::token::text_rep | ( | void | ) | const |
Definition at line 159 of file token.cc.
References m_orig_text.
Referenced by octave::base_parser::make_constant().
|
inline |
Definition at line 108 of file token.h.
References m_tok_val.
Referenced by octave_lex(), and octave::lexical_feedback::previous_token_value().
|
inline |
Definition at line 109 of file token.h.
References m_tok_val.
Referenced by octave::lexical_feedback::previous_token_value_is().
token::token_type octave::token::ttype | ( | void | ) | const |
Definition at line 125 of file token.cc.
References m_type_tag.
|
private |
|
private |
|
private |
Definition at line 151 of file token.h.
Referenced by mark_may_be_command(), and may_be_command().
|
private |
Definition at line 225 of file token.h.
Referenced by text_rep().
|
private |
Definition at line 223 of file token.h.
Referenced by ~token(), ettype(), number(), superclass_class_name(), superclass_method_name(), sym_rec(), symbol_name(), and text().
|
private |
Definition at line 158 of file token.h.
Referenced by token_value(), and token_value_is().
|
private |
Definition at line 153 of file token.h.
Referenced by mark_trailing_space(), and space_follows_token().
|
private |
Definition at line 160 of file token.h.
Referenced by ~token(), ettype(), is_symbol(), iskeyword(), number(), superclass_class_name(), superclass_method_name(), sym_rec(), symbol_name(), text(), and ttype().