sxatc.c File Reference

#include "sxversion.h"
#include "sxunix.h"
#include "sxba.h"
#include <memory.h>
Include dependency graph for sxatc.c:

Go to the source code of this file.

Data Structures

struct  sxatc_area

Defines

#define SXATC_AREA   struct sxatc_area
#define ERROR_n   1
#define stns_incr   100
#define allocate_old_node()
#define allocate_node()   sxatcvar.atc_lv.early_visit_set == NULL ? allocate_old_node() : allocate_new_node()
#define free_node()   sxatcvar.atc_lv.early_visit_set == NULL ? freeareas() : free_tree()
#define NBNODES   64
#define NEW_AREA_SIZE   (sxatcvar.atc_lv.u.Old.area_size = NBNODES * sxatcvar.atc_lv.node_size)

Functions

SXNODE *** sxatc_stack (void)
static void sxatc_oflw (sxindex_header *index_hd, SXINT old_line_nb, SXINT old_size)
static SXNODE * allocate_area (void)
static void nodes_alloc (void)
static SXVOID freeareas (void)
static void free_tree (void)
static SXNODE * allocate_new_node (void)
void sub_tree_erase (SXNODE *node)
void sxatc_sub_tree_erase (struct sxnode_header_s *node)
static SXNODE * rightmost_son (SXNODE *node_ptr)
static SXVOID cons_comments (SXBOOLEAN is_right_cons, SXNODE *node_ptr, SXINT low, SXINT high)
static SXVOID initialize (void)
static SXVOID finalize (void)
static SXVOID test_and_create_son (SXINT x)
static SXVOID c_family (void)
static SXVOID add_right_list_node (void)
static SXVOID add_list_node (void)
static SXVOID create_error_family (void)
static SXVOID c_leaf (void)
static SXVOID atc_open (struct sxtables *tables)
static SXVOID action (SXINT act)
SXVOID sxatc (SXINT sxatc_what, struct sxtables *arg)

Variables

char WHAT_SXATC [] = "@(#)SYNTAX - $Id: sxatc.c 1676 2008-12-05 16:02:25Z syntax $" WHAT_DEBUG
static SXNODE ** stacktreenode
static SXINT stns
charp_char_tmp
static SXINT reccall = 0
static SXNODE * brother
static SXNODE * son
static SXINT top
static SXINT new_top

Define Documentation

 
#define allocate_node (  )     sxatcvar.atc_lv.early_visit_set == NULL ? allocate_old_node() : allocate_new_node()

Definition at line 64 of file sxatc.c.

Referenced by action(), c_family(), c_leaf(), create_error_family(), error(), sxatc(), and test_and_create_son().

 
#define allocate_old_node (  ) 
Value:
(sxatcvar.atc_lv.u.Old.current_node == sxatcvar.atc_lv.u.Old.area_end \
     ? allocate_area () \
     : ( p_char_tmp = sxatcvar.atc_lv.u.Old.current_node , \
         p_char_tmp += sxatcvar.atc_lv.node_size         , \
        sxatcvar.atc_lv.u.Old.current_node = p_char_tmp  ))

Definition at line 57 of file sxatc.c.

#define ERROR_n   1

Definition at line 44 of file sxatc.c.

 
#define free_node (  )     sxatcvar.atc_lv.early_visit_set == NULL ? freeareas() : free_tree()

Definition at line 67 of file sxatc.c.

Referenced by sxatc().

#define NBNODES   64

Definition at line 72 of file sxatc.c.

#define NEW_AREA_SIZE   (sxatcvar.atc_lv.u.Old.area_size = NBNODES * sxatcvar.atc_lv.node_size)

Definition at line 80 of file sxatc.c.

Referenced by allocate_area().

#define stns_incr   100

Definition at line 51 of file sxatc.c.

Referenced by action(), initialize(), and sxatc().

#define SXATC_AREA   struct sxatc_area

Definition at line 31 of file sxatc.c.


Function Documentation

static SXVOID action ( SXINT  act  )  [static]
static SXVOID add_list_node ( void   )  [static]

Definition at line 515 of file sxatc.c.

References brother, cons_comments(), rightmost_son(), son, stacktreenode, SXFALSE, SXTRUE, test_and_create_son(), and top.

Referenced by action().

static SXVOID add_right_list_node ( void   )  [static]

Definition at line 473 of file sxatc.c.

References brother, cons_comments(), new_top, rightmost_son(), son, stacktreenode, SXFALSE, SXNODE, SXTRUE, test_and_create_son(), and top.

