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

scanner.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#include "macros.h"
#include "stack.h"
#include "stream.h"
#include "emit.h"
#include "toke.h"
#include "dictionary.h"
#include "vocabfuncts.h"
#include "scanner.h"
#include "errhandler.h"
#include "tokzesc.h"
#include "conditl.h"
#include "flowcontrol.h"
#include "usersymbols.h"
#include "clflags.h"
#include "devnode.h"
#include "tracesyms.h"
#include "nextfcode.h"
#include "parselocals.h"

Include dependency graph for scanner.c:

Go to the source code of this file.

Data Structures

struct  source_state

Typedefs

typedef enum headeredness_t headeredness
typedef source_state source_state_t

Enumerations

enum  headeredness_t { FLAG_HEADERLESS, FLAG_EXTERNAL, FLAG_HEADERS }

Functions

static bool skip_ws (void)
bool skip_until (char lim_ch)
static signed long get_until (char needle)
void push_source (void(*res_func)(), _PTR res_parm, bool file_chg)
static void drop_source (void)
static bool pop_source (void)
signed long get_word (void)
bool get_word_in_line (char *func_nam)
bool get_rest_of_line (void)
void warn_unterm (int severity, char *something, unsigned int saved_lineno)
void warn_if_multiline (char *something, unsigned int start_lineno)
static void string_remark (char *errmsg_txt)
static long parse_number (u8 *start, u8 **endptr, int lbase)
static void add_byte_to_string (u8 nu_byte, u8 **walk)
static void c_string_escape (u8 **walk)
static bool get_sequence (u8 **walk)
static signed long get_string (bool pack_str)
static void handle_user_message (char delim, bool print_it)
void user_message (tic_param_t pfield)
void skip_user_message (tic_param_t pfield)
bool get_number (long *result)
static void deliver_number (long numval)
static bool handle_number (void)
static void ascii_right_number (char *in_str)
static void ascii_left_number (char *in_str)
void init_scanner (void)
void exit_scanner (void)
static void set_hdr_flag (headeredness new_flag)
void init_scan_state (void)
static void collect_input_filename (char **saved_nam)
static bool test_in_colon (char *wname, bool sb_in_colon, int severity, char *use_instead)
static void must_be_deep_in_do (int how_deep)
static void bump_ret_stk_depth (int bump)
static void ret_stk_balance_rpt (char *before_what, bool clear_it)
static void ret_stk_access_rpt (void)
static void encode_file (const char *filename)
void check_name_length (signed long wlen)
static bool definer_name (fwtoken definer, char **reslt_ptr)
bool as_a_what (fwtoken definer, char *as_what)
tic_hdr_tlookup_word (char *stat_name, char **where_pt1, char **where_pt2)
bool word_exists (char *stat_name, char **where_pt1, char **where_pt2)
void warn_if_duplicate (char *stat_name)
static void glob_not_allowed (int severity, bool not_ignoring)
static void not_in_dict (char *stat_name)
static void tokenized_word_error (char *stat_name)
static void unresolved_instance (int severity)
static void modified_by_instance (fwtoken definer, bool was_modded)
static void validate_instance (fwtoken definer)
void trace_creation (fwtoken definer, char *nu_name)
static bool create_word (fwtoken definer)
static void cannot_apply (char *func_nam, char *targ_nam, fwtoken defr)
static tic_hdr_tlookup_with_definer (char *stat_name, fwtoken *definr)
static bool validate_to_target (void)
static void you_are_here (void)
static void fcode_starter (const char *token_name, int spread, bool is_offs16)
static void fcode_end_err_check (void)
void fcode_ender (void)
static bool get_token (tic_hdr_t **tok_entry)
static void base_change (int new_base)
static void base_val (int new_base)
void eval_string (char *inp_bufr)
static void finish_or_new_device (bool finishing_device)
static bool abort_quote (fwtoken tok)
static bool create_alias (void)
static bool string_err_check (bool is_paren, unsigned int sav_lineno, unsigned int strt_lineno)
void handle_internal (tic_param_t pfield)
void skip_string (tic_param_t pfield)
void process_remark (tic_param_t pfield)
bool filter_comments (u8 *inword)
void tokenize_one_word (signed long wlen)
void tokenize (void)

Variables

