Main Page | Data Structures | File List | Data Fields | Globals

dictionary.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "emit.h"
#include "macros.h"
#include "scanner.h"
#include "ticvocab.h"
#include "dictionary.h"
#include "vocabfuncts.h"
#include "devnode.h"
#include "clflags.h"
#include "parselocals.h"
#include "errhandler.h"
#include "tokzesc.h"
#include "conditl.h"

Include dependency graph for dictionary.c:

Go to the source code of this file.

Defines

#define FC_TOKEN_FUNC   emit_fc_token
#define BUILTIN_FCODE(tok, nam)   VALPARAM_TIC(nam, FC_TOKEN_FUNC, tok , UNSPECIFIED )
#define BI_FCODE_VALUE(tok, nam)   VALPARAM_TIC(nam, FC_TOKEN_FUNC, tok , VALUE )
#define BI_FCODE_VRBLE(tok, nam)   VALPARAM_TIC(nam, FC_TOKEN_FUNC, tok , VARIABLE )
#define BI_FCODE_DEFER(tok, nam)   VALPARAM_TIC(nam, FC_TOKEN_FUNC, tok , DEFER )
#define BI_FCODE_CONST(tok, nam)   VALPARAM_TIC(nam, FC_TOKEN_FUNC, tok , CONST )
#define OBSO_FC_FUNC   obsolete_fc_token
#define OBSOLETE_FCODE(tok, nam)   VALPARAM_TIC(nam, OBSO_FC_FUNC, tok , UNSPECIFIED )
#define OBSOLETE_VALUE(tok, nam)   VALPARAM_TIC(nam, OBSO_FC_FUNC, tok , VALUE )
#define FWORD_EXEC_FUNC   handle_internal
#define BUILTIN_FWORD(fwt, nam)   FWORD_TKN_TIC(nam, FWORD_EXEC_FUNC, fwt, BI_FWRD_DEFN )
#define SHARED_FWORD(fwt, nam)   FWORD_TKN_TIC(nam, FWORD_EXEC_FUNC, fwt, COMMON_FWORD )
#define SHR_FWD_SKOW(fwt, nam)   DUALFUNC_FWT_TIC(nam, FWORD_EXEC_FUNC, fwt, skip_a_word, COMMON_FWORD )
#define SH_FW_SK_WIL(fwt, nam)
#define SH_FW_SK2WIL(fwt, nam)
#define SHARED_IG_HDLR(nam, afunc, pval, ifunc)   DUFNC_FWT_PARM(nam, afunc, pval, ifunc, COMMON_FWORD )
#define SHR_SAMIG_FWRD(fwt, nam)   DUFNC_FWT_PARM(nam, FWORD_EXEC_FUNC, fwt, FWORD_EXEC_FUNC, COMMON_FWORD )
#define BI_IG_FW_HDLR(fwt, nam)   DUALFUNC_FWT_TIC(nam, FWORD_EXEC_FUNC, fwt, FWORD_EXEC_FUNC, BI_FWRD_DEFN )
#define BI_FWD_SKP_OW(fwt, nam)   DUALFUNC_FWT_TIC(nam, FWORD_EXEC_FUNC, fwt, skip_a_word, BI_FWRD_DEFN )
#define BI_FWD_STRING(fwt, nam)   DUALFUNC_FWT_TIC(nam, FWORD_EXEC_FUNC, fwt, skip_string, BI_FWRD_DEFN )

Functions

