udag_scanner.c File Reference

#include "sxversion.h"
#include "sxunix.h"
#include "XxYxZ.h"
#include "udag_scanner.h"
#include "varstr.h"
#include <math.h>
#include "fsa.h"
Include dependency graph for udag_scanner.c:

Go to the source code of this file.

Data Structures

struct  fa

Defines

#define TOK_NB   ((sizeof (tok_str)/sizeof (tok_str [0])))
#define no_dico_lecl
#define EOF_CODE   sxeof_code (tables)
#define dico_contains_terminals   0
#define MAX_DICO_NB   0
#define SXGET_SAVED_TOKEN(n)   (save_sxplocals.toks_buf [SXTOKEN_PAGE(n)][SXTOKEN_INDX(n)])
#define fudge_factor   0.01

Functions

SXINT read_a_udag (void(*store)(), void(*pre_fill)(), void(*fill)(), SXINT(*check)(), void(*raz)(), SXINT(*parser)())
SXINT read_a_sdag (void(*store)(SXINT, SXINT, SXINT), void(*pre_fill)(void), void(*fill)(void), SXINT(*check)(void), void(*raz)(void), SXINT(*parser)(SXINT what_to_do, struct sxtables *arg))
SXINT * sdag_get_t_tok_no_stack (SXINT id)
SXINT get_SEMLEX_lahead ()
struct sxtoken * tok_no2tok (SXINT tok_no)
SXINT put_repair_tok (SXINT t, char *t_str, char *comment_str, struct sxsource_coord *psource_index)
static void print_idag_trans (SXINT from_state, char *comment, char *ff, char *semlex, SXINT t, SXINT to_state)
void idag_source_processing (SXINT SXEOF, SXBA *t2suffix_t_set, SXBA *mlstn2suffix_source_set, SXBA *mlstn2la_tset, SXBA *t2la_t_set)
void fill_idag_q2pq_stack (void)
void ranges_oflw (SXINT old_size, SXINT new_size)
void fill_inside_t_set (SXINT p, SXINT q, SXBA inside_t_set)
void fill_more_idag_infos (SXBOOLEAN is_qstack_needed, SXBOOLEAN is_pstack_needed, SXBOOLEAN is_inside_t_needed)
static SXINT dummy_check_keyword (char *s, SXINT i)
static void fill_idag_infos (void)
static void store_idag (SXINT from_state, SXINT tok_no, SXINT to_state)
static void idag_alloc (SXINT size)
static void idag_free (struct idag *idag_ptr)
static void after_last_idag_trans ()
SXINT sxparser ()
static SXINT string_parser (SXINT what, struct sxtables *arg)
static SXINT check_udag ()
static void raz_idag ()
static void store_sdag_trans (SXINT p, SXINT id, SXINT q)
static void prelude_re (SXBOOLEAN is_OK, SXINT eof_ste, SXINT node_nb, SXINT operand_nb, SXINT fsa_kind)
static void store_re (SXINT state, struct sxtoken **ptok_ptr, struct sxtoken **semlex_ptok_ptr, SXINT ste, SXINT next_state)
static void DFA_extract_trans (SXINT dfa_state, void(*output_trans)())
static void raz_re ()
static SXINT postlude_re (SXINT fsa_kind)
SXINT dag_scanner (SXINT what, struct sxtables *arg)
void fill_idag_pqt2pq (void)
void fill_idag_pqt2proba (void)
SXINT idag_pq_t2pqt (SXINT pq, SXINT t)
void idag_p_t_q2tok_no_stack (SXINT **tok_no_stack_ptr, SXINT p, SXINT t, SXINT q)
void fill_idag_path (void)
VARSTR sub_dag_to_comment (VARSTR vstr, SXINT p, SXINT q)
static charsub_dag_edges (SXINT tok_no)
void dag_extract_trans (SXINT p, void(*f)(SXINT p, SXINT t, SXINT q))
VARSTR sub_dag_to_re (VARSTR vstr, SXINT p, SXINT q)
char ** idag_get_t2string (void)

