#include "token.h"
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 (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 () | |
filepos | beg_pos () const |
void | beg_pos (const filepos &pos) |
int | column () const |
filepos | end_pos () const |
void | end_pos (const filepos &pos) |
end_tok_type | ettype () const |
bool | iskeyword () const |
bool | isstring () const |
int | line () const |
void | mark_may_be_command () |
void | mark_trailing_space () |
bool | may_be_command () const |
octave_value | number () const |
bool | space_follows_token () const |
std::string | superclass_class_name () const |
std::string | superclass_method_name () const |
std::string | text () const |
std::string | text_rep () const |
int | token_value () const |
bool | token_value_is (int tv) const |
token_type | ttype () const |
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 | ||
) |
token::~token | ( | ) |
Definition at line 86 of file token.cc.
References numeric_token, scls_name_token, and string_token.
|
inline |
Definition at line 105 of file token.h.
Referenced by base_parser::make_arguments_block(), and base_parser::make_assign_op().
|
inline |
Definition at line 113 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 | ( | ) | const |
Definition at line 117 of file token.cc.
References ettype_token, and panic_if.
Referenced by base_parser::end_token_ok().
|
inline |
Definition at line 115 of file token.h.
Referenced by lexical_feedback::previous_token_is_keyword().
|
inline |
Definition at line 112 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 96 of file token.h.
Referenced by base_lexer::handle_identifier().
|
inline |
Definition at line 99 of file token.h.
Referenced by lexical_feedback::mark_previous_token_trailing_space().
|
inline |
Definition at line 97 of file token.h.
Referenced by lexical_feedback::previous_token_may_be_command().
octave_value token::number | ( | ) | const |
Definition at line 104 of file token.cc.
References numeric_token, and panic_if.
Referenced by base_lexer::display_token(), and base_parser::make_constant().
|
inline |
Definition at line 100 of file token.h.
Referenced by lexical_feedback::space_follows_previous_token().
std::string token::superclass_class_name | ( | ) | const |
Definition at line 131 of file token.cc.
References panic_if, and scls_name_token.
Referenced by base_parser::make_superclass_ref().
std::string token::superclass_method_name | ( | ) | const |
Definition at line 124 of file token.cc.
References panic_if, and scls_name_token.
Referenced by base_parser::make_superclass_ref().
std::string token::text | ( | ) | const |
Definition at line 97 of file token.cc.
References 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 | ( | ) | const |
Definition at line 138 of file token.cc.
Referenced by base_parser::make_constant().
|
inline |
Definition at line 102 of file token.h.
Referenced by base_parser::make_constant(), and lexical_feedback::previous_token_value().
|
inline |
Definition at line 103 of file token.h.
Referenced by lexical_feedback::previous_token_value_is().
token::token_type token::ttype | ( | ) | const |