u8 * statbuf = NULL
u8 base = 0x0a
bool pci_is_last_image = TRUE
u16 pci_image_rev = 0x0001
u16 pci_vpd = 0x0000
bool offs16 = TRUE
bool in_tokz_esc = FALSE
bool incolon = FALSE
bool haveend = FALSE
int do_loop_depth = 0
int lastcolon
char * last_colon_defname = NULL
char * last_colon_filename = NULL
unsigned int last_colon_lineno
bool report_multiline = TRUE
unsigned int last_colon_abs_token_no
static u16 last_colon_fcode
static bool do_not_overload = TRUE
static bool got_until_eof = FALSE
static unsigned int last_colon_do_depth = 0
static headeredness hdr_flag = FLAG_HEADERLESS
static bool is_instance = FALSE
static char * instance_filename = NULL
static unsigned int instance_lineno
static bool fcode_started = FALSE
static bool first_fc_starter = TRUE
static bool need_to_pop_source
static int ret_stk_depth = 0
static bool dev_change_instance_warning = TRUE
static bool instance_definer_gap = FALSE
static char * in_tkz_esc_mode = "in Tokenizer-Escape mode.\n"
static source_state_tsaved_source = NULL
static bool unterm_is_colon = FALSE
static char lookup_where_pt1_buf [32]


Typedef Documentation

typedef enum headeredness_t headeredness
 

typedef struct source_state source_state_t
 


Enumeration Type Documentation

enum headeredness_t
 

Enumerator:
FLAG_HEADERLESS 
FLAG_EXTERNAL 
FLAG_HEADERS 

Definition at line 107 of file scanner.c.


Function Documentation

static bool abort_quote fwtoken  tok  )  [static]
 

Definition at line 4111 of file scanner.c.

References abort_quote_throw, ABORTTXT, emit_if(), emit_literal(), emit_string(), emit_then(), emit_token(), enable_abort_quote, get_string(), INFO, statbuf, sun_style_abort_quote, test_in_colon(), TKERROR, and tokenization_error().

Referenced by handle_internal().

Here is the call graph for this function:

static void add_byte_to_string u8  nu_byte,
u8 **  walk
[static]
 

Definition at line 1003 of file scanner.c.

References GET_BUF_MAX, and statbuf.

Referenced by c_string_escape(), and get_string().

bool as_a_what fwtoken  definer,
char *  as_what
 

Definition at line 2538 of file scanner.c.

References ALIAS, and definer_name().

Referenced by exists_in_ancestor(), lookup_word(), and trace_creation().

Here is the call graph for this function:

static void ascii_left_number char *  in_str  )  [static]
 

Definition at line 1854 of file scanner.c.

References deliver_number().

Referenced by handle_internal().

Here is the call graph for this function:

static void ascii_right_number char *  in_str  )  [static]
 

Definition at line 1815 of file scanner.c.

References deliver_number().

Referenced by handle_internal().

Here is the call graph for this function:

static void base_change int  new_base  )  [static]
 

Definition at line 3869 of file scanner.c.

References base, emit_literal(), emit_token(), in_tokz_esc, and incolon.

Referenced by handle_internal().

Here is the call graph for this function:

static void base_val int  new_base  )  [static]
 

Definition at line 3881 of file scanner.c.

References base, FUNC_CPY_BUF_SIZE, get_word_in_line(), handle_number(), source_state::old_pc, pc, statbuf, tokenization_error(), and WARNING.

Referenced by handle_internal().

Here is the call graph for this function:

static void bump_ret_stk_depth int  bump  )  [static]
 

Definition at line 2223 of file scanner.c.

References ret_stk_depth.

Referenced by handle_internal().

static void c_string_escape u8 **  walk  )  [static]
 

Definition at line 1060 of file scanner.c.

References add_byte_to_string(), base, end, iname, lineno, parse_number(), pc, tokenization_error(), verbose, and WARNING.

Referenced by get_string().

Here is the call graph for this function:

static void cannot_apply char *  func_nam,
char *  targ_nam,
fwtoken  defr
[static]
 

Definition at line 3375 of file scanner.c.

References definer_name(), TKERROR, and tokenization_error().

Referenced by get_token(), and validate_to_target().

Here is the call graph for this function:

void check_name_length signed long  wlen  ) 
 

Definition at line 2423 of file scanner.c.

