sxp_rcvr.c File Reference

#include "sxversion.h"
#include "sxunix.h"
#include "SS.h"
Include dependency graph for sxp_rcvr.c:

Go to the source code of this file.

Defines

#define Commun   1
#define Propre   2
#define Defaut   3
#define Done   4
#define MAX_PATH_LGTH   0

Functions

SXP_SHORT sxP_access (struct SXP_bases *abase, SXINT j)
SXP_SHORT ARC_traversal (SXP_SHORT ref, SXINT latok_no)
static charttext (struct sxtables *tables, SXINT tcode)
static SXVOID oflow (void)
static SXBOOLEAN set_next_item (struct SXP_item *vector, SXP_SHORT *check, SXP_SHORT *action, SXINT Max)
static SXVOID set_first_trans (struct SXP_bases *abase, SXP_SHORT *check, SXP_SHORT *action, SXINT Max, SXINT *next_action_kind)
static SXBOOLEAN set_next_trans (struct SXP_bases *abase, SXP_SHORT *check, SXP_SHORT *action, SXINT Max, SXINT *next_action_kind)
static SXBOOLEAN reduce_already_seen (struct SXP_bases *abase, SXP_SHORT check, SXP_SHORT action)
static SXINT get_tail (SXINT binf, SXINT bsup)
static SXVOID restaure_stack (SXINT m, SXINT M)
static SXBOOLEAN ARC_is_a_right_ctxt (SXINT *head, SXINT tail, SXP_SHORT *ref)
static void undo (void)
static SXBOOLEAN REF_is_a_right_ctxt (SXBOOLEAN bscan, SXBOOLEAN bshift, SXINT head, SXINT tail, SXINT *pxs, SXP_SHORT *pstate, SXP_SHORT ref, SXP_SHORT look_ahead, SXBOOLEAN keep_stack)
static SXBOOLEAN is_a_right_ctxt (SXINT head, SXINT tail, SXINT *pxs, SXP_SHORT *pstate, SXBOOLEAN keep_stack)
static SXBOOLEAN check_ctxt (SXINT head, SXINT tail, SXINT *x, SXP_SHORT ref, SXBA trans_set, SXINT n)
static SXBOOLEAN morgan (char *c1, char *c2)
static SXBOOLEAN match_a_tok (SXINT cur_mod, SXINT n, SXINT tok)
static SXBOOLEAN search_a_rule (SXINT *cur_mod, SXINT n, SXINT best_mod, SXINT *ster)
static SXBOOLEAN is_valid (SXINT cur_mod, SXINT n, SXINT *ster)
static SXVOID ARC_deriv (SXINT n, SXINT t_state, SXINT cur_mod)
static SXVOID deriv (SXBOOLEAN string_has_grown, SXINT n, SXINT xstd, SXP_SHORT t_state, SXINT rule_no)
static SXVOID new_ref (SXINT k, SXINT n, SXINT xstd, SXP_SHORT ref, SXP_SHORT test, SXP_SHORT t_state, SXINT rule_no)
static SXBOOLEAN ARC_is_a_correction (SXINT t_state)
static SXBOOLEAN is_a_correction (SXBOOLEAN force_correction_on_error_token, SXINT xs, SXP_SHORT state)
static SXBOOLEAN ARC_recovery (SXINT *at_state, SXINT latok_no)
static SXBOOLEAN recovery (void)
SXBOOLEAN sxprecovery (SXINT what_to_do, SXINT *at_state, SXINT latok_no)

Variables

char WHAT_SXP_RECOVERY32 [] = "@(#)SYNTAX - $Id: sxp_rcvr.c 1711 2009-03-11 14:56:21Z sagot $ SXP_RCVR_32" WHAT_DEBUG
static SXINT lgt1

Define Documentation

#define Commun   1

Definition at line 31 of file sxp_rcvr.c.

#define Defaut   3

Definition at line 33 of file sxp_rcvr.c.

#define Done   4

Definition at line 34 of file sxp_rcvr.c.

#define MAX_PATH_LGTH   0