tic_hdr_tlookup_core_word (char *tname)
bool exists_in_core (char *name)
bool handle_core_word (char *tname)
bool create_core_alias (char *new_name, char *old_name)
static void emit_fc_token (tic_param_t pfield)
static void obsolete_warning (void)
static void obsolete_fc_token (tic_param_t pfield)
void handle_internal (tic_param_t pfield)
void skip_string (tic_param_t pfield)
void enter_global_scope (void)
void resume_device_scope (void)
tic_hdr_tlookup_current (char *tname)
bool exists_in_current (char *tname)
bool handle_current (char *tname)
tic_hdr_tlookup_in_dev_node (char *tname)
void add_to_current (char *name, TIC_P_DEFLT_TYPE fc_token, fwtoken definer, bool define_token)
void hide_last_colon (void)
void reveal_last_colon (void)
bool create_current_alias (char *new_name, char *old_name)
void emit_token (const char *fc_name)
tic_hdr_tlookup_token (char *tname)
bool entry_is_token (tic_hdr_t *test_entry)
void token_entry_warning (tic_hdr_t *t_entry)
tic_hdr_tlookup_shared_word (char *tname)
bool handle_shared_word (char *tname)
tic_hdr_tlookup_shared_f_exec_word (char *tname)
void init_dictionary (void)
void reset_normal_vocabs (void)
void reset_vocabs (void)

Variables

static tic_hdr_tglobal_voc_dict_ptr = NULL
static tic_hdr_tfc_tokens_list_ender = NULL
static tic_hdr_tfc_tokens_list_start = NULL
static tic_hdr_tshared_fwords_ender = NULL
static tic_hdr_tglobal_voc_reset_ptr = NULL
static tic_hdr_t ** save_device_definitions
bool scope_is_global = FALSE
static tic_hdr_tsave_current = NULL
static tic_hdr_t tokens_table []
static const int number_of_builtin_tokens
static tic_fwt_hdr_t fwords_list []
static const int number_of_builtin_fwords
static tic_fwt_hdr_t shared_words_list []
static const int number_of_shared_words


Define Documentation

#define BI_FCODE_CONST tok,
nam   )     VALPARAM_TIC(nam, FC_TOKEN_FUNC, tok , CONST )
 

Definition at line 348 of file dictionary.c.

#define BI_FCODE_DEFER tok,
nam   )     VALPARAM_TIC(nam, FC_TOKEN_FUNC, tok , DEFER )
 

Definition at line 345 of file dictionary.c.

#define BI_FCODE_VALUE tok,
nam   )     VALPARAM_TIC(nam, FC_TOKEN_FUNC, tok , VALUE )
 

Definition at line 339 of file dictionary.c.

#define BI_FCODE_VRBLE tok,
nam   )     VALPARAM_TIC(nam, FC_TOKEN_FUNC, tok , VARIABLE )
 

Definition at line 342 of file dictionary.c.

#define BI_FWD_SKP_OW fwt,
nam   )     DUALFUNC_FWT_TIC(nam, FWORD_EXEC_FUNC, fwt, skip_a_word, BI_FWRD_DEFN )
 

Definition at line 462 of file dictionary.c.

#define BI_FWD_STRING fwt,
nam   )     DUALFUNC_FWT_TIC(nam, FWORD_EXEC_FUNC, fwt, skip_string, BI_FWRD_DEFN )
 

Definition at line 466 of file dictionary.c.

#define BI_IG_FW_HDLR fwt,
nam   )     DUALFUNC_FWT_TIC(nam, FWORD_EXEC_FUNC, fwt, FWORD_EXEC_FUNC, BI_FWRD_DEFN )
 

Definition at line 458 of file dictionary.c.

#define BUILTIN_FCODE tok,
nam   )     VALPARAM_TIC(nam, FC_TOKEN_FUNC, tok , UNSPECIFIED )
 

Definition at line 335 of file dictionary.c.

#define BUILTIN_FWORD fwt,
nam   )     FWORD_TKN_TIC(nam, FWORD_EXEC_FUNC, fwt, BI_FWRD_DEFN )
 

Definition at line 408 of file dictionary.c.

#define FC_TOKEN_FUNC   emit_fc_token
 

Definition at line 333 of file dictionary.c.

Referenced by add_to_current(), and entry_is_token().

#define FWORD_EXEC_FUNC   handle_internal
 

Definition at line 406 of file dictionary.c.

Referenced by lookup_shared_f_exec_word().

#define OBSO_FC_FUNC   obsolete_fc_token
 

