#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 (int tv, int l=-1, int c=-1) | |
token (int tv, bool is_keyword, int l=-1, int c=-1) | |
token (int tv, const char *s, int l=-1, int c=-1) | |
token (int tv, const std::string &s, int l=-1, int c=-1) | |
token (int tv, double d, const std::string &s="", int l=-1, int c=-1) | |
token (int tv, end_tok_type t, int l=-1, int c=-1) | |
token (int tv, const symbol_record &s, int l=-1, int c=-1) | |
token (int tv, const std::string &mth, const std::string &cls, int l=-1, int c=-1) | |
token (const token &)=delete | |
~token (void) | |
int | column (void) const |
end_tok_type | ettype (void) const |
bool | is_keyword (void) const |
bool | is_symbol (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 | |
int | m_column_num |
int | m_line_num |
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, |
bool | is_keyword, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
octave::token::token | ( | int | tv, |
const char * | s, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
octave::token::token | ( | int | tv, |
const std::string & | s, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
octave::token::token | ( | int | tv, |
double | d, | ||
const std::string & | s = "" , |
||
int | l = -1 , |
||
int | c = -1 |
||
) |
octave::token::token | ( | int | tv, |
end_tok_type | t, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
octave::token::token | ( | int | tv, |
const symbol_record & | s, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
octave::token::token | ( | int | tv, |
const std::string & | mth, | ||
const std::string & | cls, | ||
int | l = -1 , |
||
int | c = -1 |
||
) |
|
delete |
octave::token::~token | ( | void | ) |
Definition at line 83 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.
token::end_tok_type octave::token::ettype | ( | void | ) | const |
Definition at line 123 of file token.cc.
References ettype_token, octave::token::tok_info::m_et, m_tok_info, and m_type_tag.
double octave::token::number | ( | void | ) | const |
Definition at line 110 of file token.cc.
References double_token, octave::token::tok_info::m_num, m_tok_info, and m_type_tag.
|
inline |
std::string octave::token::superclass_class_name | ( | void | ) | const |
Definition at line 144 of file token.cc.
References octave::token::tok_info::superclass_info::m_class_nm, 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 137 of file token.cc.
References octave::token::tok_info::superclass_info::m_method_nm, 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 130 of file token.cc.
References octave::token::tok_info::m_sr, m_tok_info, m_type_tag, and sym_rec_token.
std::string octave::token::symbol_name | ( | void | ) | const |
Definition at line 103 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.
std::string octave::token::text | ( | void | ) | const |
Definition at line 96 of file token.cc.
References octave::token::tok_info::m_str, m_tok_info, m_type_tag, and string_token.
std::string octave::token::text_rep | ( | void | ) | const |
Definition at line 151 of file token.cc.
References m_orig_text.
token::token_type octave::token::ttype | ( | void | ) | const |
Definition at line 117 of file token.cc.
References m_type_tag.
|
private |
Definition at line 194 of file token.h.
Referenced by text_rep().
|
private |
Definition at line 192 of file token.h.
Referenced by ettype(), number(), superclass_class_name(), superclass_method_name(), sym_rec(), symbol_name(), text(), and ~token().
|
private |
Definition at line 134 of file token.h.
Referenced by ettype(), number(), superclass_class_name(), superclass_method_name(), sym_rec(), symbol_name(), text(), ttype(), and ~token().