Variables

static char ME [] = "udag_scanner.c"
VARSTR cur_input_vstr
char WHAT_UDAG_SCANNER [] = "@(#)SYNTAX - $Id: udag_scanner.c 1808 2010-02-02 16:26:11Z sagot $" WHAT_DEBUG
static struct sxtablestables
SXUINT maximum_input_size
SXINT n
SXBOOLEAN is_print_time
static struct sxdfa_comb * dico_des_terminaux = NULL
static SXINT End_Of_Sentence_ste
static charwstr
static SXINT wstr_lgth
static SXBOOLEAN input_is_a_dag
static VARSTR vstr
SXINT SEMLEX_lahead = -1
static struct fa dfa
static struct facur_fsa
static SXBA pseudofinal_trans_to_state_set
static SXINT eof_tok_no
static chardag_kind_strings [] = {"??", "Dag", "Udag","??", "Sdag","??","??","??", "String"}

Define Documentation

#define dico_contains_terminals   0

Definition at line 182 of file udag_scanner.c.

#define EOF_CODE   sxeof_code (tables)

Definition at line 181 of file udag_scanner.c.

Referenced by after_last_idag_trans(), dag_scanner(), and fill_idag_infos().

#define fudge_factor   0.01
#define MAX_DICO_NB   0

Definition at line 212 of file udag_scanner.c.

#define no_dico_lecl

Definition at line 180 of file udag_scanner.c.

#define SXGET_SAVED_TOKEN ( n   )     (save_sxplocals.toks_buf [SXTOKEN_PAGE(n)][SXTOKEN_INDX(n)])

Definition at line 978 of file udag_scanner.c.

Referenced by fill_idag_infos().

#define TOK_NB   ((sizeof (tok_str)/sizeof (tok_str [0])))

Definition at line 97 of file udag_scanner.c.


Function Documentation

static void after_last_idag_trans (  )  [static]

Definition at line 1781 of file udag_scanner.c.

References EOF_CODE, idag_alloc(), idag_free(), ME, offset, PUSH, q, store_idag(), sxplocals, sxtrap(), top, and TOP.

Referenced by dag_scanner(), and postlude_re().

static SXINT check_udag (  )  [static]

Definition at line 1921 of file udag_scanner.c.

References SXBOOLEAN, and sxtime().

Referenced by dag_scanner(), and postlude_re().

