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

conditl.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "scanner.h"
#include "errhandler.h"
#include "ticvocab.h"
#include "conditl.h"
#include "stack.h"
#include "dictionary.h"
#include "vocabfuncts.h"
#include "usersymbols.h"
#include "stream.h"
#include "clflags.h"

Include dependency graph for conditl.c:

Go to the source code of this file.

Defines

#define ADD_CONDL(str, func)   BUILTIN_BOOL_TIC(str, func, already_ignoring )

Functions

static bool is_a_type (char *tname, fwtoken fw_type)
static bool is_a_then (char *a_word)
static bool is_an_else (char *a_word)
void skip_a_word (tic_bool_param_t pfield)
void skip_a_word_in_line (tic_bool_param_t pfield)
void skip_two_words_in_line (tic_bool_param_t pfield)
static void ignore_one_word (char *tname)
static void conditionally_tokenize (bool cond, bool alr_ign)
static void conditional_word_in_line (bool alr_ign, bool exist_test, bool(*exist_funct)())
static void if_exists (tic_param_t pfield)
static void if_not_exist (tic_bool_param_t pfield)
static void if_defined (tic_bool_param_t pfield)
static void if_not_defined (tic_bool_param_t pfield)
static void if_from_stack (tic_bool_param_t pfield)
void init_conditionals_vocab (tic_hdr_t **tic_vocab_ptr)

Variables

static bool already_ignoring = FALSE
static tic_bool_hdr_t conditionals_vocab_tbl []


Define Documentation

#define ADD_CONDL str,
func   )     BUILTIN_BOOL_TIC(str, func, already_ignoring )
 

Definition at line 732 of file conditl.c.


Function Documentation

static void conditional_word_in_line bool  alr_ign,
bool  exist_test,
bool(*)()  exist_funct
[static]
 

Definition at line 595 of file conditl.c.

References conditionally_tokenize(), get_word_in_line(), and statbuf.

Referenced by if_defined(), if_exists(), if_not_defined(), and if_not_exist().

Here is the call graph for this function:

static void conditionally_tokenize bool  cond,
bool  alr_ign
[static]
 

Definition at line 425 of file conditl.c.

References get_word(), ignore_one_word(), iname, INFO, is_a_then(), is_an_else(), just_started_at(), just_where_started(), lineno, statbuf, TKERROR, tokenization_error(), tokenize_one_word(), trace_conditionals, and WARNING.

Referenced by conditional_word_in_line(), and if_from_stack().

Here is the call graph for this function:

static void if_defined tic_bool_param_t  pfield  )  [static]
 

Definition at line 666 of file conditl.c.

References tic_bool_param::bool_ptr, conditional_word_in_line(), and exists_as_user_symbol().

Here is the call graph for this function:

static void if_exists tic_param_t  pfield  )  [static]
 

Definition at line 627 of file conditl.c.

References tic_param::bool_ptr, conditional_word_in_line(), and exists_in_current().

Here is the call graph for this function:

static void if_from_stack tic_bool_param_t  pfield  )  [static]
 

Definition at line 707 of file conditl.c.

References tic_bool_param::bool_ptr, conditionally_tokenize(), and dpop().

Here is the call graph for this function:

static void if_not_defined tic_bool_param_t  pfield  )  [static]
 

Definition at line 683 of file conditl.c.

References tic_bool_param::bool_ptr, conditional_word_in_line(), and exists_as_user_symbol().

Here is the call graph for this function:

static void if_not_exist tic_bool_param_t  pfield  )  [static]
 

Definition at line 649 of file conditl.c.

References tic_bool_param::bool_ptr, conditional_word_in_line(), and exists_in_current().

Here is the call graph for this function:

static void ignore_one_word char *  tname  )  [static]
 

Definition at line 322 of file conditl.c.

References already_ignoring, tic_bool_hdr::ign_func, lookup_word(), tic_bool_hdr::pfield, and tic_found.

Referenced by conditionally_tokenize().

Here is the call graph for this function:

void init_conditionals_vocab tic_hdr_t **  tic_vocab_ptr  ) 
 

Definition at line 763 of file conditl.c.

References init_tic_vocab().

Referenced by init_dictionary().

Here is the call graph for this function:

static bool is_a_then char *  a_word  )  [static]
 

Definition at line 143 of file conditl.c.

References CONDL_ENDER, and is_a_type().

Referenced by conditionally_tokenize().

Here is the call graph for this function:

static bool is_a_type char *  tname,
fwtoken  fw_type
[static]
 

Definition at line 132 of file conditl.c.

References tic_fwt_param::fw_token, lookup_shared_f_exec_word(), and tic_fwt_hdr::pfield.

Referenced by is_a_then(), and is_an_else().

Here is the call graph for this function:

static bool is_an_else char *  a_word  )  [static]
 

Definition at line 149 of file conditl.c.

References CONDL_ELSE, and is_a_type().

Referenced by conditionally_tokenize().

Here is the call graph for this function:

void skip_a_word tic_bool_param_t  pfield  ) 
 

Definition at line 213 of file conditl.c.

References get_word().

Here is the call graph for this function:

void skip_a_word_in_line tic_bool_param_t  pfield  ) 
 

Definition at line 241 of file conditl.c.

References get_word_in_line(), and statbuf.

Here is the call graph for this function:

void skip_two_words_in_line tic_bool_param_t  pfield  ) 
 

Definition at line 274 of file conditl.c.

References get_word_in_line(), and statbuf.

Here is the call graph for this function:


Variable Documentation

bool already_ignoring = FALSE [static]
 

Definition at line 165 of file conditl.c.

Referenced by ignore_one_word().

tic_bool_hdr_t conditionals_vocab_tbl[] [static]
 

Initial value:

 {
    ADD_CONDL ("[ifexist]"   , if_exists      ) ,
    ADD_CONDL ("[ifexists]"  , if_exists      ) ,
    ADD_CONDL ("#ifexist"    , if_exists      ) ,
    ADD_CONDL ("#ifexists"   , if_exists      ) ,
    ADD_CONDL ("[#ifexist]"  , if_exists      ) ,
    ADD_CONDL ("[#ifexists]" , if_exists      ) ,
    ADD_CONDL ("[ifnexist]"  , if_not_exist   ) ,
    ADD_CONDL ("#ifnexist"   , if_not_exist   ) ,
    ADD_CONDL ("[#ifnexist]" , if_not_exist   ) ,
    ADD_CONDL ("[ifdef]"     , if_defined     ) ,
    ADD_CONDL ("#ifdef"      , if_defined     ) ,
    ADD_CONDL ("[#ifdef]"    , if_defined     ) ,
    ADD_CONDL ("[ifndef]"    , if_not_defined ) ,
    ADD_CONDL ("#ifndef"     , if_not_defined ) ,
    ADD_CONDL ("[#ifndef]"   , if_not_defined ) ,

}

Definition at line 734 of file conditl.c.


Generated on Fri Aug 18 14:03:51 2006 for Toke1.0 by  doxygen 1.4.4