Definition at line 377 of file dictionary.c.

Referenced by entry_is_token(), and token_entry_warning().

#define OBSOLETE_FCODE tok,
nam   )     VALPARAM_TIC(nam, OBSO_FC_FUNC, tok , UNSPECIFIED )
 

Definition at line 379 of file dictionary.c.

#define OBSOLETE_VALUE tok,
nam   )     VALPARAM_TIC(nam, OBSO_FC_FUNC, tok , VALUE )
 

Definition at line 382 of file dictionary.c.

#define SH_FW_SK2WIL fwt,
nam   ) 
 

Value:

Definition at line 424 of file dictionary.c.

#define SH_FW_SK_WIL fwt,
nam   ) 
 

Value:

Definition at line 419 of file dictionary.c.

#define SHARED_FWORD fwt,
nam   )     FWORD_TKN_TIC(nam, FWORD_EXEC_FUNC, fwt, COMMON_FWORD )
 

Definition at line 411 of file dictionary.c.

#define SHARED_IG_HDLR nam,
afunc,
pval,
ifunc   )     DUFNC_FWT_PARM(nam, afunc, pval, ifunc, COMMON_FWORD )
 

Definition at line 441 of file dictionary.c.

#define SHR_FWD_SKOW fwt,
nam   )     DUALFUNC_FWT_TIC(nam, FWORD_EXEC_FUNC, fwt, skip_a_word, COMMON_FWORD )
 

Definition at line 415 of file dictionary.c.

#define SHR_SAMIG_FWRD fwt,
nam   )     DUFNC_FWT_PARM(nam, FWORD_EXEC_FUNC, fwt, FWORD_EXEC_FUNC, COMMON_FWORD )
 

Definition at line 445 of file dictionary.c.


Function Documentation

void add_to_current char *  name,
TIC_P_DEFLT_TYPE  fc_token,
fwtoken  definer,
bool  define_token
 

Definition at line 757 of file dictionary.c.

References add_tic_entry(), current_definitions, and FC_TOKEN_FUNC.

Referenced by create_word().

Here is the call graph for this function:

bool create_core_alias char *  new_name,
char *  old_name
 

Definition at line 297 of file dictionary.c.

References create_tic_alias().

Referenced by create_alias().

Here is the call graph for this function:

bool create_current_alias char *  new_name,
char *  old_name
 

Definition at line 866 of file dictionary.c.

References add_tic_entry(), create_tic_alias(), current_definitions, current_device_node, tic_param::deflt_elem, tic_hdr::funct, tic_hdr::fword_defr, tic_hdr::ign_func, in_what_node(), INFO, lookup_core_word(), tic_hdr::pfield, scope_is_global, show_node_start(), and tokenization_error().

Referenced by create_alias().

Here is the call graph for this function:

static void emit_fc_token tic_param_t  pfield  )  [static]
 

Definition at line 327 of file dictionary.c.

References tic_param::deflt_elem, and emit_fcode().

Referenced by obsolete_fc_token().

Here is the call graph for this function:

void emit_token const char *  fc_name  ) 
 

Definition at line 1380 of file dictionary.c.

References FATAL, handle_tic_vocab(), and tokenization_error().

Referenced by abort_quote(), base_change(), create_word(), emit_again(), emit_begin(), emit_case(), emit_else(), emit_endcase(), emit_endof(), emit_fcodehdr(), emit_if(), emit_literal(), emit_of(), emit_repeat(), emit_then(), emit_until(), emit_while(), encode_file(), finish_fcodehdr(), finish_or_new_device(), and handle_internal().

Here is the call graph for this function:

void enter_global_scope void   ) 
 

Definition at line 519 of file dictionary.c.

References current_definitions, INFO, scope_is_global, statbuf, tokenization_error(), and WARNING.

Referenced by handle_internal().

Here is the call graph for this function:

bool entry_is_token tic_hdr_t test_entry  ) 
 

Definition at line 1455 of file dictionary.c.