Referenced by action().

static SXNODE* allocate_area ( void   )  [static]

Definition at line 113 of file sxatc.c.

References char, NEW_AREA_SIZE, sxatc_area::next, SXNODE, and sxatc_area::zone.

static SXNODE* allocate_new_node ( void   )  [static]

Definition at line 182 of file sxatc.c.

References p, sxindex_seek(), and SXNODE.

static SXVOID atc_open ( struct sxtables tables  )  [static]

Definition at line 646 of file sxatc.c.

References SXNODE.

Referenced by sxatc().

static SXVOID c_family ( void   )  [static]
static SXVOID c_leaf ( void   )  [static]

Definition at line 626 of file sxatc.c.

References allocate_node, cons_comments(), new_top, SXFALSE, SXTRUE, and top.

Referenced by action().

static SXVOID cons_comments ( SXBOOLEAN  is_right_cons,
SXNODE *  node_ptr,
SXINT  low,
SXINT  high 
) [static]

Definition at line 249 of file sxatc.c.

References sxcomment_book(), and sxplocals.

Referenced by action(), add_list_node(), add_right_list_node(), c_family(), c_leaf(), and create_error_family().

static SXVOID create_error_family ( void   )  [static]

Definition at line 555 of file sxatc.c.

References allocate_node, cons_comments(), ERROR_n, new_top, son, stacktreenode, SXFALSE, SXNODE, sxplocals, SXTRUE, and top.

Referenced by action().

static SXVOID finalize ( void   )  [static]

Definition at line 335 of file sxatc.c.

References p, reccall, rightmost_son(), stacktreenode, string_cat(), sxcomment_book(), SXNODE, sxplocals, and sxsvar.

Referenced by sxatc().

static void free_tree ( void   )  [static]

Definition at line 174 of file sxatc.c.

static SXVOID freeareas ( void   )  [static]

Definition at line 157 of file sxatc.c.

References sxatc_area::next, p, and q.

static SXVOID initialize ( void   )  [static]

Definition at line 315 of file sxatc.c.

References nodes_alloc(), reccall, stacktreenode, stns, stns_incr, SXFALSE, and SXNODE.

Referenced by sxatc().

static void nodes_alloc ( void   )  [static]

Definition at line 128 of file sxatc.c.

References sxatc_oflw(), SXBOOLEAN, SXFALSE, sxindex_alloc(), SXNODE, and SXTRUE.

Referenced by initialize().

static SXNODE* rightmost_son ( SXNODE *  node_ptr  )  [static]

Definition at line 234 of file sxatc.c.

References brother, sxatc_area::next, and SXNODE.

Referenced by action(), add_list_node(), add_right_list_node(), c_family(), and finalize().

void sub_tree_erase ( SXNODE *  node  ) 

Definition at line 195 of file sxatc.c.

References brother, son, and SXNODE.

Referenced by sxatc_sub_tree_erase().

SXVOID sxatc ( SXINT  sxatc_what,
struct sxtables arg 
)
static void sxatc_oflw ( sxindex_header *  index_hd,
SXINT  old_line_nb,
SXINT  old_size 
) [static]

Definition at line 96 of file sxatc.c.

References SXNODE.

Referenced by nodes_alloc().

SXNODE*** sxatc_stack ( void   ) 

Definition at line 83 of file sxatc.c.

References stacktreenode.

void sxatc_sub_tree_erase ( struct sxnode_header_s *  node  ) 

Definition at line 212 of file sxatc.c.

References sub_tree_erase().

static SXVOID test_and_create_son ( SXINT  x  )  [static]

Definition at line 386 of file sxatc.c.

References allocate_node, brother, and stacktreenode.

Referenced by add_list_node(), add_right_list_node(), and c_family().


Variable Documentation

SXNODE* brother [static]
SXINT new_top [static]

Definition at line 53 of file sxatc.c.

SXINT reccall = 0 [static]

Definition at line 225 of file sxatc.c.

Referenced by finalize(), and initialize().

SXNODE * son [static]
SXNODE** stacktreenode [static]
SXINT stns [static]

Definition at line 49 of file sxatc.c.

Referenced by action(), initialize(), and sxatc().

SXINT top [static]
char WHAT_SXATC[] = "@(#)SYNTAX - $Id: sxatc.c 1676 2008-12-05 16:02:25Z syntax $" WHAT_DEBUG

Definition at line 37 of file sxatc.c.


Generated on Wed Apr 21 16:39:36 2010 for syntax-6.0b7 by  doxygen 1.6.1