earley_parser.c File Reference

#include "sxversion.h"
#include "sxunix.h"
#include "sxba_bag.h"
#include <math.h>
#include "varstr.h"
#include "earley.h"
#include "fsa.h"
#include "XH.h"
#include "udag_scanner.h"
Include dependency graph for earley_parser.c:

Go to the source code of this file.

Data Structures

struct  recognize_item

Defines

#define SX_DFN_EXT_VAR2
#define SX_DFN_EXT_VAR_RCG
#define inputG_SXEOF   (-tmax)
#define inputG_MAXITEM   itemmax
#define inputG_MAXNT   ntmax
#define inputG_MAXPROD   prodmax
#define inputG_MAXRHSLGTH   rhs_lgth
#define inputG_tstring   tstring
#define inputG_ntstring   ntstring
#define SXEOF   (-tmax)
#define MAXNT   ntmax
#define MAXT   tmax
#define MAXITEM   itemmax
#define MAXPROD   prodmax
#define MAXRHSLGTH   rhs_lgth
#define MAXRHSNT   rhs_maxnt
#define IS_EPSILON   is_epsilon
#define IS_RIGHT_RECURSIVE   is_right_recursive
#define IS_CYCLIC   is_cyclic
#define LISPRO(i)   lispro [i]
#define PROLIS(i)   prolis [i]
#define PROLON(i)   prolon [i]
#define LHS(i)   lhs [i]
#define NPG(i)   npg [i]
#define NUMPG(i)   numpg [i]
#define NPD(i)   npd [i]
#define NUMPD(i)   numpd [i]
#define TPD(i)   tpd [i]
#define TNUMPD(i)   tnumpd [i]
#define PROD(i)   i
#define NTSTRING(i)   ntstring [i]
#define TSTRING(i)   tstring [i]
#define RHS_NT2WHERE(i)   rhs_nt2where [i]
#define LHS_NT2WHERE(i)   lhs_nt2where [i]
#define EMPTY_SET   BVIDE
#define TITEM_SET   titem_set
#define RC_TITEM_SET   rc_titem_set
#define EMPTY_PROD_ITEM_SET   NULL
#define LEFT_CORNER(i)   left_corner [i]
#define NT2ITEM_SET(i)   nt2item_set [i]
#define RIGHT_CORNER(i)   right_corner [i]
#define NT2RC_ITEM_SET(i)   nt2rc_item_set [i]
#define VALID_PREFIXES   valid_prefixes
#define VALID_SUFFIXES   valid_suffixes
#define T2PROD_ITEM_SET(i)   t2prod_item_set [i]
#define T2ITEM_SET(i)   t2item_set [i]
#define NT2MIN_GEN_LGTH(i)   nt2min_gen_lgth [i]
#define PUSH(s, x)   (s)[++*(s)]=(x)
#define POP(s)   (s)[(*(s))--]
#define IS_EMPTY(s)   (*(s)==0)

Functions

void sxexit_timeout ()
void sxearley_set_for_semact (void)
SXINT supertag_act (SXINT numact, SXINT tok_no)
SXINT alloc_ff_ste ()
static void sxearley_raz (void)
static SXBOOLEAN is_in_reduce (SXINT *bot, SXINT *top, SXINT item)
int main (int argc, char *argv[])

Variables