Referenced by check_ctxt().

#define Propre   2

Definition at line 32 of file sxp_rcvr.c.


Function Documentation

static SXVOID ARC_deriv ( SXINT  n,
SXINT  t_state,
SXINT  cur_mod 
) [static]
static SXBOOLEAN ARC_is_a_correction ( SXINT  t_state  )  [static]

Definition at line 1246 of file sxp_rcvr.c.

References ARC_deriv(), SXFALSE, sxplocals, and SXTRUE.

Referenced by ARC_recovery().

static SXBOOLEAN ARC_is_a_right_ctxt ( SXINT *  head,
SXINT  tail,
SXP_SHORT *  ref 
) [static]

Definition at line 253 of file sxp_rcvr.c.

References SXFALSE, sxP_access(), sxplocals, and SXTRUE.

Referenced by ARC_deriv(), and REF_is_a_right_ctxt().

static SXBOOLEAN ARC_recovery ( SXINT *  at_state,
SXINT  latok_no 
) [static]

Definition at line 1335 of file sxp_rcvr.c.

References ARC_is_a_correction(), ARC_traversal(), SXFALSE, sxget_token(), sxplocals, and SXTRUE.

Referenced by sxprecovery().

SXP_SHORT ARC_traversal ( SXP_SHORT  ref,
SXINT  latok_no 
)

Definition at line 228 of file sxparser.c.

static SXBOOLEAN check_ctxt ( SXINT  head,
SXINT  tail,
SXINT *  x,
SXP_SHORT  ref,
SXBA  trans_set,
SXINT  n 
) [static]
static SXVOID deriv ( SXBOOLEAN  string_has_grown,
SXINT  n,
SXINT  xstd,
SXP_SHORT  t_state,
SXINT  rule_no 
) [static]
static SXINT get_tail ( SXINT  binf,
SXINT  bsup 
) [static]

Definition at line 220 of file sxp_rcvr.c.

References sxgetbit(), and sxplocals.

Referenced by ARC_deriv(), deriv(), and recovery().

static SXBOOLEAN is_a_correction ( SXBOOLEAN  force_correction_on_error_token,
SXINT  xs,
SXP_SHORT  state 
) [static]

Definition at line 1271 of file sxp_rcvr.c.

References deriv(), is_a_right_ctxt(), restaure_stack(), sxba_empty(), SXFALSE, sxplocals, SXTRUE, and undo().

Referenced by recovery().

static SXBOOLEAN is_a_right_ctxt ( SXINT  head,
SXINT  tail,
SXINT *  pxs,
SXP_SHORT *  pstate,
SXBOOLEAN  keep_stack 
) [static]
static SXBOOLEAN is_valid ( SXINT  cur_mod,
SXINT  n,
SXINT *  ster 
) [static]

Definition at line 825 of file sxp_rcvr.c.

References sxba_0_bit(), sxba_fill(), sxba_scan(), SXFALSE, sxgetbit(), sxplocals, and SXTRUE.

Referenced by ARC_deriv(), and deriv().

static SXBOOLEAN match_a_tok ( SXINT  cur_mod,
SXINT  n,
SXINT  tok 
) [static]

Definition at line 765 of file sxp_rcvr.c.

References morgan(), SXFALSE, sxplocals, and SXTRUE.

Referenced by ARC_deriv(), deriv(), new_ref(), and search_a_rule().

static SXBOOLEAN morgan ( char c1,
char c2 
) [static]

Definition at line 688 of file sxp_rcvr.c.

References SXFALSE, and SXTRUE.

Referenced by match_a_tok().

static SXVOID new_ref ( SXINT  k,
SXINT  n,
SXINT  xstd,
SXP_SHORT  ref,
SXP_SHORT  test,
SXP_SHORT  t_state,
SXINT  rule_no 
) [static]
static SXVOID oflow ( void   )  [static]

Definition at line 89 of file sxp_rcvr.c.

References lgt1, sxba_resize(), and sxplocals.

Referenced by check_ctxt(), new_ref(), recovery(), and REF_is_a_right_ctxt().

