#include "token.h"
Classes | |
union | tok_info |
Public Types | |
enum | end_tok_type { simple_end , arguments_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 , spmd_end , while_end } |
enum | token_type { generic_token , keyword_token , string_token , numeric_token , ettype_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 octave_value &val, const std::string &s, 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, 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 | iskeyword (void) const |
bool | isstring (void) const |
int | line (void) const |
void | mark_may_be_command (void) |
void | mark_trailing_space (void) |
bool | may_be_command (void) const |
octave_value | 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 |
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 |
enum token::end_tok_type |
enum token::token_type |
token::token | ( | int | tv, |
const octave_value & | val, | ||
const std::string & | s, | ||
const filepos & | beg_pos, | ||
const filepos & | end_pos | ||
) |
token::token | ( | int | tv, |
end_tok_type | t, | ||
const filepos & | beg_pos, | ||
const filepos & | end_pos | ||
) |
|
delete |
token::~token | ( | void | ) |
Definition at line 86 of file token.cc.
References token::tok_info::m_num, token::tok_info::m_str, token::tok_info::m_superclass_info, m_tok_info, m_type_tag, numeric_token, scls_name_token, and string_token.
|
inline |
Definition at line 109 of file token.h.
Referenced by base_parser::end_token_error(), base_parser::make_arguments_block(), and base_parser::make_assign_op().
|
inline |
Definition at line 117 of file token.h.
Referenced by base_parser::finish_array_list(), base_parser::finish_cell(), base_parser::finish_if_command(), base_parser::finish_matrix(), base_parser::finish_switch_command(), base_parser::make_assign_op(), base_parser::make_binary_op(), base_parser::make_boolean_op(), base_parser::make_break_command(), base_parser::make_classdef(), base_parser::make_classdef_enum_block(), base_parser::make_classdef_events_block(), base_parser::make_classdef_methods_block(), base_parser::make_classdef_properties_block(), base_parser::make_constant(), base_parser::make_continue_command(), base_parser::make_decl_command(), base_parser::make_default_switch_case(), base_parser::make_do_until_command(), base_parser::make_else_clause(), base_parser::make_elseif_clause(), base_parser::make_fcn_handle(), base_parser::make_for_command(), base_parser::make_function(), base_parser::make_identifier(), base_parser::make_metaclass_query(), base_parser::make_postfix_op(), base_parser::make_prefix_op(), base_parser::make_return_command(), base_parser::make_spmd_command(), base_parser::make_superclass_ref(), base_parser::make_switch_case(), base_parser::make_try_command(), base_parser::make_unwind_command(), and base_parser::make_while_command().
token::end_tok_type token::ettype | ( | void | ) | const |
Definition at line 117 of file token.cc.
References ettype_token, token::tok_info::m_et, m_tok_info, m_type_tag, and panic_if().
Referenced by base_parser::end_token_error(), and base_parser::end_token_ok().
|
inline |
Definition at line 119 of file token.h.
Referenced by lexical_feedback::previous_token_is_keyword().
|
inline |
Definition at line 116 of file token.h.
Referenced by base_parser::finish_array_list(), base_parser::finish_cell(), base_parser::finish_if_command(), base_parser::finish_matrix(), base_parser::finish_switch_command(), base_parser::make_assign_op(), base_parser::make_binary_op(), base_parser::make_boolean_op(), base_parser::make_break_command(), base_parser::make_classdef(), base_parser::make_classdef_enum_block(), base_parser::make_classdef_events_block(), base_parser::make_classdef_methods_block(), base_parser::make_classdef_properties_block(), base_parser::make_constant(), base_parser::make_continue_command(), base_parser::make_decl_command(), base_parser::make_default_switch_case(), base_parser::make_do_until_command(), base_parser::make_else_clause(), base_parser::make_elseif_clause(), base_parser::make_fcn_handle(), base_parser::make_for_command(), base_parser::make_function(), base_parser::make_identifier(), base_parser::make_metaclass_query(), base_parser::make_postfix_op(), base_parser::make_prefix_op(), base_parser::make_return_command(), base_parser::make_spmd_command(), base_parser::make_superclass_ref(), base_parser::make_switch_case(), base_parser::make_try_command(), base_parser::make_unwind_command(), and base_parser::make_while_command().
|
inline |
Definition at line 100 of file token.h.
Referenced by base_lexer::handle_identifier().
|
inline |
Definition at line 103 of file token.h.
Referenced by lexical_feedback::mark_previous_token_trailing_space().
|
inline |
Definition at line 101 of file token.h.
Referenced by lexical_feedback::previous_token_may_be_command().
octave_value token::number | ( | void | ) | const |
Definition at line 104 of file token.cc.
References token::tok_info::m_num, m_tok_info, m_type_tag, numeric_token, and panic_if().
Referenced by base_lexer::display_token(), and base_parser::make_constant().
|
inline |
Definition at line 104 of file token.h.
Referenced by lexical_feedback::space_follows_previous_token().
std::string token::superclass_class_name | ( | void | ) | const |
Definition at line 131 of file token.cc.
References token::tok_info::superclass_info::m_class_name, token::tok_info::m_superclass_info, m_tok_info, m_type_tag, panic_if(), and scls_name_token.
Referenced by base_parser::make_superclass_ref().
std::string token::superclass_method_name | ( | void | ) | const |
Definition at line 124 of file token.cc.
References token::tok_info::superclass_info::m_method_name, token::tok_info::m_superclass_info, m_tok_info, m_type_tag, panic_if(), and scls_name_token.
Referenced by base_parser::make_superclass_ref().
std::string token::text | ( | void | ) | const |
Definition at line 97 of file token.cc.
References token::tok_info::m_str, m_tok_info, m_type_tag, panic_if(), and string_token.
Referenced by base_lexer::display_token(), base_parser::make_classdef_superclass(), base_parser::make_constant(), base_parser::make_fcn_handle(), base_parser::make_identifier(), and base_parser::make_metaclass_query().
std::string token::text_rep | ( | void | ) | const |
Definition at line 138 of file token.cc.
References m_orig_text.
Referenced by base_parser::make_constant().
|
inline |
Definition at line 106 of file token.h.
Referenced by base_parser::make_constant(), and lexical_feedback::previous_token_value().
|
inline |
Definition at line 107 of file token.h.
Referenced by lexical_feedback::previous_token_value_is().
token::token_type token::ttype | ( | void | ) | const |
Definition at line 111 of file token.cc.
References m_type_tag.
|
private |
Definition at line 208 of file token.h.
Referenced by text_rep().
|
private |
Definition at line 206 of file token.h.
Referenced by ~token(), ettype(), number(), superclass_class_name(), superclass_method_name(), and text().
|
private |
Definition at line 147 of file token.h.
Referenced by ~token(), ettype(), number(), superclass_class_name(), superclass_method_name(), text(), and ttype().