References FC_TOKEN_FUNC, tic_hdr::funct, and OBSO_FC_FUNC.

Referenced by get_token().

bool exists_in_core char *  name  ) 
 

Definition at line 231 of file dictionary.c.

References exists_in_tic_vocab().

Here is the call graph for this function:

bool exists_in_current char *  tname  ) 
 

Definition at line 614 of file dictionary.c.

References lookup_word().

Referenced by if_exists(), and if_not_exist().

Here is the call graph for this function:

bool handle_core_word char *  tname  ) 
 

Definition at line 258 of file dictionary.c.

References handle_tic_vocab().

Referenced by handle_current().

Here is the call graph for this function:

bool handle_current char *  tname  ) 
 

Definition at line 643 of file dictionary.c.

References current_definitions, handle_core_word(), handle_tic_vocab(), and scope_is_global.

Here is the call graph for this function:

void handle_internal tic_param_t  pfield  ) 
 

Definition at line 4438 of file scanner.c.

References abort_quote(), ABORTTXT, abs_token_no, AGAIN, ALIAS, ALLOW_MULTI_LINE, ASC_LEFT_NUM, ASC_NUM, ASCII, ascii_left_number(), ascii_right_number(), assign_local(), base_change(), base_val(), BEGIN, big_end_pci_image_rev, BRACK_TICK, BUFFER, bump_ret_stk_depth(), CASE, CCHAR, CDO, CHAR, CL_FLAG, clear_control_structs_to_limit(), close_stream(), collect_input_filename(), COLON, CONDL_ELSE, CONDL_ENDER, CONST, CONTROL, CREATE, create_alias(), create_word(), CURLY_BRACE, DASH_ARROW, DECIMAL, declare_locals(), DECVAL, DEFER, DEFINED, dev_change_instance_warning, DEV_SCOPE, DO, do_loop_depth, do_not_overload, dpop(), dpush(), drop_source(), ELSE, emit_again(), emit_begin(), emit_case(), emit_else(), emit_endcase(), emit_endof(), emit_fcode(), emit_if(), emit_literal(), emit_of(), emit_pcihdr(), emit_repeat(), emit_string(), emit_then(), emit_token(), emit_until(), emit_while(), encode_file(), ENCODEFILE, END0, END1, ENDCASE, ENDOF, enter_global_scope(), enter_tokz_esc(), ESCAPETOK, eval_user_symbol(), EXIT, EXTERNAL, F_BRACK_TICK, FCODE_DATE, FCODE_END, fcode_ender(), fcode_starter(), FCODE_TIME, FCODE_V1, FCODE_V2, FCODE_V3, FFLUSH_STDOUT, FIELD, FINISH_DEVICE, finish_locals(), finish_or_new_device(), finish_pcihdr(), FLAG_EXTERNAL, FLAG_HEADERLESS, FLAG_HEADERS, FLITERAL, FLOAD, forget_locals(), FUNC_NAME, tic_hdr::funct, tic_param::fw_token, get_string(), get_token(), get_until(), get_word_in_line(), glob_not_allowed(), GLOB_SCOPE, HEADERLESS, HEADERS, HEX, HEXVAL, hide_last_colon(), ibm_locals, IF, IFILE_NAME, ILINE_NUM, in_last_colon(), in_tokz_esc, iname, incolon, INFO, init_stream(), INSTANCE, instance_filename, instance_lineno, IS, is_instance, ISLAST, just_where_started(), last_colon_abs_token_no, last_colon_defname, last_colon_do_depth, last_colon_fcode, last_colon_filename, last_colon_lineno, lastcolon, LEAVE, lineno, list_fcode_ranges(), LOOP, LOOP_I, LOOP_J, mark_do(), MESSAGE, must_be_deep_in_do(), NEW_DEVICE, nextfcode, noerrors, NOTLAST, OCTAL, OCTVAL, OF, offs16, OFFSET16, oname, opc, OVERLOAD, P_MESSAGE, PBSTRING, pc, pci_image_rev, pci_is_last_image, PCIEND, PCIHDR, PCIREV, tic_hdr::pfield, PLUS_LOOP, POP_FCODE, pop_next_fcode(), PSTRING, PUSH_FCODE, push_source(), RECURSE, RECURSIVE, REPEAT, report_multiline, RESET_FCODE, reset_fcode_ranges(), reset_normal_vocabs(), reset_tokz_esc(), RESETSYMBS, resolve_loop(), resume_device_scope(), ret_stk_access_rpt(), ret_stk_balance_rpt(), RET_STK_FETCH, RET_STK_FROM, RET_STK_TO, reveal_last_colon(), SAVEIMG, scope_is_global, SEMICOLON, set_cl_flag(), set_hdr_flag(), SETLAST, show_all_cl_flag_settings(), SHOW_CL_FLAGS, SSTRING, START0, START1, START2, START4, statbuf, STRING, string_err_check(), test_in_colon(), THEN, TICK, TKERROR, TO, token_entry_warning(), tokenization_error(), trace_creation(), UNLOOP, unresolved_instance(), UNTIL, validate_to_target(), VALUE, VARIABLE, VERSION1, WARNING, WHILE, and you_are_here().