static SXBOOLEAN recovery ( void   )  [static]
static SXBOOLEAN reduce_already_seen ( struct SXP_bases *  abase,
SXP_SHORT  check,
SXP_SHORT  action 
) [static]

Definition at line 199 of file sxp_rcvr.c.

References set_first_trans(), set_next_trans(), SXFALSE, sxplocals, and SXTRUE.

Referenced by new_ref().

static SXBOOLEAN REF_is_a_right_ctxt ( SXBOOLEAN  bscan,
SXBOOLEAN  bshift,
SXINT  head,
SXINT  tail,
SXINT *  pxs,
SXP_SHORT *  pstate,
SXP_SHORT  ref,
SXP_SHORT  look_ahead,
SXBOOLEAN  keep_stack 
) [static]

Definition at line 319 of file sxp_rcvr.c.

References ARC_is_a_right_ctxt(), ARC_traversal(), lgt1, oflow(), SXBOOLEAN, SXFALSE, sxP_access(), sxplocals, and SXTRUE.

Referenced by is_a_right_ctxt().

static SXVOID restaure_stack ( SXINT  m,
SXINT  M 
) [static]

Definition at line 241 of file sxp_rcvr.c.

References sxplocals.

Referenced by is_a_correction(), and recovery().

static SXBOOLEAN search_a_rule ( SXINT *  cur_mod,
SXINT  n,
SXINT  best_mod,
SXINT *  ster 
) [static]

Definition at line 794 of file sxp_rcvr.c.

References match_a_tok(), and sxplocals.

Referenced by ARC_deriv(), deriv(), and new_ref().

static SXVOID set_first_trans ( struct SXP_bases *  abase,
SXP_SHORT *  check,
SXP_SHORT *  action,
SXINT  Max,
SXINT *  next_action_kind 
) [static]

Definition at line 129 of file sxp_rcvr.c.

References Commun, Defaut, Done, set_next_item(), and sxplocals.

static SXBOOLEAN set_next_item ( struct SXP_item *  vector,
SXP_SHORT *  check,
SXP_SHORT *  action,
SXINT  Max 
) [static]

Definition at line 103 of file sxp_rcvr.c.

References SXFALSE, sxplocals, SXTRUE, and val.

Referenced by set_first_trans(), and set_next_trans().

static SXBOOLEAN set_next_trans ( struct SXP_bases *  abase,
SXP_SHORT *  check,
SXP_SHORT *  action,
SXINT  Max,
SXINT *  next_action_kind 
) [static]

Definition at line 157 of file sxp_rcvr.c.

References Commun, Defaut, Done, Propre, set_next_item(), SXFALSE, sxplocals, sxtrap(), and SXTRUE.

SXP_SHORT sxP_access ( struct SXP_bases *  abase,
SXINT  j 
)
SXBOOLEAN sxprecovery ( SXINT  what_to_do,
SXINT *  at_state,
SXINT  latok_no 
)

Definition at line 1804 of file sxp_rcvr.c.

References ARC_recovery(), lgt1, recovery(), SS_alloc(), sxba_calloc(), sxexit(), sxplocals, sxstderr, and SXTRUE.

static char* ttext ( struct sxtables tables,
SXINT  tcode 
) [static]

Definition at line 81 of file sxp_rcvr.c.

References sxplocals.

Referenced by recovery().

static void undo ( void   )  [static]

Definition at line 280 of file sxp_rcvr.c.

References sxplocals.

Referenced by is_a_correction().


Variable Documentation

SXINT lgt1 [static]

Definition at line 40 of file sxp_rcvr.c.

Referenced by check_ctxt(), new_ref(), oflow(), recovery(), REF_is_a_right_ctxt(), and sxprecovery().

char WHAT_SXP_RECOVERY32[] = "@(#)SYNTAX - $Id: sxp_rcvr.c 1711 2009-03-11 14:56:21Z sagot $ SXP_RCVR_32" WHAT_DEBUG

Definition at line 29 of file sxp_rcvr.c.


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