References FLAG_HEADERLESS, hdr_flag, in_tokz_esc, INFO, TKERROR, tokenization_error(), and WARNING.

Referenced by create_constant(), and create_word().

Here is the call graph for this function:

static void collect_input_filename char **  saved_nam  )  [static]
 

Definition at line 2042 of file scanner.c.

References iname.

Referenced by handle_internal().

static bool create_alias void   )  [static]
 

Definition at line 4240 of file scanner.c.

References ALIAS, create_core_alias(), create_current_alias(), create_local_alias(), create_tokz_esc_alias(), get_word_in_line(), in_tokz_esc, incolon, lookup_shared_word(), statbuf, tokenization_error(), tokenized_word_error(), validate_instance(), warn_if_duplicate(), and WARNING.

Referenced by handle_internal().

Here is the call graph for this function:

static bool create_word fwtoken  definer  )  [static]
 

Definition at line 3240 of file scanner.c.

References add_to_current(), announce_control_structs(), assigning_fcode(), bump_fcode(), check_name_length(), control_stack_depth, definer_name(), emit_fcode(), emit_string(), emit_token(), FLAG_EXTERNAL, FLAG_HEADERS, force_lower_case_tokens, force_tokens_case, get_word(), hdr_flag, iname, lineno, nextfcode, source_state::old_lineno, statbuf, test_in_colon(), TKERROR, trace_creation(), validate_instance(), warn_if_duplicate(), and warn_unterm().

Referenced by handle_internal().

Here is the call graph for this function:

static bool definer_name fwtoken  definer,
char **  reslt_ptr
[static]
 

Definition at line 2465 of file scanner.c.

References ALIAS, BUFFER, COLON, CONST, CREATE, DEFER, FIELD, LOCAL_VAL, MACRO_DEF, VALUE, and VARIABLE.

Referenced by as_a_what(), cannot_apply(), create_word(), and modified_by_instance().

static void deliver_number long  numval  )  [static]
 

Definition at line 1745 of file scanner.c.

References dpush(), emit_literal(), and in_tokz_esc.

Referenced by ascii_left_number(), ascii_right_number(), and handle_number().

Here is the call graph for this function:

static void drop_source void   )  [static]
 

Definition at line 438 of file scanner.c.

References source_state::next.

Referenced by handle_internal(), and pop_source().

static void encode_file const char *  filename  )  [static]
 

Definition at line 2358 of file scanner.c.

References emit_string(), emit_token(), INFO, open_expanded_file(), statbuf, STRING_LEN_MAX, and tokenization_error().

Referenced by handle_internal().

Here is the call graph for this function:

void eval_string char *  inp_bufr  ) 
 

Definition at line 3943 of file scanner.c.

References init_inbuf(), and push_source().

Referenced by activate_locals(), eval_builtin_mac(), eval_user_symbol(), finish_locals(), and invoke_local().

Here is the call graph for this function:

void exit_scanner void   ) 
 

Definition at line 1895 of file scanner.c.

References statbuf.

Referenced by main().

static void fcode_end_err_check void   )  [static]
 

Definition at line 3674 of file scanner.c.

References clear_control_structs(), clear_stack(), stackdepth(), tokenization_error(), and WARNING.

Referenced by fcode_ender().

Here is the call graph for this function:

void fcode_ender void   ) 
 

Definition at line 3741 of file scanner.c.

References current_device_node, default_top_dev_ifile_name, fcode_end_err_check(), fcode_started, finish_fcodehdr(), haveend, device_node::ifile_name, iname, incolon, is_instance, last_colon_filename, last_colon_lineno, device_node::line_no, reset_normal_vocabs(), resume_device_scope(), scope_is_global, TKERROR, tokenization_error(), unresolved_instance(), warn_unterm(), and WARNING.

Referenced by finish_fcodehdr(), and handle_internal().

Here is the call graph for this function:

static void fcode_starter const char *  token_name,
int  spread,
bool  is_offs16
[static]
 

Definition at line 3619 of file scanner.c.

References current_device_node, emit_fcodehdr(), fcode_started, first_fc_starter, device_node::ifile_name, iname, device_node::line_no, lineno, nextfcode, offs16, reset_fcode_ranges(), set_next_fcode(), tokenization_error(), WARNING, and you_are_here().

Referenced by handle_internal().

Here is the call graph for this function:

bool filter_comments u8 *  inword  ) 
 