Referenced by filter_comments().

Here is the call graph for this function:

bool handle_shared_word char *  tname  ) 
 

Definition at line 1798 of file dictionary.c.

References tic_hdr::funct, lookup_shared_word(), and tic_hdr::pfield.

Here is the call graph for this function:

void hide_last_colon void   ) 
 

Definition at line 772 of file dictionary.c.

References current_definitions.

Referenced by handle_internal().

void init_dictionary void   ) 
 

Definition at line 1911 of file dictionary.c.

References init_conditionals_vocab(), init_macros(), init_tic_vocab(), init_tokz_esc_vocab(), number_of_builtin_fwords, number_of_builtin_tokens, and number_of_shared_words.

Referenced by main().

Here is the call graph for this function:

tic_hdr_t* lookup_core_word char *  tname  ) 
 

Definition at line 205 of file dictionary.c.

References lookup_tic_entry().

Referenced by create_current_alias(), lookup_current(), and lookup_word().

Here is the call graph for this function:

tic_hdr_t* lookup_current char *  tname  ) 
 

Definition at line 585 of file dictionary.c.

References current_definitions, lookup_core_word(), lookup_tic_entry(), and scope_is_global.

Referenced by lookup_shared_word(), and lookup_with_definer().

Here is the call graph for this function:

tic_hdr_t* lookup_in_dev_node char *  tname  ) 
 

Definition at line 677 of file dictionary.c.

References current_definitions, lookup_tic_entry(), and scope_is_global.

Referenced by lookup_word().

Here is the call graph for this function:

tic_hdr_t* lookup_shared_f_exec_word char *  tname  ) 
 

Definition at line 1846 of file dictionary.c.

References tic_hdr::funct, FWORD_EXEC_FUNC, and lookup_shared_word().

Referenced by is_a_type().

Here is the call graph for this function:

tic_hdr_t* lookup_shared_word char *  tname  ) 
 

Definition at line 1761 of file dictionary.c.

References COMMON_FWORD, tic_hdr::fword_defr, and lookup_current().

Referenced by create_alias(), handle_shared_word(), lookup_shared_f_exec_word(), and lookup_word().

Here is the call graph for this function:

tic_hdr_t* lookup_token char *  tname  ) 
 

Definition at line 1410 of file dictionary.c.

References lookup_tic_entry().

Referenced by get_token().

Here is the call graph for this function:

static void obsolete_fc_token tic_param_t  pfield  )  [static]
 

Definition at line 371 of file dictionary.c.

References emit_fc_token(), and obsolete_warning().

Here is the call graph for this function:

static void obsolete_warning void   )  [static]
 

Definition at line 362 of file dictionary.c.

References obso_fcode_warning, statbuf, tokenization_error(), and WARNING.

Referenced by obsolete_fc_token(), and token_entry_warning().