static char ME [] = "earley_parser"
char WHAT_EARLEY_PARSER [] = "@(#)SYNTAX - $Id: earley_parser.c 1801 2009-12-16 15:29:18Z sagot $" WHAT_DEBUG
SXUINT maximum_input_size
SXBOOLEAN tmp_file_for_stdin
SXBOOLEAN sxtty_is_stderr
static SXINT pass_number
static SXINT Tpq_repair_nb
static SXINT Pij_repair_nb
static SXINT * repair_Tpq2tok_no
static SXINT working_rcvr_mlstn
static SXINT rcvr_detection_table
static SXBOOLEAN rcvr_detection_table_cleared
static SXBA ilex_compatible_item_set
static SXBA loop_clause_set
static SXBA * i2rl_supertagger_item_set
static SXBOOLEAN is_mlstn2non_lexicalized_look_ahead_t_set
static SXBOOLEAN is_mlstn2lexicalized_look_ahead_t_set
static SXBOOLEAN is_lex_compatible_item_sets
SXBA basic_item_set
SXBA basic_nt_set
static SXBA * mlstn2la_tset
static SXBA * mlstn2non_lexicalized_look_ahead_t_set
static SXBA * mlstn2look_ahead_t_set
static SXBA pq_t_set
static SXBA q_set
static SXBA mlstn_active_set
static SXBA dead_ends
static SXBOOLEAN is_semact_fun
static SXBOOLEAN is_constraint_fun
static SXBOOLEAN is_prdct_fun
static SXBOOLEAN is_output_full_guide
static SXBA * non_kernel_item_sets
static struct recognize_itemRT
static SXBOOLEAN is_error_detected
static SXBA T2_look_ahead_t_set
static SXINT ** T2_shift_NT_hd
static SXINT * T2_items_stack
static SXBA * T2_index_sets
static SXBA T2_non_kernel_item_set
static SXBA T2_left_corner
static SXBA * RT_left_corner
static bag_header shift_bag
static SXBA * ntXindex_set
static SXBA lhs_order_set
static SXBA nt_hd [inputG_MAXNT+1]
 p
 q
SXBOOLEAN * has_reduce
SXBOOLEAN from_cyclic_stack
 mlstnp
SXBOOLEAN(* main_parser )(SXINT what) = sxearley_parse_it

Define Documentation

#define EMPTY_PROD_ITEM_SET   NULL

Definition at line 305 of file earley_parser.c.

#define EMPTY_SET   BVIDE

Definition at line 299 of file earley_parser.c.

#define inputG_MAXITEM   itemmax

Definition at line 211 of file earley_parser.c.

#define inputG_MAXNT   ntmax

Definition at line 212 of file earley_parser.c.

#define inputG_MAXPROD   prodmax

Definition at line 213 of file earley_parser.c.

#define inputG_MAXRHSLGTH   rhs_lgth

Definition at line 214 of file earley_parser.c.

#define inputG_ntstring   ntstring

Definition at line 216 of file earley_parser.c.

#define inputG_SXEOF   (-tmax)

Definition at line 210 of file earley_parser.c.

#define inputG_tstring   tstring

Definition at line 215 of file earley_parser.c.

#define IS_CYCLIC   is_cyclic

Definition at line 280 of file earley_parser.c.

#define IS_EMPTY (  )     (*(s)==0)
#define IS_EPSILON   is_epsilon

Definition at line 278 of file earley_parser.c.

#define IS_RIGHT_RECURSIVE   is_right_recursive

Definition at line 279 of file earley_parser.c.

#define LEFT_CORNER (  )     left_corner [i]

Definition at line 307 of file earley_parser.c.

#define LHS (  )     lhs [i]

Definition at line 285 of file earley_parser.c.

#define LHS_NT2WHERE (  )     lhs_nt2where [i]

Definition at line 297 of file earley_parser.c.

#define LISPRO (  )     lispro [i]

Definition at line 282 of file earley_parser.c.

#define MAXITEM   itemmax

Definition at line 274 of file earley_parser.c.

#define MAXNT   ntmax

Definition at line 272 of file earley_parser.c.

#define MAXPROD   prodmax

Definition at line 275 of file earley_parser.c.

#define MAXRHSLGTH   rhs_lgth

Definition at line 276 of file earley_parser.c.

#define MAXRHSNT   rhs_maxnt

Definition at line 277 of file earley_parser.c.

#define MAXT   tmax

Definition at line 273 of file earley_parser.c.

#define NPD (  )     npd [i]

Definition at line 288 of file earley_parser.c.

#define NPG (  )     npg [i]

Definition at line 286 of file earley_parser.c.

#define NT2ITEM_SET (  )     nt2item_set [i]