void dag_extract_trans ( SXINT  p,
void(*)(SXINT p, SXINT t, SXINT q f 
)

Definition at line 2712 of file udag_scanner.c.

Referenced by sub_dag_to_re().

SXINT dag_scanner ( SXINT  what,
struct sxtables arg 
)
static void DFA_extract_trans ( SXINT  dfa_state,
void(*)()  output_trans 
) [static]

Definition at line 2122 of file udag_scanner.c.

Referenced by postlude_re().

static SXINT dummy_check_keyword ( char s,
SXINT  i 
) [static]

Definition at line 971 of file udag_scanner.c.

Referenced by fill_idag_infos().

static void fill_idag_infos ( void   )  [static]
void fill_idag_path ( void   ) 
void fill_idag_pqt2pq ( void   ) 

Definition at line 2388 of file udag_scanner.c.

References TOP, and top.

Referenced by call_rcg_parse_it(), and fill_idag_pqt2proba().

void fill_idag_pqt2proba ( void   ) 

Definition at line 2422 of file udag_scanner.c.

References fill_idag_pqt2pq(), fudge_factor, and get_SEMLEX_lahead().

Referenced by nbest_sem_pass().

void fill_idag_q2pq_stack ( void   ) 

Definition at line 667 of file udag_scanner.c.

References PUSH, q, and top.

Referenced by fill_more_idag_infos(), and spf_yield2dfa().

void fill_inside_t_set ( SXINT  p,
SXINT  q,
SXBA  inside_t_set 
)

Definition at line 737 of file udag_scanner.c.

References r, sxba_or(), top, and X_set().

Referenced by fill_more_idag_infos().

void fill_more_idag_infos ( SXBOOLEAN  is_qstack_needed,
SXBOOLEAN  is_pstack_needed,
SXBOOLEAN  is_inside_t_needed 
)
SXINT get_SEMLEX_lahead ( void   ) 

Definition at line 226 of file udag_scanner.c.

static void idag_alloc ( SXINT  size  )  [static]

Definition at line 1675 of file udag_scanner.c.

References RAZ.

Referenced by after_last_idag_trans(), postlude_re(), and raz_idag().

static void idag_free ( struct idag *  idag_ptr  )  [static]

Definition at line 1693 of file udag_scanner.c.

References sxbm_free(), and X_free().

Referenced by after_last_idag_trans(), dag_scanner(), postlude_re(), and raz_idag().

char** idag_get_t2string ( void   ) 

Definition at line 2763 of file udag_scanner.c.

Referenced by call_rcg_parse_it().

void idag_p_t_q2tok_no_stack ( SXINT **  tok_no_stack_ptr,
SXINT  p,
SXINT  t,
SXINT  q 
)

Definition at line 2563 of file udag_scanner.c.

SXINT idag_pq_t2pqt ( SXINT  pq,
SXINT  t 
)

Definition at line 2482 of file udag_scanner.c.

References top.

void idag_source_processing ( SXINT  SXEOF,
SXBA *  t2suffix_t_set,
SXBA *  mlstn2suffix_source_set,
SXBA *  mlstn2la_tset,
SXBA *  t2la_t_set 
)

Definition at line 556 of file udag_scanner.c.

References ME, sxba_or(), and sxtrap().

static SXINT postlude_re ( SXINT  fsa_kind  )  [static]
static void prelude_re ( SXBOOLEAN  is_OK,
SXINT  eof_ste,
SXINT  node_nb,
SXINT  operand_nb,
SXINT  fsa_kind 
) [static]

Definition at line 1995 of file udag_scanner.c.

References dfa, fa::fsa_kind, name, sxtime(), sxtkn_mngr(), and XxYxZ_alloc().

Referenced by dag_scanner().

static void print_idag_trans ( SXINT  from_state,
char comment,
char ff,
char semlex,
SXINT  t,
SXINT  to_state 
) [static]

Definition at line 463 of file udag_scanner.c.

Referenced by fill_idag_infos().

SXINT put_repair_tok ( SXINT  t,
char t_str,
char comment_str,
struct sxsource_coord *  psource_index 
)

Definition at line 430 of file udag_scanner.c.

References sxplocals, and sxstr2save().

void ranges_oflw ( SXINT  old_size,
SXINT  new_size 
)

Definition at line 724 of file udag_scanner.c.

References ME, and sxtrap().

Referenced by fill_more_idag_infos().

static void raz_idag (  )  [static]

Definition at line 1948 of file udag_scanner.c.

References idag_alloc(), idag_free(), and sxplocals.

Referenced by dag_scanner().

static void raz_re (  )  [static]

Definition at line 2132 of file udag_scanner.c.

References XxYxZ_free().

Referenced by postlude_re().

SXINT read_a_sdag ( void(*)(SXINT, SXINT, SXINT)  store,
void(*)(void)  pre_fill,
void(*)(void)  fill,
SXINT(*)(void)  check,
void(*)(void)  raz,
SXINT(*)(SXINT what_to_do, struct sxtables *arg)  parser 
)
SXINT read_a_udag ( void(*)()  store,
void(*)()  pre_fill,
void(*)()  fill,
SXINT(*)()  check,
void(*)()  raz,
SXINT(*)()  parser 
)
SXINT* sdag_get_t_tok_no_stack ( SXINT  id  ) 

Definition at line 252 of file read_a_sdag.c.

References t_tok_no_stack.

Referenced by fill_idag_infos().

static void store_idag ( SXINT  from_state,
SXINT  tok_no,
SXINT  to_state 
) [static]

Definition at line 1567 of file udag_scanner.c.

References ME, PUSH, q, sxba_calloc(), sxtrap(), SXTRUE, and TOP.

Referenced by after_last_idag_trans(), dag_scanner(), postlude_re(), and string_parser().

static void store_re ( SXINT  state,
struct sxtoken **  ptok_ptr,
struct sxtoken **  semlex_ptok_ptr,
SXINT  ste,
SXINT  next_state 
) [static]

Definition at line 2041 of file udag_scanner.c.

References ME, sxplocals, sxstr2save(), sxtrap(), SXTRUE, varstr_raz(), and XxYxZ_set().

static void store_sdag_trans ( SXINT  p,
SXINT  id,
SXINT  q 
) [static]

Definition at line 1960 of file udag_scanner.c.

References PUSH, and TOP.

Referenced by dag_scanner().

static SXINT string_parser ( SXINT  what,
struct sxtables arg 
) [static]

Definition at line 1902 of file udag_scanner.c.

References store_idag(), sxparser, and sxplocals.

Referenced by dag_scanner().

static char* sub_dag_edges ( SXINT  tok_no  )  [static]

Definition at line 2705 of file udag_scanner.c.

Referenced by sub_dag_to_re().

VARSTR sub_dag_to_comment ( VARSTR  vstr,
SXINT  p,
SXINT  q 
)
VARSTR sub_dag_to_re ( VARSTR  vstr,
SXINT  p,
SXINT  q 
)

Definition at line 2746 of file udag_scanner.c.

References dag2re(), dag_extract_trans(), fill_idag_path(), and sub_dag_edges().

SXINT sxparser (  ) 
struct sxtoken* tok_no2tok ( SXINT  tok_no  )  [read]

Definition at line 413 of file udag_scanner.c.


Variable Documentation

struct fa * cur_fsa [static]

Definition at line 73 of file udag_scanner.c.

Referenced by sxparser_re_tcut().

char* dag_kind_strings[] = {"??", "Dag", "Udag","??", "Sdag","??","??","??", "String"} [static]

Definition at line 1917 of file udag_scanner.c.

struct fa dfa [static]

Referenced by prelude_re().

struct sxdfa_comb* dico_des_terminaux = NULL [static]

Definition at line 183 of file udag_scanner.c.

SXINT End_Of_Sentence_ste [static]

Definition at line 216 of file udag_scanner.c.

SXINT eof_tok_no [static]

Definition at line 1562 of file udag_scanner.c.

SXBOOLEAN input_is_a_dag [static]

Definition at line 219 of file udag_scanner.c.

Referenced by call_rcg_parse_it(), and rcgparse_it().

SXBOOLEAN is_print_time

Definition at line 118 of file earley_parser.c.

Referenced by main(), and sxearley_main().

char ME[] = "udag_scanner.c" [static]
SXINT n

Definition at line 1559 of file udag_scanner.c.

Referenced by sxspf_yielddfa_eliminate_eof_transitions().

SXINT SEMLEX_lahead = -1

Definition at line 223 of file udag_scanner.c.

Referenced by sdag_action().

struct sxtables* tables [static]

Definition at line 102 of file udag_scanner.c.

VARSTR vstr [static]

Definition at line 220 of file udag_scanner.c.

char WHAT_UDAG_SCANNER[] = "@(#)SYNTAX - $Id: udag_scanner.c 1808 2010-02-02 16:26:11Z sagot $" WHAT_DEBUG

Definition at line 77 of file udag_scanner.c.

char* wstr [static]

Definition at line 217 of file udag_scanner.c.

SXINT wstr_lgth [static]

Definition at line 218 of file udag_scanner.c.


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