sxdynam_scanner.c File Reference

#include "sxversion.h"
#include "sxcommon.h"
#include "sxdynam_scanner.h"
Include dependency graph for sxdynam_scanner.c:

Go to the source code of this file.

Defines

#define SX_GLOBAL_VAR_SXDS
#define ts_put(i, c)
#define ts_null(i)   (SXDS->dslv [i].token_string [SXDS->dslv [i].ts_lgth] = SXNUL)
#define read_a_char()
#define GetPriorityKind(s)   SXDS->reg_exp_to_attr[SXDS->item_to_attr[s].reg_exp_no].priority_kind
#define GetActionId(s)
#define is_reduce_0_la(p)
#define HasAction(n)
#define GetConflictKind(c)   (c->top==0?0:c->conflict_kind)

Functions

static SXBOOLEAN process_predicate (SXINT lvno, SXINT state)
static void process_action (SXINT lvno, SXINT action, SXINT param)
static void sxds_lvcpy (SXINT j, SXINT i, SXBOOLEAN all)
static SXINT sxds_clone (SXINT old, SXINT current_state, SXBOOLEAN all)
static void fill_ctxt_set (SXINT re)
static SXBOOLEAN check_action_path (SXINT lvno1, SXINT lvno2)
static void Push (struct configs *pconfigs, SXINT init_state, SXINT init_lvno, SXINT prev_state, SXINT prev_lvno, SXINT current_state, SXINT current_lvno)
static void SetConflict (struct configs *pconfigs, SXBOOLEAN check_ambiguity)
static void test_0la (struct configs *pconfigs, SXINT current_state, SXINT current_lvno)
static void test_1la (struct configs *pconfigs, SXINT init_state, SXINT init_lvno, SXINT current_state, SXINT current_lvno)
static void test_unbounded (struct configs *pconfigs, SXINT init_state, SXINT init_lvno, SXINT current_state, SXINT current_lvno)
static void comments_put (char *str, SXINT lgth)
static void process_shift (struct configs *pconfigs)
static struct config_elem * sxds_read_a_tok (void)
void sxds_scanit (void)
void sxds_putit (void)
SXINT sxdynam_scanner (SXINT what_to_do)
struct configs * sxds_string_to_token (char *string, SXBOOLEAN is_set)

Variables

char WHAT_SXDYNAM_SCANNER [] = "@(#)SYNTAX - $Id: sxdynam_scanner.c 1416 2008-06-25 14:42:55Z rlacroix $" WHAT_DEBUG
static charerr_titles []

Define Documentation

#define GetActionId (  ) 
Value:
(SXDS->item_to_attr[s].kind!=KREDUCE)?0:    \
                                SXDS->reg_exp_to_attr[SXDS->item_to_attr[s].reg_exp_no].reduce_id

Definition at line 377 of file sxdynam_scanner.c.

Referenced by Push(), and SetConflict().

#define GetConflictKind (  )     (c->top==0?0:c->conflict_kind)

Definition at line 425 of file sxdynam_scanner.c.

Referenced by sxds_read_a_tok(), and sxds_string_to_token().

#define GetPriorityKind (  )     SXDS->reg_exp_to_attr[SXDS->item_to_attr[s].reg_exp_no].priority_kind

Definition at line 376 of file sxdynam_scanner.c.

Referenced by Push(), and SetConflict().

#define HasAction ( n   ) 
Value:
n > 0 &&                        \
                                SXDS->dslv [n].char_no == SXDS->current_char_no &&  \
                                SXDS->item_to_attr [SXDS->dslv [n].state].kind == KACTION

Definition at line 422 of file sxdynam_scanner.c.

Referenced by Push().

#define is_reduce_0_la ( p   ) 
Value:
(p->current.state == p->prev.state && \
                                 SXDS->item_to_attr[p->current.state].kind == KREDUCE)

Definition at line 420 of file sxdynam_scanner.c.

Referenced by Push().

 
#define read_a_char (  ) 
Value:
(SXDS->previous_char = SXDS->current_char,      \
             SXDS->current_char = sxnext_char ())

Definition at line 56 of file sxdynam_scanner.c.

Referenced by sxds_read_a_tok(), sxds_string_to_token(), and sxdynam_scanner().

#define SX_GLOBAL_VAR_SXDS

Definition at line 33 of file sxdynam_scanner.c.

#define ts_null (  )     (SXDS->dslv [i].token_string [SXDS->dslv [i].ts_lgth] = SXNUL)
#define ts_put ( i,
 ) 
