read_a_re.c File Reference

#include "sxversion.h"
#include "sxcommon.h"
#include "re_t.h"
#include "udag_scanner.h"
#include "earley.h"
#include "fsa.h"
#include "varstr.h"
#include <setjmp.h>
#include "XH.h"
#include "sxstack.h"
#include "XxY.h"
#include <stdlib.h>
Include dependency graph for read_a_re.c:

Go to the source code of this file.

Data Structures

struct  re_node

Defines

#define SXNODE   struct re_node
#define sxparser   sxparser_re_tcut
#define sxtables   re_tables
#define SCANACT   sxvoid
#define PARSACT   sxvoid
#define sempass   re_smp
#define ERROR_n   1
#define ALTERNATIVE_S_n   2
#define KLEENE_PLUS_n   3
#define KLEENE_STAR_n   4
#define OPTION_n   5
#define RE_ROOT_n   6
#define SEMLEX_n   7
#define SEQUENCE_S_n   8
#define WORD_SEMLEX_n   9
#define eof_n   10
#define word_n   11
#define eol_code   1

Functions

static void(*)(*) store_re (SXINT, struct sxtoken **, struct sxtoken **, SXINT, SXINT)
static SXINT first_re2nfa_pass (struct re_node *visited)
static SXINT second_re2nfa_pass (struct re_node *visited, SXINT pre_pos, SXINT cur_pos, SXINT post_pos)
static void first_re2dfa_pass (struct re_node *visited)
static void second_re2dfa_pass (struct re_node *visited)
static void third_re2dfa_pass (struct re_node *visited)
static void extract_efnfa (void)
static int compare (const void *pi, const void *pj)
static void XxY_dfa_oflw (SXINT old_size, SXINT new_size)
static void extract_dfa (void)
static void smpopen (struct sxtables *sxtables_ptr)
static SXINT smppass (void)
SXINT re_smp (SXINT what, struct sxtables *sxtables_ptr)
SXINT read_a_re (void(*prelude)(SXBOOLEAN, SXINT, SXINT, SXINT, SXINT), void(*store)(SXINT, struct sxtoken **, struct sxtoken **, SXINT, SXINT), SXINT(*postlude)(SXINT), SXINT what_to_do)
SXINT sxparser (SXINT what_to_do, struct sxtables *arg)
SXINT sxparser_re_tcut (SXINT what_to_do, struct sxtables *arg)
SXINT re_reader (char *pathname_or_string, SXBOOLEAN from_file, SXINT(*re_process)(void))

Variables

static char ME [] = "read_a_re"
char WHAT_READARE [] = "@(#)SYNTAX - $Id: read_a_re.c 1690 2008-12-10 13:22:26Z sagot $" WHAT_DEBUG
VARSTR cur_input_vstr
void(* main_parser )(SXINT what)
static void(* prelude_re )(SXBOOLEAN, SXINT, SXINT, SXINT, SXINT)
static SXINT(* postlude_re )(SXINT)
static SXINT what_to_do_re
static SXINT eof_ste
static SXBOOLEAN not_a_dag
SXBOOLEAN tmp_file_for_stdin
static VARSTR vstr
static struct sxtoken * re2nfa_token_ptr_stack [3]
static struct sxtoken * re2nfa_semlex_token_ptr_stack [3]
static SXINT re_node_nb
static SXINT re_leaf_nb
static SXINT position
static SXINT node_nb
static SXINT dfa_init_state
static SXINT eof_position
static SXBA * firstpos_sets
static SXBA * lastpos_sets
static SXBA * followpos
static struct re_node ** position2visited
SXINT SEMLEX_lahead
static XH_header XH_dfa
static SXINT * XxY_dfa2next_state
static SXBA * XxY_dfa2pos_set

Define Documentation

#define ALTERNATIVE_S_n   2
#define eof_n   10
#define eol_code   1

Definition at line 1286 of file read_a_re.c.

Referenced by sxparser_re_tcut().

#define ERROR_n   1
#define KLEENE_PLUS_n   3
#define KLEENE_STAR_n   4
#define OPTION_n   5
#define PARSACT   sxvoid

Definition at line 38 of file read_a_re.c.

#define RE_ROOT_n   6
#define SCANACT   sxvoid

Definition at line 37 of file read_a_re.c.

#define SEMLEX_n   7

Definition at line 82 of file read_a_re.c.

Referenced by extract_dfa(), extract_efnfa(), first_re2dfa_pass(), and second_re2nfa_pass().

#define sempass   re_smp

Definition at line 39 of file read_a_re.c.

#define SEQUENCE_S_n   8
#define SXNODE   struct re_node
#define sxparser   sxparser_re_tcut

Definition at line 35 of file read_a_re.c.

Referenced by dag_scanner(), string_parser(), and sxparser_re_tcut().

#define sxtables   re_tables

Definition at line 36 of file read_a_re.c.

Referenced by main(), make_proper_run(), make_tdef_run(), read_a_sdag(), read_a_udag(), and sxatcpp().

#define word_n   11
#define WORD_SEMLEX_n   9

Function Documentation

static int compare ( const void *  pi,
const void *  pj 
) [static]