Definition at line 5397 of file scanner.c.

References ALLOW_MULTI_LINE, tic_hdr::funct, tic_param::fw_token, handle_internal(), lookup_word(), tic_hdr::pfield, and process_remark().

Referenced by gather_locals().

Here is the call graph for this function:

static void finish_or_new_device bool  finishing_device  )  [static]
 

Definition at line 4005 of file scanner.c.

References dev_change_instance_warning, emit_token(), finish_device_vocab(), glob_not_allowed(), incolon, instance_definer_gap, is_instance, new_device_vocab(), noerrors, resume_device_scope(), scope_is_global, TKERROR, unresolved_instance(), and WARNING.

Referenced by handle_internal().

Here is the call graph for this function:

bool get_number long *  result  ) 
 

Definition at line 1693 of file scanner.c.

References base, iname, lineno, parse_number(), and statbuf.

Referenced by gather_locals(), and handle_number().

Here is the call graph for this function:

bool get_rest_of_line void   ) 
 

Definition at line 745 of file scanner.c.

References abs_token_no, get_until(), lineno, pc, and skip_ws().

Referenced by add_user_macro(), and skip_user_macro().

Here is the call graph for this function:

static bool get_sequence u8 **  walk  )  [static]
 

Definition at line 1244 of file scanner.c.

References end, hex_remark_escape, iname, lineno, parse_number(), pc, and string_remark().

Referenced by get_string().

Here is the call graph for this function:

static signed long get_string bool  pack_str  )  [static]
 

Definition at line 1337 of file scanner.c.

References add_byte_to_string(), c_string_escape(), c_style_string_escape, end, GET_BUF_MAX, get_sequence(), got_until_eof, iname, lineno, pc, statbuf, STRING_LEN_MAX, string_remark(), string_remark_escape, TKERROR, tokenization_error(), verbose, warn_if_multiline(), warn_unterm(), and WARNING.

Referenced by abort_quote(), handle_internal(), handle_user_message(), and skip_string().

Here is the call graph for this function:

static bool get_token tic_hdr_t **  tok_entry  )  [static]
 

Definition at line 3815 of file scanner.c.

References BI_FWRD_DEFN, cannot_apply(), entry_is_token(), FUNC_CPY_BUF_SIZE, get_word_in_line(), lookup_token(), lookup_with_definer(), pc, statbuf, and UNSPECIFIED.

Referenced by handle_internal().

Here is the call graph for this function:

static signed long get_until char  needle  )  [static]
 

Definition at line 277 of file scanner.c.

References GET_BUF_MAX, got_until_eof, pc, skip_until(), statbuf, TKERROR, and tokenization_error().

Referenced by get_rest_of_line(), handle_internal(), handle_user_message(), process_remark(), and skip_string().

Here is the call graph for this function:

signed long get_word void   ) 
 

Definition at line 595 of file scanner.c.

References abs_token_no, end, FATAL, GET_BUF_MAX, iname, lineno, need_to_pop_source, pc, pop_source(), skip_ws(), statbuf, and tokenization_error().

Referenced by assign_local(), conditionally_tokenize(), create_constant(), create_word(), finish_locals(), gather_locals(), get_word_in_line(), skip_a_word(), skip_string(), tokenize(), and validate_to_target().

Here is the call graph for this function:

bool get_word_in_line char *  func_nam  ) 
 

Definition at line 681 of file scanner.c.

References abs_token_no, FUNC_CPY_BUF_SIZE, get_word(), lineno, pc, TKERROR, and tokenization_error().

Referenced by add_user_macro(), base_val(), conditional_word_in_line(), create_alias(), get_token(), handle_internal(), skip_a_word_in_line(), skip_two_words_in_line(), and skip_user_macro().

Here is the call graph for this function:

static void glob_not_allowed int  severity,
bool  not_ignoring
[static]
 

Definition at line 2839 of file scanner.c.

References statbuf, and tokenization_error().

Referenced by finish_or_new_device(), and handle_internal().

Here is the call graph for this function:

void handle_internal tic_param_t  pfield  ) 
 

static bool handle_number void   )  [static]
 

Definition at line 1774 of file scanner.c.

References deliver_number(), and get_number().

Referenced by base_val(), and tokenize_one_word().

Here is the call graph for this function:

static void handle_user_message char  delim,
bool  print_it
[static]
 