Definition at line 308 of file earley_parser.c.

#define NT2MIN_GEN_LGTH (  )     nt2min_gen_lgth [i]

Definition at line 315 of file earley_parser.c.

#define NT2RC_ITEM_SET (  )     nt2rc_item_set [i]

Definition at line 310 of file earley_parser.c.

#define NTSTRING (  )     ntstring [i]

Definition at line 293 of file earley_parser.c.

#define NUMPD (  )     numpd [i]

Definition at line 289 of file earley_parser.c.

#define NUMPG (  )     numpg [i]

Definition at line 287 of file earley_parser.c.

#define POP (  )     (s)[(*(s))--]
#define PROD (  )     i

Definition at line 292 of file earley_parser.c.

#define PROLIS (  )     prolis [i]

Definition at line 283 of file earley_parser.c.

#define PROLON (  )     prolon [i]

Definition at line 284 of file earley_parser.c.

#define PUSH ( s,
 )     (s)[++*(s)]=(x)
#define RC_TITEM_SET   rc_titem_set

Definition at line 301 of file earley_parser.c.

#define RHS_NT2WHERE (  )     rhs_nt2where [i]

Definition at line 296 of file earley_parser.c.

#define RIGHT_CORNER (  )     right_corner [i]

Definition at line 309 of file earley_parser.c.

#define SX_DFN_EXT_VAR2

Definition at line 110 of file earley_parser.c.

#define SX_DFN_EXT_VAR_RCG

Definition at line 203 of file earley_parser.c.

#define SXEOF   (-tmax)

Definition at line 271 of file earley_parser.c.

#define T2ITEM_SET (  )     t2item_set [i]

Definition at line 314 of file earley_parser.c.

#define T2PROD_ITEM_SET (  )     t2prod_item_set [i]

Definition at line 313 of file earley_parser.c.

#define TITEM_SET   titem_set

Definition at line 300 of file earley_parser.c.

#define TNUMPD (  )     tnumpd [i]

Definition at line 291 of file earley_parser.c.

#define TPD (  )     tpd [i]

Definition at line 290 of file earley_parser.c.

#define TSTRING (  )     tstring [i]

Definition at line 294 of file earley_parser.c.

#define VALID_PREFIXES   valid_prefixes

Definition at line 311 of file earley_parser.c.

#define VALID_SUFFIXES   valid_suffixes

Definition at line 312 of file earley_parser.c.


Function Documentation

SXINT alloc_ff_ste (  ) 

Definition at line 973 of file earley_parser.c.

References n.

static SXBOOLEAN is_in_reduce ( SXINT *  bot,
SXINT *  top,
SXINT  item 
) [static]

Definition at line 1646 of file earley_parser.c.

References SXFALSE, and SXTRUE.

int main ( int  argc,
char argv[] 
)

Definition at line 13185 of file earley_parser.c.

References sxearley_main(), SXTRUE, and sxtty_is_stderr.

SXINT supertag_act ( SXINT  numact,
SXINT  tok_no 
)

Definition at line 949 of file earley_parser.c.

References sxplocals.

static void sxearley_raz ( void   )  [static]
void sxearley_set_for_semact ( void   ) 

Definition at line 471 of file earley_parser.c.

References sxexit_timeout().

Referenced by sxearley_main().

void sxexit_timeout (  ) 

Variable Documentation

Definition at line 255 of file lexicalizer_mngr.c.

Definition at line 255 of file lexicalizer_mngr.c.

SXBA dead_ends [static]

Definition at line 827 of file earley_parser.c.

SXBOOLEAN from_cyclic_stack

Definition at line 4336 of file earley_parser.c.

SXBOOLEAN* has_reduce

Definition at line 4336 of file earley_parser.c.

Referenced by sxndscan_it().

SXBA* i2rl_supertagger_item_set [static]

Definition at line 796 of file earley_parser.c.

SXBA ilex_compatible_item_set [static]

Definition at line 367 of file earley_parser.c.

SXBOOLEAN is_constraint_fun [static]

