#include "sxversion.h"
#include "sxunix.h"
#include "SS.h"
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 char * | ttext (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 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.
static SXVOID ARC_deriv | ( | SXINT | n, | |
SXINT | t_state, | |||
SXINT | cur_mod | |||
) | [static] |
Definition at line 864 of file sxp_rcvr.c.
References ARC_is_a_right_ctxt(), get_tail(), is_valid(), match_a_tok(), search_a_rule(), set_first_trans(), set_next_trans(), and sxplocals.
Referenced by ARC_is_a_correction(), and new_ref().
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] |
Definition at line 603 of file sxp_rcvr.c.
References check(), is_a_right_ctxt(), lgt1, MAX_PATH_LGTH, oflow(), set_first_trans(), set_next_trans(), SXBOOLEAN, SXFALSE, sxP_access(), sxplocals, and SXTRUE.
Referenced by recovery().
static SXVOID deriv | ( | SXBOOLEAN | string_has_grown, | |
SXINT | n, | |||
SXINT | xstd, | |||
SXP_SHORT | t_state, | |||
SXINT | rule_no | |||
) | [static] |
Definition at line 1172 of file sxp_rcvr.c.
References get_tail(), is_a_right_ctxt(), is_valid(), match_a_tok(), new_ref(), search_a_rule(), set_first_trans(), set_next_trans(), SXBOOLEAN, SXFALSE, sxplocals, and SXTRUE.
Referenced by is_a_correction(), and new_ref().
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] |
Definition at line 537 of file sxp_rcvr.c.
References REF_is_a_right_ctxt(), sxba_scan_reset(), SXBOOLEAN, SXFALSE, sxP_access(), sxplocals, and SXTRUE.
Referenced by check_ctxt(), deriv(), is_a_correction(), and recovery().
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().
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] |
Definition at line 953 of file sxp_rcvr.c.
References ARC_deriv(), ARC_traversal(), deriv(), lgt1, match_a_tok(), oflow(), reduce_already_seen(), search_a_rule(), sxba_1_bit(), SXBOOLEAN, SXFALSE, sxP_access(), sxplocals, and SXTRUE.
Referenced by deriv().
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] |
Definition at line 1371 of file sxp_rcvr.c.
References check(), check_ctxt(), get_tail(), is_a_correction(), is_a_right_ctxt(), lgt1, oflow(), p, restaure_stack(), set_first_trans(), set_next_trans(), sx_alloc_and_copy(), sxba_cardinal(), sxba_copy(), sxba_scan(), SXBOOLEAN, sxerror(), SXFALSE, sxget_token(), sxgetbit(), sxP_access(), SXP_local_mess, sxplocals, sxsvar, sxtknmdf(), SXTRUE, and ttext().
Referenced by sxprecovery().
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] |
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 void undo | ( | void | ) | [static] |
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.