Definition at line 1542 of file scanner.c.

References get_string(), get_until(), got_until_eof, lineno, MESSAGE, pc, statbuf, tokenization_error(), warn_if_multiline(), warn_unterm(), and WARNING.

Referenced by skip_user_message(), and user_message().

Here is the call graph for this function:

void init_scan_state void   ) 
 

Definition at line 1990 of file scanner.c.

References base, dev_change_instance_warning, first_fc_starter, FLAG_HEADERLESS, incolon, instance_definer_gap, instance_filename, is_instance, last_colon_filename, need_to_pop_source, pci_is_last_image, reset_fcode_ranges(), ret_stk_depth, and set_hdr_flag().

Referenced by main().

Here is the call graph for this function:

void init_scanner void   ) 
 

Definition at line 1883 of file scanner.c.

References GET_BUF_MAX, safe_malloc(), and statbuf.

Referenced by main().

Here is the call graph for this function:

static tic_hdr_t* lookup_with_definer char *  stat_name,
fwtoken definr
[static]
 

Definition at line 3424 of file scanner.c.

References exists_as_local(), tic_hdr::fword_defr, LOCAL_VAL, and lookup_current().

Referenced by get_token(), and validate_to_target().

Here is the call graph for this function:

tic_hdr_t* lookup_word char *  stat_name,
char **  where_pt1,
char **  where_pt2
 

Definition at line 2644 of file scanner.c.

References as_a_what(), current_device_node, tic_hdr::fword_defr, ibm_locals, in_tkz_esc_mode, in_tokz_esc, in_what_node(), lookup_core_word(), lookup_in_dev_node(), lookup_local(), lookup_shared_word(), and lookup_tokz_esc().

Referenced by exists_in_current(), filter_comments(), ignore_one_word(), tokenize_one_word(), and word_exists().

Here is the call graph for this function:

static void modified_by_instance fwtoken  definer,
bool  was_modded
[static]
 

Definition at line 2988 of file scanner.c.

References definer_name(), instance_filename, instance_lineno, just_where_started(), tokenization_error(), and WARNING.

Referenced by validate_instance().

Here is the call graph for this function:

static void must_be_deep_in_do int  how_deep  )  [static]
 

Definition at line 2135 of file scanner.c.

References do_loop_depth, in_last_colon(), incolon, last_colon_do_depth, statbuf, TKERROR, and tokenization_error().

Referenced by handle_internal().

Here is the call graph for this function:

static void not_in_dict char *  stat_name  )  [static]
 

Definition at line 2866 of file scanner.c.

References TKERROR, and tokenization_error().

Referenced by tokenized_word_error().

Here is the call graph for this function:

static long parse_number u8 *  start,
u8 **  endptr,
int  lbase
[static]
 

Definition at line 923 of file scanner.c.

References iname, and lineno.

Referenced by c_string_escape(), get_number(), and get_sequence().

static bool pop_source void   )  [static]
 

Definition at line 487 of file scanner.c.

References drop_source(), end, iname, lineno, need_to_pop_source, source_state::old_end, source_state::old_iname, source_state::old_lineno, source_state::old_pc, source_state::old_start, source_state::pause_before_pop, pc, report_multiline, source_state::resump_func, source_state::resump_param, source_state::sav_rep_multlin, and start.

Referenced by get_word().

Here is the call graph for this function:

void process_remark tic_param_t  pfield  ) 
 

Definition at line 5336 of file scanner.c.

References tic_param::deflt_elem, get_until(), iname, lineno, pc, skip_until(), statbuf, tokenization_error(), warn_if_multiline(), warn_unterm(), and WARNING.

Referenced by filter_comments().

Here is the call graph for this function:

void push_source void(*)()  res_func,
_PTR  res_parm,
bool  file_chg
 

Definition at line 394 of file scanner.c.

References end, iname, lineno, source_state::next, source_state::old_end, source_state::old_iname, source_state::old_lineno, source_state::old_pc, source_state::old_start, source_state::pause_before_pop, pc, report_multiline, source_state::resump_func, source_state::resump_param, safe_malloc(), source_state::sav_rep_multlin, and start.

Referenced by eval_mac_string(), eval_string(), and handle_internal().

Here is the call graph for this function:

static void ret_stk_access_rpt void   )  [static]
 