Here is the call graph for this function:

void reset_normal_vocabs void   ) 
 

Definition at line 1994 of file dictionary.c.

References current_device_node, delete_device_vocab(), device_node::ifile_name, device_node::line_no, device_node::parent_node, reset_tic_vocab(), started_at(), TKERROR, and tokenization_error().

Referenced by fcode_ender(), handle_internal(), and reset_vocabs().

Here is the call graph for this function:

void reset_vocabs void   ) 
 

Definition at line 2041 of file dictionary.c.

References reset_normal_vocabs(), and reset_tokz_esc().

Referenced by main().

Here is the call graph for this function:

void resume_device_scope void   ) 
 

Definition at line 535 of file dictionary.c.

References current_definitions, INFO, scope_is_global, statbuf, tokenization_error(), and WARNING.

Referenced by fcode_ender(), finish_or_new_device(), and handle_internal().

Here is the call graph for this function:

void reveal_last_colon void   ) 
 

Definition at line 788 of file dictionary.c.

References current_definitions.

Referenced by handle_internal().

void skip_string tic_param_t  pfield  ) 
 

Definition at line 5261 of file scanner.c.

References ABORTTXT, CURLY_BRACE, DASH_ARROW, declare_locals(), FATAL, tic_param::fw_token, get_string(), get_until(), get_word(), ibm_locals, lineno, PBSTRING, pc, PSTRING, SSTRING, statbuf, STRING, string_err_check(), and tokenization_error().

Here is the call graph for this function:

void token_entry_warning tic_hdr_t t_entry  ) 
 

Definition at line 1493 of file dictionary.c.

References tic_hdr::funct, OBSO_FC_FUNC, and obsolete_warning().

Referenced by handle_internal().

Here is the call graph for this function:


Variable Documentation

tic_hdr_t* fc_tokens_list_ender = NULL [static]
 

Definition at line 181 of file dictionary.c.

tic_hdr_t* fc_tokens_list_start = NULL [static]
 

Definition at line 182 of file dictionary.c.

tic_fwt_hdr_t fwords_list[] [static]
 

Definition at line 1508 of file dictionary.c.

tic_hdr_t* global_voc_dict_ptr = NULL [static]
 

Definition at line 180 of file dictionary.c.

tic_hdr_t* global_voc_reset_ptr = NULL [static]
 

Definition at line 184 of file dictionary.c.

const int number_of_builtin_fwords [static]
 

Initial value:

         sizeof(fwords_list)/sizeof(tic_hdr_t)

Definition at line 1599 of file dictionary.c.

Referenced by init_dictionary().

const int number_of_builtin_tokens [static]
 

Initial value:

         sizeof(tokens_table)/sizeof(tic_hdr_t)

Definition at line 1339 of file dictionary.c.

Referenced by init_dictionary().

const int number_of_shared_words [static]
 

Initial value:

        sizeof(shared_words_list)/sizeof(tic_hdr_t)

Definition at line 1726 of file dictionary.c.

Referenced by init_dictionary().

tic_hdr_t* save_current = NULL [static]
 

Definition at line 705 of file dictionary.c.

tic_hdr_t** save_device_definitions [static]
 

Definition at line 514 of file dictionary.c.

bool scope_is_global = FALSE
 

Definition at line 516 of file dictionary.c.

Referenced by create_current_alias(), enter_global_scope(), exists_in_ancestor(), fcode_ender(), finish_or_new_device(), handle_current(), handle_internal(), lookup_current(), lookup_in_dev_node(), resume_device_scope(), and trace_creation().

tic_hdr_t* shared_fwords_ender = NULL [static]
 

Definition at line 183 of file dictionary.c.

tic_fwt_hdr_t shared_words_list[] [static]
 

Definition at line 1610 of file dictionary.c.

tic_hdr_t tokens_table[] [static]
 

Definition at line 917 of file dictionary.c.


Generated on Fri Aug 18 14:04:05 2006 for Toke1.0 by  doxygen 1.4.4