sxindparser.c File Reference

#include "sxversion.h"
#include "sxcommon.h"
#include <stdio.h>
#include "sxindparser.h"
#include "B_tables.h"
Include dependency graph for sxindparser.c:

Go to the source code of this file.

Data Structures

struct  rhs
struct  parse_stack_elem
struct  G
struct  red_parsers
struct  parse_stack

Functions

static SXVOID sons_oflw (SXINT old_size, SXINT new_size)
static SXVOID GC (SXINT p)
static SXBOOLEAN new_symbol (SXINT p, SXINT k, SXINT i, SXINT j, SXINT *symbol)
static SXVOID output_symbol (SXINT symbol)
static SXVOID output_grammar_rule (SXINT rule_no)
static SXVOID set_t_rule (SXINT symbol)
static SXVOID set_unit_rule (SXINT lhs, SXINT rhs)
static SXVOID set_rule (SXINT lhs, SXINT rhs)
static SXVOID push_rp (SXINT ref, SXINT p)
static SXVOID set_start_symbol (SXINT symbol)
static SXINT add_active_parser (SXINT son, SXINT state, SXINT symbol)
static SXINT push_rhs (SXINT symbol, SXINT list)
static SXVOID do_reductions (SXINT son, SXBOOLEAN is_in_set)
static SXVOID do_pops (SXINT p, SXINT l)
static SXVOID do_limited_reductions (SXINT p, SXINT l)
static SXVOID seek_paths (SXINT p, SXINT p_trans, SXBOOLEAN is_in_set, SXINT l)
static SXVOID parse_forest ()
static SXBOOLEAN shifter ()
static SXVOID unused_rule_elimination (SXINT start_symbol)
static SXVOID output_grammar (SXINT start_symbol)
static SXBOOLEAN sxparse_it ()
SXBOOLEAN sxindparser (SXINT what_to_do, struct sxtables *arg)

Variables

static char ME [] = "INDPARSER"
char WHAT_SXIND_PARSER [] = "@(#)SYNTAX - $Id: sxindparser.c 1429 2008-07-03 14:28:41Z rlacroix $" WHAT_DEBUG

Function Documentation

static SXINT add_active_parser ( SXINT  son,
SXINT  state,
SXINT  symbol 
) [static]
static SXVOID do_limited_reductions ( SXINT  p,
SXINT  l 
) [static]

Definition at line 705 of file sxindparser.c.

References do_reductions(), son, sxba_minus(), sxba_scan(), sxba_scan_reset(), and SXBOOLEAN.

Referenced by sxparse_it().

static SXVOID do_pops ( SXINT  p,
SXINT  l 
) [static]

Definition at line 623 of file sxindparser.c.

References do_reductions(), son, sxba_scan_reset(), SXBOOLEAN, SXFALSE, and SXTRUE.

Referenced by shifter(), and sxparse_it().

static SXVOID do_reductions ( SXINT  son,
SXBOOLEAN  is_in_set 
) [static]
static SXVOID GC ( SXINT  p  )  [static]

Definition at line 131 of file sxindparser.c.

References son, sxba_0_rlscan(), sxba_1_rlscan(), sxba_fill(), SXBOOLEAN, SXFALSE, and SXTRUE.

Referenced by add_active_parser().

static SXBOOLEAN new_symbol ( SXINT  p,
SXINT  k,
SXINT  i,
SXINT  j,
SXINT *  symbol 
) [static]

Definition at line 211 of file sxindparser.c.

References sxplocals, and XxY_set().

Referenced by build_a_rule(), do_reductions(), seek_paths(), set_start_symbol(), and shifter().

static SXVOID output_grammar ( SXINT  start_symbol  )  [static]

Definition at line 1087 of file sxindparser.c.

References output_grammar_rule(), and output_symbol().

Referenced by sxparse_it().

static SXVOID output_grammar_rule ( SXINT  rule_no  )  [static]

Definition at line 270 of file sxindparser.c.

References output_symbol().

Referenced by output_grammar().

static SXVOID output_symbol ( SXINT  symbol  )  [static]

Definition at line 233 of file sxindparser.c.

References sxplocals, and sxsvar.

Referenced by output_grammar(), and output_grammar_rule().

static SXVOID parse_forest ( void   )  [static]

Definition at line 921 of file sxindparser.c.

References p, POP, seek_paths(), SXFALSE, and SXTRUE.

Referenced by sxparse_it().

static SXINT push_rhs ( SXINT  symbol,
SXINT  list 
) [static]

Definition at line 549 of file sxindparser.c.

Referenced by seek_paths(), and shifter().

static SXVOID push_rp ( SXINT  ref,
SXINT  p 
) [static]

Definition at line 336 of file sxindparser.c.

References red_parsers::lnk, red_parsers::parser, PUSH, and q.

Referenced by add_active_parser().

static SXVOID seek_paths ( SXINT  p,
SXINT  p_trans,
SXBOOLEAN  is_in_set,
SXINT  l 
) [static]
static SXVOID set_rule ( SXINT  lhs,
SXINT  rhs 
) [static]

Definition at line 315 of file sxindparser.c.

References XH_set().

Referenced by build_a_rule(), and seek_paths().

static SXVOID set_start_symbol ( SXINT  symbol  )  [static]

Definition at line 370 of file sxindparser.c.

References new_symbol(), and set_unit_rule().

Referenced by add_active_parser(), and create_parser().

static SXVOID set_t_rule ( SXINT  symbol  )  [static]

Definition at line 288 of file sxindparser.c.

References sxplocals, sxsvar, and XH_set().

Referenced by shifter().

static SXVOID set_unit_rule ( SXINT  lhs,
SXINT  rhs 
) [static]

Definition at line 304 of file sxindparser.c.

References XH_set().

Referenced by add_active_parser(), set_start_symbol(), and sxndsubparse_a_token().

static SXBOOLEAN shifter (  )  [static]

Definition at line 977 of file sxindparser.c.

References add_active_parser(), do_pops(), n, new_symbol(), p, POP, push_rhs(), q, seek_paths(), set_t_rule(), son, SXFALSE, sxplocals, and SXTRUE.

Referenced by sxparse_it().

static SXVOID sons_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 121 of file sxindparser.c.

References sxba_resize().

Referenced by sxindparser().

SXBOOLEAN sxindparser ( SXINT  what_to_do,
struct sxtables arg 
)
static SXBOOLEAN sxparse_it ( void   )  [static]
static SXVOID unused_rule_elimination ( SXINT  start_symbol  )  [static]

Definition at line 1033 of file sxindparser.c.

References sxba_cardinal(), sxbm_calloc(), sxbm_free(), and parse_stack_elem::symbol.

Referenced by sxparse_it().


Variable Documentation

char ME[] = "INDPARSER" [static]

Definition at line 22 of file sxindparser.c.

Referenced by sxindparser().

char WHAT_SXIND_PARSER[] = "@(#)SYNTAX - $Id: sxindparser.c 1429 2008-07-03 14:28:41Z rlacroix $" WHAT_DEBUG

Definition at line 46 of file sxindparser.c.


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