Definition at line 2330 of file scanner.c.

References in_last_colon(), ret_stk_depth, statbuf, tokenization_error(), and WARNING.

Referenced by handle_internal().

Here is the call graph for this function:

static void ret_stk_balance_rpt char *  before_what,
bool  clear_it
[static]
 

Definition at line 2282 of file scanner.c.

References in_last_colon(), ret_stk_depth, statbuf, tokenization_error(), and WARNING.

Referenced by handle_internal().

Here is the call graph for this function:

static void set_hdr_flag headeredness  new_flag  )  [static]
 

Definition at line 1929 of file scanner.c.

References always_external, always_headers, FLAG_EXTERNAL, FLAG_HEADERLESS, FLAG_HEADERS, and hdr_flag.

Referenced by handle_internal(), and init_scan_state().

void skip_string tic_param_t  pfield  ) 
 

bool skip_until char  lim_ch  ) 
 

Definition at line 210 of file scanner.c.

References end, lineno, and pc.

Referenced by declare_locals(), get_until(), process_remark(), and string_remark().

void skip_user_message tic_param_t  pfield  ) 
 

Definition at line 1658 of file scanner.c.

References tic_param::deflt_elem, and handle_user_message().

Here is the call graph for this function:

static bool skip_ws void   )  [static]
 

Definition at line 165 of file scanner.c.

References end, lineno, and pc.

Referenced by get_rest_of_line(), get_word(), and string_remark().

static bool string_err_check bool  is_paren,
unsigned int  sav_lineno,
unsigned int  strt_lineno
[static]
 

Definition at line 4370 of file scanner.c.

References got_until_eof, noerrors, TKERROR, warn_if_multiline(), and warn_unterm().

Referenced by handle_internal(), and skip_string().

Here is the call graph for this function:

static void string_remark char *  errmsg_txt  )  [static]
 

Definition at line 897 of file scanner.c.

References lineno, skip_until(), skip_ws(), warn_unterm(), and WARNING.

Referenced by get_sequence(), and get_string().

Here is the call graph for this function:

static bool test_in_colon char *  wname,
bool  sb_in_colon,
int  severity,
char *  use_instead
[static]
 

Definition at line 2096 of file scanner.c.

References incolon, and tokenization_error().

Referenced by abort_quote(), create_word(), and handle_internal().

Here is the call graph for this function:

void tokenize void   ) 
 

Definition at line 5523 of file scanner.c.

References get_word(), and tokenize_one_word().

Referenced by main().

Here is the call graph for this function:

void tokenize_one_word signed long  wlen  ) 
 

Definition at line 5484 of file scanner.c.

References tic_hdr::funct, handle_number(), lookup_word(), tic_hdr::pfield, statbuf, tic_found, and tokenized_word_error().

Referenced by conditionally_tokenize(), finish_locals(), and tokenize().

Here is the call graph for this function:

static void tokenized_word_error char *  stat_name  )  [static]
 

Definition at line 2905 of file scanner.c.

References exists_in_ancestor(), in_tokz_esc, INFO, not_in_dict(), show_node_start(), TKERROR, tokenization_error(), and word_exists().

Referenced by create_alias(), and tokenize_one_word().

Here is the call graph for this function:

void trace_creation fwtoken  definer,
char *  nu_name
 

Definition at line 3107 of file scanner.c.

References as_a_what(), current_device_node, in_last_colon(), in_tkz_esc_mode, in_tokz_esc, in_what_node(), INFO, is_on_trace_list(), LOCAL_VAL, scope_is_global, show_node_start(), tokenization_error(), and verbose.

Referenced by add_local(), add_user_macro(), create_constant(), create_word(), and handle_internal().

Here is the call graph for this function:

static void unresolved_instance int  severity  )  [static]
 

Definition at line 2959 of file scanner.c.

References instance_filename, instance_lineno, just_where_started(), and tokenization_error().

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

Here is the call graph for this function:

void user_message tic_param_t  pfield  ) 
 

Definition at line 1627 of file scanner.c.

References tic_param::deflt_elem, and handle_user_message().

Here is the call graph for this function:

static void validate_instance fwtoken  definer  )  [static]
 

Definition at line 3039 of file scanner.c.

References BUFFER, DEFER, instance_definer_gap, is_instance, modified_by_instance(), VALUE, and VARIABLE.