Definition at line 1065 of file earley_parser.c.

SXBOOLEAN is_error_detected [static]

Definition at line 1637 of file earley_parser.c.

SXBOOLEAN is_lex_compatible_item_sets [static]

Definition at line 797 of file earley_parser.c.

Definition at line 797 of file earley_parser.c.

Definition at line 797 of file earley_parser.c.

SXBOOLEAN is_output_full_guide [static]

Definition at line 1065 of file earley_parser.c.

SXBOOLEAN is_prdct_fun [static]

Definition at line 1065 of file earley_parser.c.

SXBOOLEAN is_semact_fun [static]

Definition at line 1065 of file earley_parser.c.

SXBA lhs_order_set [static]

Definition at line 1677 of file earley_parser.c.

SXBA loop_clause_set [static]

Definition at line 789 of file earley_parser.c.

SXBOOLEAN(* main_parser)(SXINT what) = sxearley_parse_it

Definition at line 118 of file earley_parser.c.

Referenced by main(), and sxearley_main().

char ME[] = "earley_parser" [static]

Definition at line 26 of file earley_parser.c.

SXBA* mlstn2la_tset [static]

Definition at line 811 of file earley_parser.c.

SXBA* mlstn2look_ahead_t_set [static]

Definition at line 816 of file earley_parser.c.

Definition at line 814 of file earley_parser.c.

SXBA mlstn_active_set [static]

Definition at line 827 of file earley_parser.c.

Definition at line 5232 of file earley_parser.c.

SXBA* non_kernel_item_sets [static]

Definition at line 1085 of file earley_parser.c.

SXBA nt_hd[inputG_MAXNT+1] [static]

Definition at line 1690 of file earley_parser.c.

SXBA* ntXindex_set [static]

Definition at line 1677 of file earley_parser.c.

p [static]

Definition at line 4335 of file earley_parser.c.

SXINT pass_number [static]

Definition at line 359 of file earley_parser.c.

SXINT Pij_repair_nb [static]

Definition at line 361 of file earley_parser.c.

SXBA pq_t_set [static]

Definition at line 821 of file earley_parser.c.

q [static]
SXBA q_set [static]

Definition at line 827 of file earley_parser.c.

Referenced by fill_more_idag_infos().

SXINT rcvr_detection_table [static]

Definition at line 364 of file earley_parser.c.

SXBOOLEAN rcvr_detection_table_cleared [static]

Definition at line 365 of file earley_parser.c.

SXINT* repair_Tpq2tok_no [static]

Definition at line 362 of file earley_parser.c.

struct recognize_item * RT [static]
SXBA* RT_left_corner [static]

Definition at line 1673 of file earley_parser.c.

Definition at line 1675 of file earley_parser.c.

SXBOOLEAN sxtty_is_stderr

Definition at line 120 of file earley_parser.c.

Referenced by main(), and sxearley_main().

SXBA* T2_index_sets [static]

Definition at line 1662 of file earley_parser.c.

SXINT* T2_items_stack [static]

Definition at line 1660 of file earley_parser.c.

SXBA T2_left_corner [static]

Definition at line 1672 of file earley_parser.c.

SXBA T2_look_ahead_t_set [static]

Definition at line 1658 of file earley_parser.c.

SXBA T2_non_kernel_item_set [static]

Definition at line 1664 of file earley_parser.c.

SXINT** T2_shift_NT_hd [static]

Definition at line 1659 of file earley_parser.c.

SXBOOLEAN tmp_file_for_stdin

Definition at line 119 of file earley_parser.c.

Referenced by earley_run(), and sxearley_main().

SXINT Tpq_repair_nb [static]

Definition at line 361 of file earley_parser.c.

char WHAT_EARLEY_PARSER[] = "@(#)SYNTAX - $Id: earley_parser.c 1801 2009-12-16 15:29:18Z sagot $" WHAT_DEBUG

Definition at line 116 of file earley_parser.c.

SXINT working_rcvr_mlstn [static]

Definition at line 364 of file earley_parser.c.


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