Definition at line 844 of file read_a_re.c.

Referenced by extract_dfa().

static void extract_dfa ( void   )  [static]
static void extract_efnfa ( void   )  [static]

Definition at line 698 of file read_a_re.c.

References ME, PUSH, RAZ, SEMLEX_n, re_node::ste, sxba_first_difference(), sxba_scan(), SXBOOLEAN, SXFALSE, sxtrap(), SXTRUE, and TOP.

Referenced by smppass().

static void first_re2dfa_pass ( struct re_node visited  )  [static]
static SXINT first_re2nfa_pass ( struct re_node visited  )  [static]
SXINT re_reader ( char pathname_or_string,
SXBOOLEAN  from_file,
SXINT(*)(void)  re_process 
)

Definition at line 1500 of file read_a_re.c.

References ME, sxfopen(), sxperror(), sxsrc_mngr(), sxstderr, sxtmpfile(), sxtty, and sxverbosep.

SXINT re_smp ( SXINT  what,
struct sxtables sxtables_ptr 
)

Definition at line 1217 of file read_a_re.c.

References smpopen(), smppass(), sxplocals, sxsvar, and sxtmsg().

SXINT read_a_re ( void(*)(SXBOOLEAN, SXINT, SXINT, SXINT, SXINT)  prelude,
void(*)(SXINT, struct sxtoken **, struct sxtoken **, SXINT, SXINT)  store,
SXINT(*)(SXINT)  postlude,
SXINT  what_to_do 
)

Definition at line 1244 of file read_a_re.c.

References postlude_re, prelude_re, store, store_re(), and syntax().

Referenced by dag_scanner().

static void second_re2dfa_pass ( struct re_node visited  )  [static]
static SXINT second_re2nfa_pass ( struct re_node visited,
SXINT  pre_pos,
SXINT  cur_pos,
SXINT  post_pos 
) [static]
static void smpopen ( struct sxtables sxtables_ptr  )  [static]

Definition at line 1124 of file read_a_re.c.

Referenced by re_smp().

static SXINT smppass ( void   )  [static]
static void(*)(*) store_re ( SXINT  ,
struct sxtoken **  ,
struct sxtoken **  ,
SXINT  ,
SXINT   
)
SXINT sxparser ( SXINT  what_to_do,
struct sxtables arg 
)

Definition at line 572 of file sxparser.c.

SXINT sxparser_re_tcut ( SXINT  what_to_do,
struct sxtables arg 
)
static void third_re2dfa_pass ( struct re_node visited  )  [static]
static void XxY_dfa_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 873 of file read_a_re.c.

References sxbm_resize().

Referenced by extract_dfa().


Variable Documentation

Definition at line 73 of file udag_scanner.c.

Referenced by sxparser_re_tcut().

SXINT dfa_init_state [static]

Definition at line 338 of file read_a_re.c.

SXINT eof_position [static]

Definition at line 338 of file read_a_re.c.

SXINT eof_ste [static]

Definition at line 100 of file read_a_re.c.

SXBA* firstpos_sets [static]

Definition at line 339 of file read_a_re.c.

SXBA * followpos [static]

Definition at line 339 of file read_a_re.c.

SXBA * lastpos_sets [static]

Definition at line 339 of file read_a_re.c.

void(* main_parser)(SXINT what)
char ME[] = "read_a_re" [static]
SXINT node_nb [static]

Definition at line 338 of file read_a_re.c.

SXBOOLEAN not_a_dag [static]

Definition at line 101 of file read_a_re.c.

SXINT position [static]

Definition at line 338 of file read_a_re.c.

struct re_node** position2visited [static]

Definition at line 340 of file read_a_re.c.

SXINT(* postlude_re)(SXINT) [static]

Referenced by read_a_re(), and smppass().

void(* prelude_re)(SXBOOLEAN, SXINT, SXINT, SXINT, SXINT) [static]

Referenced by read_a_re(), and smppass().

struct sxtoken* re2nfa_semlex_token_ptr_stack[3] [static]

Definition at line 107 of file read_a_re.c.

struct sxtoken* re2nfa_token_ptr_stack[3] [static]

Definition at line 106 of file read_a_re.c.

SXINT re_leaf_nb [static]

Definition at line 108 of file read_a_re.c.

SXINT re_node_nb [static]

Definition at line 108 of file read_a_re.c.

Definition at line 223 of file udag_scanner.c.

Referenced by sdag_action().

SXBOOLEAN tmp_file_for_stdin

Definition at line 119 of file earley_parser.c.

VARSTR vstr [static]

Definition at line 103 of file read_a_re.c.

char WHAT_READARE[] = "@(#)SYNTAX - $Id: read_a_re.c 1690 2008-12-10 13:22:26Z sagot $" WHAT_DEBUG

Definition at line 50 of file read_a_re.c.

SXINT what_to_do_re [static]

Definition at line 99 of file read_a_re.c.

XH_header XH_dfa [static]

Definition at line 841 of file read_a_re.c.

SXINT* XxY_dfa2next_state [static]

Definition at line 869 of file read_a_re.c.

SXBA* XxY_dfa2pos_set [static]

Definition at line 870 of file read_a_re.c.


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