Referenced by create_alias(), and create_word().

Here is the call graph for this function:

static bool validate_to_target void   )  [static]
 

Definition at line 3480 of file scanner.c.

References abs_token_no, cannot_apply(), CONST, DEFER, get_word(), lineno, lookup_with_definer(), pc, statbuf, TKERROR, tokenization_error(), UNSPECIFIED, VALUE, VARIABLE, warn_unterm(), and WARNING.

Referenced by handle_internal().

Here is the call graph for this function:

void warn_if_duplicate char *  stat_name  ) 
 

Definition at line 2800 of file scanner.c.

References do_not_overload, show_node_start(), tokenization_error(), verbose_dup_warning, WARNING, and word_exists().

Referenced by add_user_macro(), create_alias(), create_constant(), and create_word().

Here is the call graph for this function:

void warn_if_multiline char *  something,
unsigned int  start_lineno
 

Definition at line 862 of file scanner.c.

References iname, lineno, report_multiline, tokenization_error(), WARNING, and where_started().

Referenced by declare_locals(), get_string(), handle_user_message(), process_remark(), and string_err_check().

Here is the call graph for this function:

void warn_unterm int  severity,
char *  something,
unsigned int  saved_lineno
 

Definition at line 813 of file scanner.c.

References in_last_colon(), last_colon_defname, lineno, and tokenization_error().

Referenced by assign_local(), create_constant(), create_word(), declare_locals(), fcode_ender(), gather_locals(), get_string(), handle_user_message(), process_remark(), string_err_check(), string_remark(), and validate_to_target().

Here is the call graph for this function:

bool word_exists char *  stat_name,
char **  where_pt1,
char **  where_pt2
 

Definition at line 2742 of file scanner.c.

References lookup_word().

Referenced by gather_locals(), tokenized_word_error(), and warn_if_duplicate().

Here is the call graph for this function:

static void you_are_here void   )  [static]
 

Definition at line 3552 of file scanner.c.

References INFO, statbuf, and tokenization_error().

Referenced by fcode_starter(), and handle_internal().

Here is the call graph for this function:


Variable Documentation

u8 base = 0x0a
 

Definition at line 70 of file scanner.c.

Referenced by base_change(), base_val(), c_string_escape(), end_tokz_esc(), enter_tokz_esc(), get_number(), and init_scan_state().

bool dev_change_instance_warning = TRUE [static]
 

Definition at line 131 of file scanner.c.

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

int do_loop_depth = 0
 

Definition at line 83 of file scanner.c.

Referenced by clear_control_structs_to_limit(), handle_internal(), mark_do(), must_be_deep_in_do(), and resolve_loop().

bool do_not_overload = TRUE [static]
 

Definition at line 101 of file scanner.c.

Referenced by handle_internal(), and warn_if_duplicate().

bool fcode_started = FALSE [static]
 

Definition at line 118 of file scanner.c.

Referenced by fcode_ender(), and fcode_starter().

bool first_fc_starter = TRUE [static]
 

Definition at line 119 of file scanner.c.

Referenced by fcode_starter(), and init_scan_state().

bool got_until_eof = FALSE [static]
 

Definition at line 102 of file scanner.c.

Referenced by get_string(), get_until(), handle_user_message(), and string_err_check().

bool haveend = FALSE
 

Definition at line 82 of file scanner.c.

Referenced by fcode_ender(), finish_fcodehdr(), and init_emit().

headeredness hdr_flag = FLAG_HEADERLESS [static]
 

Definition at line 111 of file scanner.c.

Referenced by check_name_length(), create_word(), and set_hdr_flag().

char* in_tkz_esc_mode = "in Tokenizer-Escape mode.\n" [static]
 

Definition at line 137 of file scanner.c.

Referenced by lookup_word(), and trace_creation().

bool in_tokz_esc = FALSE
 

Definition at line 80 of file scanner.c.

Referenced by add_user_macro(), base_change(), check_name_length(), create_alias(), deliver_number(), end_tokz_esc(), enter_tokz_esc(), handle_internal(), lookup_word(), tokenized_word_error(), and trace_creation().

bool incolon = FALSE
 

Definition at line 81 of file scanner.c.

Referenced by base_change(), create_alias(), error_check_locals(), fcode_ender(), finish_or_new_device(), handle_internal(), in_last_colon(), init_scan_state(), must_be_deep_in_do(), and test_in_colon().

