AALanguage
The best language for those who have nothing to do
|
A stuct used to store information about a language token. More...
#include <LexicalAnalyzer.h>
Public Member Functions | |
Token (LexicalAnalyzer::token_type type_, std::string value_, int line_) | |
A constructor that specifies the public fields of the token. | |
Token () | |
A default constructor, that sets: | |
Public Attributes | |
LexicalAnalyzer::token_type | type |
Internal token type. | |
std::string | value |
Token string equivalent. | |
int | line |
The number of the line containing this token. The global counter for the number of occurrences of ' ' character is used for counting. | |
A stuct used to store information about a language token.
Definition at line 92 of file LexicalAnalyzer.h.
|
inline |
A constructor that specifies the public fields of the token.
Definition at line 102 of file LexicalAnalyzer.h.
|
inline |
A default constructor, that sets:
Definition at line 113 of file LexicalAnalyzer.h.
References line, type, LexicalAnalyzer::unknown, and value.
int Token::line |
The number of the line containing this token. The global counter for the number of occurrences of '
' character is used for counting.
Definition at line 98 of file LexicalAnalyzer.h.
Referenced by Analyzer::execute(), Analyzer::function(), Analyzer::program(), Analyzer::program_body(), Analyzer::semicolon(), Analyzer::statement(), Token(), and Token().
LexicalAnalyzer::token_type Token::type |
Internal token type.
Definition at line 94 of file LexicalAnalyzer.h.
Referenced by Analyzer::construct_expression(), Analyzer::field(), Analyzer::for_statement(), Analyzer::function(), Analyzer::function_or_var_definitions(), Analyzer::namespace_definition(), Analyzer::statement(), Analyzer::switch_statement(), Token(), Token(), Analyzer::var_definition(), and Analyzer::var_definitions().
std::string Token::value |
Token string equivalent.
Definition at line 96 of file LexicalAnalyzer.h.
Referenced by Analyzer::assignment_expression(), Analyzer::bitwise_and_expression(), Analyzer::bitwise_consequence_expression(), Analyzer::bitwise_or_expression(), Analyzer::bitwise_shift_expression(), Analyzer::bitwise_xor_expression(), Analyzer::comparison_expression(), Analyzer::construct_expression(), Analyzer::convert_statement(), Analyzer::default_type(), Analyzer::equality_expression(), Analyzer::exit_statement(), Analyzer::expression(), Analyzer::field(), Analyzer::for_statement(), Analyzer::function(), Analyzer::function_or_var_definitions(), Analyzer::goto_statement(), Analyzer::if_statement(), Semantic::literal_to_type(), Analyzer::logical_and_expression(), Analyzer::logical_or_expression(), Analyzer::may_be_semicolon(), Analyzer::multiply_expression(), Analyzer::namespace_definition(), Analyzer::parameter_list(), Analyzer::plus_expression(), Analyzer::preprocessor(), Analyzer::print_statement(), Analyzer::rand_statement(), Analyzer::read_statement(), Analyzer::readln_statement(), Analyzer::return_statement(), Analyzer::semicolon(), Analyzer::statement(), Analyzer::strlen_statement(), Analyzer::switch_statement(), Analyzer::time_statement(), Token(), Token(), Analyzer::type(), Analyzer::unary_expression(), Analyzer::var_definition(), Analyzer::var_definitions(), and Analyzer::while_statement().