#include <stdio.h>#include <unistd.h>#include <string>#include <vector>#include "ucparse.h"#include "ucloc.h"Include dependency graph for uclex.cc:

Go to the source code of this file.
Classes | |
| struct | yy_buffer_state |
Defines | |
| #define | FLEX_SCANNER |
| #define | YY_FLEX_MAJOR_VERSION 2 |
| #define | YY_FLEX_MINOR_VERSION 5 |
| #define | yyconst |
| #define | YY_PROTO(proto) () |
| #define | YY_NULL 0 |
| #define | YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) |
| #define | BEGIN yy_start = 1 + 2 * |
| #define | YY_START ((yy_start - 1) / 2) |
| #define | YYSTATE YY_START |
| #define | YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
| #define | YY_NEW_FILE yyrestart( yyin ) |
| #define | YY_END_OF_BUFFER_CHAR 0 |
| #define | YY_BUF_SIZE 16384 |
| #define | EOB_ACT_CONTINUE_SCAN 0 |
| #define | EOB_ACT_END_OF_FILE 1 |
| #define | EOB_ACT_LAST_MATCH 2 |
| #define | yyless(n) |
| #define | unput(c) yyunput( c, yytext_ptr ) |
| #define | YY_BUFFER_NEW 0 |
| #define | YY_BUFFER_NORMAL 1 |
| #define | YY_BUFFER_EOF_PENDING 2 |
| #define | YY_CURRENT_BUFFER yy_current_buffer |
| #define | YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) |
| #define | yy_new_buffer yy_create_buffer |
| #define | yy_set_interactive(is_interactive) |
| #define | yy_set_bol(at_bol) |
| #define | YY_AT_BOL() (yy_current_buffer->yy_at_bol) |
| #define | yytext_ptr yytext |
| #define | YY_DO_BEFORE_ACTION |
| #define | YY_NUM_RULES 90 |
| #define | YY_END_OF_BUFFER 91 |
| #define | REJECT reject_used_but_not_detected |
| #define | yymore() yymore_used_but_not_detected |
| #define | YY_MORE_ADJ 0 |
| #define | YY_RESTORE_YY_MORE_OFFSET |
| #define | INITIAL 0 |
| #define | comment 1 |
| #define | YY_NO_PUSH_STATE 1 |
| #define | YY_NO_POP_STATE 1 |
| #define | YY_NO_TOP_STATE 1 |
| #define | YY_READ_BUF_SIZE 8192 |
| #define | ECHO (void) fwrite( yytext, yyleng, 1, yyout ) |
| #define | YY_INPUT(buf, result, max_size) |
| #define | yyterminate() return YY_NULL |
| #define | YY_START_STACK_INCR 25 |
| #define | YY_FATAL_ERROR(msg) yy_fatal_error( msg ) |
| #define | YY_DECL int yylex YY_PROTO(( void )) |
| #define | YY_BREAK break; |
| #define | YY_RULE_SETUP YY_USER_ACTION |
| #define | YY_EXIT_FAILURE 2 |
| #define | yyless(n) |
Typedefs | |
| typedef yy_buffer_state * | YY_BUFFER_STATE |
| typedef unsigned int | yy_size_t |
| typedef unsigned char | YY_CHAR |
| typedef int | yy_state_type |
Functions | |
| void | yyrestart () |
| void | yy_switch_to_buffer () |
| void | yy_load_buffer_state () |
| YY_BUFFER_STATE | yy_create_buffer () |
| void | yy_delete_buffer () |
| void | yy_init_buffer () |
| void | yy_flush_buffer () |
| YY_BUFFER_STATE | yy_scan_buffer () |
| YY_BUFFER_STATE | yy_scan_string () |
| YY_BUFFER_STATE | yy_scan_bytes () |
| static void * | yy_flex_alloc () |
| static void * | yy_flex_realloc () |
| static void | yy_flex_free () |
| static yy_state_type | yy_get_previous_state () |
| static yy_state_type | yy_try_NUL_trans () |
| static int | yy_get_next_buffer () |
| static void | yy_fatal_error () |
| static char * | Find_name (char *name, char *&ename) |
| static void | Set_location (char *text) |
| static void | Include (char *yytext) |
| char * | Handle_string (const char *from) |
| int | yywrap () |
| static void | yyunput () |
| static int | input () |
| int | yylex () |
| static yy_state_type | yy_try_NUL_trans (yy_current_state) yy_state_type yy_current_state |
Variables | |
| int | yyleng |
| FILE * | yyin |
| FILE * | yyout |
| static YY_BUFFER_STATE | yy_current_buffer = 0 |
| static char | yy_hold_char |
| static int | yy_n_chars |
| int | yyleng |
| static char * | yy_c_buf_p = (char *) 0 |
| static int | yy_init = 1 |
| static int | yy_start = 0 |
| static int | yy_did_buffer_switch_on_eof |
| FILE * | yyin = (FILE *) 0 |
| FILE * | yyout = (FILE *) 0 |
| char * | yytext |
| static short int | yy_accept [322] |
| static int | yy_ec [256] |
| static int | yy_meta [47] |
| static short int | yy_base [340] |
| static short int | yy_def [340] |
| static short int | yy_nxt [488] |
| static short int | yy_chk [488] |
| static yy_state_type | yy_last_accepting_state |
| static char * | yy_last_accepting_cpos |
| char * | yytext |
| std::vector< char * > | include_dirs |
| std::vector< Uc_location * > | locstack |
| std::vector< YY_BUFFER_STATE > | bufstack |
| register char * | yy_bp |
| int | size |
| FILE * | file |
| yy_size_t | size |
| int | len |
| yy_size_t | size |
| #define EOB_ACT_END_OF_FILE 1 |
| #define EOB_ACT_LAST_MATCH 2 |
| #define YY_AT_BOL | ( | ) | (yy_current_buffer->yy_at_bol) |
| #define YY_BUF_SIZE 16384 |
| #define YY_BUFFER_EOF_PENDING 2 |
| #define YY_CURRENT_BUFFER yy_current_buffer |
| #define YY_DO_BEFORE_ACTION |
Value:
yytext_ptr = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp;
Definition at line 278 of file uclex.cc.
Referenced by yylex().
| #define YY_EXIT_FAILURE 2 |
| #define YY_FATAL_ERROR | ( | msg | ) | yy_fatal_error( msg ) |
| #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) |
| #define YY_INPUT | ( | buf, | |||
| result, | |||||
| max_size | ) |
Value:
if ( yy_current_buffer->yy_is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" );
| #define YY_MORE_ADJ 0 |
Definition at line 572 of file uclex.cc.
Referenced by yy_get_next_buffer(), yy_get_previous_state(), and yylex().
| #define YY_NEW_FILE yyrestart( yyin ) |
| #define YY_RULE_SETUP YY_USER_ACTION |
| #define YY_SC_TO_UI | ( | c | ) | ((unsigned int) (unsigned char) c) |
| #define yy_set_bol | ( | at_bol | ) |
Value:
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
| #define yy_set_interactive | ( | is_interactive | ) |
Value:
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
| #define YY_START ((yy_start - 1) / 2) |
| #define YY_STATE_EOF | ( | state | ) | (YY_END_OF_BUFFER + state + 1) |
| #define yyless | ( | n | ) |
Value:
do \ { \ /* Undo effects of setting up yytext. */ \ yytext[yyleng] = yy_hold_char; \ yy_c_buf_p = yytext + n; \ yy_hold_char = *yy_c_buf_p; \ *yy_c_buf_p = '\0'; \ yyleng = n; \ } \ while ( 0 )
| #define yyless | ( | n | ) |
Value:
do \ { \ /* Undo effects of setting up yytext. */ \ *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 )
| #define yyterminate | ( | ) | return YY_NULL |
| #define yytext_ptr yytext |
Definition at line 268 of file uclex.cc.
Referenced by yy_get_next_buffer(), yy_get_previous_state(), and yylex().
| typedef struct yy_buffer_state* YY_BUFFER_STATE |
| typedef int yy_state_type |
| static char* Find_name | ( | char * | name, | |
| char *& | ename | |||
| ) | [static] |
| char* Handle_string | ( | const char * | from | ) |
| static void Include | ( | char * | yytext | ) | [static] |
Definition at line 670 of file uclex.cc.
References Find_name(), Uc_location::set_cur(), YY_BUF_SIZE, yy_create_buffer(), YY_CURRENT_BUFFER, yy_switch_to_buffer(), and Uc_location::yyerror().
Referenced by yylex().
Here is the call graph for this function:

| static int input | ( | ) | [static] |
| static void Set_location | ( | char * | text | ) | [static] |
Definition at line 649 of file uclex.cc.
References Find_name(), and Uc_location::set_cur().
Referenced by yylex().
Here is the call graph for this function:

| YY_BUFFER_STATE yy_create_buffer | ( | ) |
| void yy_delete_buffer | ( | ) |
Referenced by yylex().
| static void yy_fatal_error | ( | ) | [static] |
| static void* yy_flex_alloc | ( | ) | [static] |
| static void yy_flex_free | ( | ) | [static] |
| static void* yy_flex_realloc | ( | ) | [static] |
Referenced by yy_get_next_buffer().
| void yy_flush_buffer | ( | ) |
| static int yy_get_next_buffer | ( | ) | [static] |
Definition at line 1617 of file uclex.cc.
References EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, yy_buffer_state::yy_buf_size, YY_BUFFER_EOF_PENDING, yy_buffer_state::yy_buffer_status, yy_c_buf_p, yy_buffer_state::yy_ch_buf, yy_current_buffer, YY_FATAL_ERROR, yy_buffer_state::yy_fill_buffer, yy_flex_realloc(), yy_buffer_state::yy_is_our_buffer, YY_MORE_ADJ, yy_buffer_state::yy_n_chars, yy_n_chars, and yytext_ptr.
Referenced by yylex().
Here is the call graph for this function:

| static yy_state_type yy_get_previous_state | ( | ) | [static] |
Definition at line 1749 of file uclex.cc.
References yy_c_buf_p, YY_MORE_ADJ, YY_SC_TO_UI, yy_start, and yytext_ptr.
Referenced by yylex().
| void yy_init_buffer | ( | ) |
| void yy_load_buffer_state | ( | ) |
Referenced by yylex().
| YY_BUFFER_STATE yy_scan_buffer | ( | ) |
| YY_BUFFER_STATE yy_scan_bytes | ( | ) |
| YY_BUFFER_STATE yy_scan_string | ( | ) |
| static yy_state_type yy_try_NUL_trans | ( | yy_current_state | ) | [static] |
| static yy_state_type yy_try_NUL_trans | ( | ) | [static] |
Referenced by yylex().
| int yylex | ( | ) |
Definition at line 893 of file uclex.cc.
References ACTOR, ADD, AFTER, AND, BEGIN, BREAK, CALL, CASE, comment, CONTINUE, CONVERSE, CYCLE, DESCEND, EAST, ECHO, ELSE, ENUM, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, EQUALS, EVENT, EXTERN, FACE, FLAG, FOR, FRAME, Uc_location::get_line(), Uc_location::get_source(), GOTO, GTEQUALS, Handle_string(), HATCH, HIDE, HIT, HOURS, IDENTIFIER, IF, Include(), Uc_location::increment_cur_line(), INITIAL, INT_LITERAL, yystype::intval, ITEM, LTEQUALS, MESSAGE, MUSIC, NE, NEQUALS, NEXT, NOHALT, NOP, NORTH, NOT, NW, OR, ORIGINAL, PREVIOUS, REMOVE, REPEAT, RESPONSE, RETURN, RISE, SAY, SCRIPT, SE, Uc_location::set_cur(), Set_location(), SFX, SOUTH, SPEECH, STATIC_, STEP, STRING, STRING_LITERAL, STRING_PREFIX, yystype::strval, SW, TICKS, TO, UCC_CONST, UCC_IN, UCC_INT, UCC_POINTS, UCFALSE, UCTRUE, VAR, WAIT, WEST, WHILE, WITH, yy_bp, YY_BREAK, YY_BUF_SIZE, YY_BUFFER_NEW, YY_BUFFER_NORMAL, yy_buffer_state::yy_buffer_status, yy_c_buf_p, yy_buffer_state::yy_ch_buf, yy_create_buffer(), yy_current_buffer, YY_CURRENT_BUFFER, yy_delete_buffer(), yy_did_buffer_switch_on_eof, YY_DO_BEFORE_ACTION, YY_END_OF_BUFFER, YY_FATAL_ERROR, yy_get_next_buffer(), yy_get_previous_state(), yy_hold_char, yy_init, yy_buffer_state::yy_input_file, yy_load_buffer_state(), YY_MORE_ADJ, yy_n_chars, yy_buffer_state::yy_n_chars, YY_NEW_FILE, YY_RESTORE_YY_MORE_OFFSET, YY_RULE_SETUP, YY_SC_TO_UI, yy_start, YY_START, YY_STATE_EOF, yy_switch_to_buffer(), yy_try_NUL_trans(), Uc_location::yyerror(), yylval, yyout, yyterminate, yytext_ptr, and yywrap().
Referenced by main().
Here is the call graph for this function:

| void yyrestart | ( | ) |
| static void yyunput | ( | ) | [static] |
| std::vector<YY_BUFFER_STATE> bufstack |
| FILE* file |
Definition at line 2023 of file uclex.cc.
Referenced by Shape_group::add(), Shape_file_set::create(), Chunks_file_info::create_browser(), Shape_group::del(), Palette_edit::drag_data_get(), Shape_draw::drag_data_received(), Vga_file::load(), Shape_file::load(), ucxtInit::opcodes(), Game_window::reload_usecode(), Segment_file::retrieve(), Segment_file::Segment_file(), Shape_group::swap(), Usecode_internal::Usecode_internal(), XMIDIEventList::Write(), and Chunks_file_info::~Chunks_file_info().
| std::vector<char *> include_dirs |
| int len |
Definition at line 2140 of file uclex.cc.
Referenced by MenuChoice::add_choice(), Path::AddString(), Usecode_internal::append_string(), demunge_ocstring(), Shape_chooser::drag_data_get(), Palette_edit::drag_data_get(), Combo_chooser::drag_data_get(), Chunk_chooser::drag_data_get(), Shape_frame::encode_rle(), Extract(), XMIDI::ExtractTracks(), XMIDI::ExtractTracksFromMid(), XMIDI::ExtractTracksFromXmi(), Uc_function::find_string_prefix(), get_file_size(), Game_window::get_game_identity(), Game_window::get_saveinfo(), Game_map::get_schunk_file_name(), Get_square(), FileDataSource::getSize(), StreamDataSource::getSize(), Earthquake::handle_event(), Text_effect::init(), ExultStudio::init_new_npc(), is_null_entry(), is_text_file(), Font::load(), Shape_manager::load(), Palette::load(), Palette_edit::load(), Combo_chooser::load(), load_palette(), KeyBinder::LoadDefaults(), main(), Combat_schedule::monster_died(), ExultStudio::need_to_save(), SI_Game::new_game(), BG_Game::new_game(), Serial_in::operator<<(), Serial_out::operator<<(), Text_effect::paint(), Font::paint_text_box(), Font::paint_text_box_fixedwidth(), Game::play_flic(), Audio::playfile(), print_opcode(), printdataseg(), process_data_seg(), Read_flex(), Exec_process::read_from_child(), ExultStudio::read_from_server(), Read_special_ireg(), Exult_server::Receive_data(), Usecode_value::restore(), Game_window::restore_gamedat(), Usecode_value::save(), Usecode_script::save(), Combo_editor::save(), save_image(), Savefile(), SavefileFromDataSource(), Shape_chooser::select(), Combo_chooser::select(), Exult_server::Send_data(), Uc_location::set_cur(), ExultStudio::set_game_path(), Shape_group_file::Shape_group_file(), StackBufferDataSource::StackBufferDataSource(), Audio::start_speech(), TextScroller::TextScroller(), Usecode_internal::uc_trace_disasm(), Usecode_internal::UI_earthquake(), Update(), Shape_group_file::write(), XMIDIEventList::Write(), Game_map::write_scheduled(), and Write_useval().
| std::vector<Uc_location *> locstack |
| int size |
Definition at line 1934 of file uclex.cc.
Referenced by Conversation::add_answer(), Usecode_value::add_values(), Exult_vector< Chunk_terrain * >::append(), Game_map::cache_out_schunk(), Usecode_value::concat(), Shape_group::del(), BG_Game::end_game(), Container_game_object::get_ireg_size(), Barge_object::get_ireg_size(), Shape_file::get_size(), get_total_size(), on_group_down_clicked(), UCData::parse_params(), SI_Game::play_intro(), ExCineVoc::play_it(), printcodeseg(), process_code_seg(), Exult_vector< Chunk_terrain * >::put(), Conversation::remove_answer(), Usecode_value::resize(), Shape_file::save(), Conversation::show_avatar_choices(), Shape_group::size(), MyMidiPlayer::start_sound_effect(), MyMidiPlayer::start_track(), UCOpcodeData::UCOpcodeData(), Usecode_internal::UI_display_area(), and Usecode_internal::UI_is_water().
char* yy_c_buf_p = (char *) 0 [static] |
Definition at line 219 of file uclex.cc.
Referenced by yy_get_next_buffer(), yy_get_previous_state(), and yylex().
YY_BUFFER_STATE yy_current_buffer = 0 [static] |
int yy_did_buffer_switch_on_eof [static] |
char yy_hold_char [static] |
char* yy_last_accepting_cpos [static] |
yy_state_type yy_last_accepting_state [static] |
int yy_meta[47] [static] |
int yy_n_chars [static] |
int yy_start = 0 [static] |
1.5.1