bool instance_definer_gap = FALSE [static]
 

Definition at line 134 of file scanner.c.

Referenced by finish_or_new_device(), init_scan_state(), and validate_instance().

char* instance_filename = NULL [static]
 

Definition at line 116 of file scanner.c.

Referenced by handle_internal(), init_scan_state(), modified_by_instance(), and unresolved_instance().

unsigned int instance_lineno [static]
 

Definition at line 117 of file scanner.c.

Referenced by handle_internal(), modified_by_instance(), and unresolved_instance().

bool is_instance = FALSE [static]
 

Definition at line 115 of file scanner.c.

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

unsigned int last_colon_abs_token_no
 

Definition at line 93 of file scanner.c.

Referenced by error_check_locals(), and handle_internal().

char* last_colon_defname = NULL
 

Definition at line 89 of file scanner.c.

Referenced by handle_internal(), in_last_colon(), and warn_unterm().

unsigned int last_colon_do_depth = 0 [static]
 

Definition at line 104 of file scanner.c.

Referenced by handle_internal(), and must_be_deep_in_do().

u16 last_colon_fcode [static]
 

Definition at line 98 of file scanner.c.

Referenced by handle_internal().

char* last_colon_filename = NULL
 

Definition at line 90 of file scanner.c.

Referenced by fcode_ender(), handle_internal(), in_last_colon(), and init_scan_state().

unsigned int last_colon_lineno
 

Definition at line 91 of file scanner.c.

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

int lastcolon
 

Definition at line 86 of file scanner.c.

Referenced by error_check_locals(), and handle_internal().

char lookup_where_pt1_buf[32] [static]
 

Definition at line 2642 of file scanner.c.

bool need_to_pop_source [static]
 

Definition at line 122 of file scanner.c.

Referenced by get_word(), init_scan_state(), and pop_source().

bool offs16 = TRUE
 

Definition at line 79 of file scanner.c.

Referenced by emit_fc_offset(), emit_offset(), fcode_starter(), handle_internal(), and offset_too_large().

u16 pci_image_rev = 0x0001
 

Definition at line 74 of file scanner.c.

Referenced by finish_pcihdr(), and handle_internal().

bool pci_is_last_image = TRUE
 

Definition at line 73 of file scanner.c.

Referenced by emit_pci_data_block(), finish_pcihdr(), handle_internal(), and init_scan_state().

u16 pci_vpd = 0x0000
 

Definition at line 75 of file scanner.c.

Referenced by finish_pcihdr().

bool report_multiline = TRUE
 

Definition at line 92 of file scanner.c.

Referenced by declare_locals(), eval_mac_string(), handle_internal(), pop_source(), push_source(), and warn_if_multiline().

int ret_stk_depth = 0 [static]
 

Definition at line 125 of file scanner.c.

Referenced by bump_ret_stk_depth(), init_scan_state(), ret_stk_access_rpt(), and ret_stk_balance_rpt().

source_state_t* saved_source = NULL [static]
 

Definition at line 353 of file scanner.c.

u8* statbuf = NULL
 

Definition at line 69 of file scanner.c.

Referenced by abort_quote(), add_byte_to_string(), add_user_macro(), assign_local(), base_val(), conditional_word_in_line(), conditionally_tokenize(), control_stack_size_test(), control_structure_mismatch(), create_alias(), create_constant(), create_word(), dev_vocab_control_struct_check(), encode_file(), enter_global_scope(), exit_scanner(), finish_device_vocab(), finish_pcihdr(), gather_locals(), get_fcode_from_stack(), get_number(), get_string(), get_token(), get_until(), get_word(), glob_not_allowed(), handle_internal(), handle_user_message(), init_scanner(), macro_recursion_error(), must_be_deep_in_do(), new_device_vocab(), obsolete_warning(), offset_too_large(), process_remark(), push_cstag(), resume_device_scope(), ret_stk_access_rpt(), ret_stk_balance_rpt(), skip_a_word_in_line(), skip_string(), skip_two_words_in_line(), skip_user_macro(), stackerror(), tokenize_one_word(), tokz_esc_emit_byte(), validate_to_target(), and you_are_here().

bool unterm_is_colon = FALSE [static]
 

Definition at line 812 of file scanner.c.


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