#include <locale.h>
#include <string.h>
#include "lua.h"
#include "lctype.h"
#include "ldo.h"
#include "llex.h"
#include "lobject.h"
#include "lparser.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "lzio.h"
Go to the source code of this file.
Macros | |
#define | llex_c |
#define | LUA_CORE |
#define | next(ls) (ls->current = zgetc(ls->z)) |
#define | currIsNewline(ls) (ls->current == '\n' || ls->current == '\r') |
#define | save_and_next(ls) (save(ls, ls->current), next(ls)) |
#define | getlocaledecpoint() (localeconv()->decimal_point[0]) |
#define | buff2d(b, e) luaO_str2d(luaZ_buffer(b), luaZ_bufflen(b) - 1, e) |
Variables | |
static const char *const | luaX_tokens [] |
#define buff2d | ( | b, | |
e | |||
) | luaO_str2d(luaZ_buffer(b), luaZ_bufflen(b) - 1, e) |
Definition at line 208 of file llex.cpp.
Referenced by read_numeral(), and trydecpoint().
Definition at line 31 of file llex.cpp.
Referenced by inclinenumber(), llex(), read_long_string(), and read_string().
#define getlocaledecpoint | ( | ) | (localeconv()->decimal_point[0]) |
Definition at line 204 of file llex.cpp.
Referenced by trydecpoint().
Definition at line 27 of file llex.cpp.
Referenced by pathfind::a_star_search(), wb::mapbuilder::build_map(), config::clear(), wesnothd::server::clones_handler(), convergeephemerons(), default_map_generator_job::default_generate_map(), events::console_handler::do_choose_level(), do_gameloop(), wb::side_actions_container::erase(), pathfind::find_routes(), ai::ai_default_rca::get_villages_phase::find_villages(), persist_context::get_node(), gui2::ttree_view::handle_up_down_arrow(), PluginInstance::JSDirectoryReader::HandleResponse(), inclinenumber(), internshrstr(), utils::join(), utils::join_map(), llex(), luaE_freeCI(), luaK_concat(), luaK_patchclose(), luaS_resize(), markbeingfnz(), ai::ai_default_rca::move_to_targets_phase::move_group(), gui2::iterator::titerator< order >::next(), gui2::iterator::policy::order::tbottom_up< visit_widget, visit_grid, visit_child >::next(), gui2::iterator::policy::order::ttop_down< visit_widget, visit_grid, visit_child >::next(), gui2::iterator::titerator< order >::operator++(), patchlistaux(), read_long_string(), read_string(), readdecesc(), readhexaesc(), gui2::tselect_orb_colors::setup_orb_group(), gui2::iterator::policy::order::ttop_down< visit_widget, visit_grid, visit_child >::up(), and utils::word_match().
Definition at line 45 of file llex.cpp.
Referenced by check_next(), llex(), read_long_string(), read_numeral(), read_string(), and skip_sep().
Definition at line 195 of file llex.cpp.
References LexState::buff, luaZ_buffer, and luaZ_bufflen.
Referenced by read_numeral(), and trydecpoint().
Definition at line 184 of file llex.cpp.
References LexState::current, and save_and_next.
Referenced by llex(), and read_numeral().
Definition at line 304 of file llex.cpp.
References LexState::buff, EOZ, i, lexerror(), luaZ_resetbuffer, save(), and TK_STRING.
Referenced by read_string(), readdecesc(), and readhexaesc().
Definition at line 147 of file llex.cpp.
References LexState::current, currIsNewline, LexState::linenumber, lua_assert, luaX_syntaxerror(), MAX_INT, and next.
Referenced by llex(), read_long_string(), and read_string().
Definition at line 103 of file llex.cpp.
References getstr, LexState::L, LexState::linenumber, LUA_ERRSYNTAX, LUA_IDSIZE, luaD_throw(), luaO_chunkid(), luaO_pushfstring(), LexState::source, and txtToken().
Referenced by escerror(), llex(), luaX_syntaxerror(), read_long_string(), read_string(), save(), and trydecpoint().
Definition at line 400 of file llex.cpp.
References LexState::buff, c, check_next(), LexState::current, currIsNewline, EOZ, TString::extra, FIRST_RESERVED, inclinenumber(), isreserved, lexerror(), lisdigit, lislalnum, lislalpha, luaX_newstring(), luaZ_buffer, luaZ_bufflen, luaZ_resetbuffer, next, read_long_string(), read_numeral(), read_string(), save_and_next, skip_sep(), TK_CONCAT, TK_DBCOLON, TK_DOTS, TK_EOS, TK_EQ, TK_GE, TK_LE, TK_NAME, TK_NE, TK_NUMBER, TK_STRING, SemInfo::ts, and TString::tsv.
Referenced by luaX_lookahead(), and luaX_next().
Definition at line 64 of file llex.cpp.
References cast_byte, TString::extra, i, luaS_fix, luaS_new(), luaX_tokens, NUM_RESERVED, and TString::tsv.
Referenced by f_luaopen().
Definition at line 524 of file llex.cpp.
References llex(), LexState::lookahead, lua_assert, Token::seminfo, TK_EOS, and Token::token.
Referenced by field().
Definition at line 123 of file llex.cpp.
References LexState::fs, FuncState::h, keyfromval, LexState::L, luaC_checkGC, luaH_set(), luaS_newlstr(), rawtsvalue, setbvalue, setsvalue2s, lua_State::top, and ttisnil.
Referenced by anchor_token(), llex(), new_localvarliteral_(), read_long_string(), and read_string().
Definition at line 513 of file llex.cpp.
References LexState::lastline, LexState::linenumber, llex(), LexState::lookahead, Token::seminfo, LexState::t, TK_EOS, and Token::token.
Referenced by checknext(), fieldsel(), forstat(), funcargs(), funcstat(), gotostat(), mainfunc(), parlist(), primaryexp(), repeatstat(), simpleexp(), statement(), str_checkname(), subexpr(), suffixedexp(), test_then_block(), testnext(), whilestat(), and yindex().
Definition at line 158 of file llex.cpp.
References LexState::buff, LexState::current, LexState::decpoint, LexState::envn, LexState::fs, LexState::L, LexState::lastline, LexState::linenumber, LexState::lookahead, LUA_ENV, LUA_MINBUFFER, luaS_fix, luaS_new(), luaZ_resizebuffer, LexState::source, TK_EOS, Token::token, and LexState::z.
Referenced by luaY_parser().
Definition at line 113 of file llex.cpp.
References lexerror(), LexState::t, and Token::token.
Referenced by check_match(), error_expected(), errorlimit(), fixjump(), forstat(), funcargs(), inclinenumber(), luaK_checkstack(), luaK_setlist(), parlist(), primaryexp(), and semerror().
Definition at line 74 of file llex.cpp.
References cast, FIRST_RESERVED, LexState::L, lisprint, lua_assert, LUA_QL, LUA_QS, luaO_pushfstring(), luaX_tokens, and TK_EOS.
Referenced by check_match(), error_expected(), and txtToken().
Definition at line 269 of file llex.cpp.
References LexState::buff, LexState::current, currIsNewline, EOZ, inclinenumber(), lexerror(), luaX_newstring(), luaZ_buffer, luaZ_bufflen, luaZ_resetbuffer, next, save(), save_and_next, skip_sep(), TK_EOS, and SemInfo::ts.
Referenced by llex().
Definition at line 231 of file llex.cpp.
References LexState::buff, buff2d, buffreplace(), check_next(), LexState::current, LexState::decpoint, lisdigit, lisxdigit, lua_assert, SemInfo::r, save(), save_and_next, and trydecpoint().
Referenced by llex().
Definition at line 342 of file llex.cpp.
References LexState::buff, c, LexState::current, currIsNewline, EOZ, escerror(), inclinenumber(), lexerror(), lisdigit, lisspace, luaX_newstring(), luaZ_buffer, luaZ_bufflen, next, readdecesc(), readhexaesc(), save(), save_and_next, TK_EOS, TK_STRING, and SemInfo::ts.
Referenced by llex().
Definition at line 328 of file llex.cpp.
References LexState::current, escerror(), i, lisdigit, and next.
Referenced by read_string().
Definition at line 314 of file llex.cpp.
References escerror(), i, lisxdigit, luaO_hexavalue(), and next.
Referenced by read_string().
Definition at line 51 of file llex.cpp.
References LexState::buff, Mbuffer::buffer, cast, LexState::L, lexerror(), luaZ_bufflen, luaZ_resizebuffer, luaZ_sizebuffer, and MAX_SIZET.
Referenced by playsingle_controller::before_human_turn(), play_controller::do_autosave(), play_controller::do_consolesave(), escerror(), campaign_controller::play_game(), playsingle_controller::play_scenario(), playmp_controller::process_oos(), play_controller::process_oos(), read_long_string(), read_numeral(), read_string(), play_controller::save_game(), play_controller::save_game_auto(), play_controller::save_replay(), play_controller::save_replay_auto(), wesnothd::game::start_game(), txtToken(), and game_launcher::unit_test().
Definition at line 256 of file llex.cpp.
References LexState::current, lua_assert, and save_and_next.
Referenced by llex(), and read_long_string().
Definition at line 214 of file llex.cpp.
References LexState::buff, buff2d, buffreplace(), LexState::decpoint, getlocaledecpoint, lexerror(), SemInfo::r, and TK_NUMBER.
Referenced by read_numeral().
Definition at line 90 of file llex.cpp.
References LexState::buff, LexState::L, LUA_QS, luaO_pushfstring(), luaX_token2str(), luaZ_buffer, save(), TK_NAME, TK_NUMBER, and TK_STRING.
Referenced by lexerror().
|
static |
Definition at line 35 of file llex.cpp.
Referenced by luaX_init(), and luaX_token2str().