Value:
(SXDS->dslv [i].token_string [SXDS->dslv [i].ts_lgth++] = (char)c,  \
 (SXDS->dslv [i].ts_lgth >= SXDS->dslv [i].ts_size)     \
    ? SXDS->dslv [i].token_string =             \
         (char *) sxrealloc (SXDS->dslv [i].token_string,   \
                 SXDS->dslv [i].ts_size *= 2,   \
                 sizeof (char))         \
    : NULL                          \
)

Definition at line 42 of file sxdynam_scanner.c.

Referenced by action_processing(), process_action(), process_shift(), sxndscan_it(), and sxscan_it().


Function Documentation

static SXBOOLEAN check_action_path ( SXINT  lvno1,
SXINT  lvno2 
) [static]

Definition at line 382 of file sxdynam_scanner.c.

References SXFALSE, and SXTRUE.

Referenced by Push().

static void comments_put ( char str,
SXINT  lgth 
) [static]

Definition at line 871 of file sxdynam_scanner.c.

Referenced by sxds_scanit().

static void fill_ctxt_set ( SXINT  re  )  [static]

Definition at line 356 of file sxdynam_scanner.c.

References sxba_copy(), sxba_fill(), and sxba_not().

Referenced by sxds_scanit(), test_1la(), and test_unbounded().

static void process_action ( SXINT  lvno,
SXINT  action,
SXINT  param 
) [static]

Definition at line 137 of file sxdynam_scanner.c.

References sxsrcpush(), sxsvar, sxtrap(), SXVOID, ts_null, and ts_put.

Referenced by test_0la(), test_1la(), and test_unbounded().

static SXBOOLEAN process_predicate ( SXINT  lvno,
SXINT  state 
) [static]
static void process_shift ( struct configs *  pconfigs  )  [static]

Definition at line 888 of file sxdynam_scanner.c.

References sxba_empty(), sxds_clone(), SXTRUE, and ts_put.

Referenced by sxds_read_a_tok(), and sxds_string_to_token().

static void Push ( struct configs *  pconfigs,
SXINT  init_state,
SXINT  init_lvno,
SXINT  prev_state,
SXINT  prev_lvno,
SXINT  current_state,
SXINT  current_lvno 
) [static]
static void SetConflict ( struct configs *  pconfigs,
SXBOOLEAN  check_ambiguity 
) [static]

Definition at line 607 of file sxdynam_scanner.c.

References GetActionId, and GetPriorityKind.

Referenced by sxds_read_a_tok().

static SXINT sxds_clone ( SXINT  old,
SXINT  current_state,
SXBOOLEAN  all 
) [static]

Definition at line 319 of file sxdynam_scanner.c.

References sxba_resize(), and sxds_lvcpy().

Referenced by process_shift(), sxds_read_a_tok(), test_0la(), test_1la(), and test_unbounded().

static void sxds_lvcpy ( SXINT  j,
SXINT  i,
SXBOOLEAN  all 
) [static]

Definition at line 273 of file sxdynam_scanner.c.

Referenced by sxds_clone(), and sxds_scanit().

void sxds_putit ( void   ) 

Definition at line 1384 of file sxdynam_scanner.c.

References sxds_scanit().

Referenced by sxdynam_scanner().

static struct config_elem* sxds_read_a_tok ( void   )  [static, read]
void sxds_scanit ( void   ) 
struct configs* sxds_string_to_token ( char string,
SXBOOLEAN  is_set 
) [read]
SXINT sxdynam_scanner ( SXINT  what_to_do  ) 
static void test_0la ( struct configs *  pconfigs,
SXINT  current_state,
SXINT  current_lvno 
) [static]
static void test_1la ( struct configs *  pconfigs,
SXINT  init_state,
SXINT  init_lvno,
SXINT  current_state,
SXINT  current_lvno 
) [static]
static void test_unbounded ( struct configs *  pconfigs,
SXINT  init_state,
SXINT  init_lvno,
SXINT  current_state,
SXINT  current_lvno 
) [static]

Variable Documentation

char* err_titles[] [static]
Initial value:
{
"\000",
"\001Warning:\t",
"\002Error:\t",
}

Definition at line 60 of file sxdynam_scanner.c.

Referenced by sxds_read_a_tok().

char WHAT_SXDYNAM_SCANNER[] = "@(#)SYNTAX - $Id: sxdynam_scanner.c 1416 2008-06-25 14:42:55Z rlacroix $" WHAT_DEBUG

Definition at line 39 of file sxdynam_scanner.c.


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