output_semact.c File Reference

#include "sxversion.h"
#include "sxunix.h"
#include "earley.h"
#include "XH.h"
#include "varstr.h"
#include "sxstack.h"
#include "udag_scanner.h"
#include <math.h>
#include <float.h>
#include "X.h"
#include "sxword.h"
Include dependency graph for output_semact.c:

Go to the source code of this file.

Defines

#define SENTENCE_CONCAT   0X80000000
#define SENTENCE_OR   0X40000000
#define Tpq2str(Tpq)   (Tpq ? (spf.inputG.tstring [-Tij2T (Tpq-spf.outputG.maxxnt)]) : NULL)
#define OPTION(opt)   (1 << (opt - 1))
#define noOPTION(opt)   (~OPTION (opt))
#define OPT_NB   ((sizeof(option_tbl)/sizeof(*option_tbl))-1)
#define UNKNOWN_ARG   0
#define XML   1
#define PRINT_HEADERS   2
#define PRINT_XML_HEADER   3
#define ODAG   4

Functions

static SXINT option_get_kind (char *arg)
static charoption_get_text (SXINT kind)
static charoutput_ME (void)
static charoutput_args_usage (void)
static SXBOOLEAN output_args_decode (int *pargnum, int argc, char *argv[])
static void spf_td_walk_incl_terminals (SXINT Aij, char *(*ntstring2name)(char *), char *ntkind, char *ntkindshort)
SXINT easy_get_sentence_no (void)
int seek_prefix_Aij (char *Easy_A, SXINT Pij)
int seek_Aij (char *A, SXINT Pij)
static SXINT xml_count_leaves (void)
static SXVOID xml_print_terminal_leaves (void)
static void xml_print_nt_set (SXBA Aij_set)
static void xml_print_terminal (SXINT Tij)
static void xml_print_unique_tree (SXINT Aij)
static void xml_print_forest (void)
static void xml_escape_fprintf (FILE *file, char *string)
static void xml_gen_header (void)
static void xml_output (SXBOOLEAN print_unique_tree)
static void dag_output (void)
static SXINT output_sem_pass (void)
void output_sem_final (void)
void output_semact (void)

Variables

static char ME [] = "output_semact"
char WHAT_OUTPUT_SEMACT [] = "@(#)SYNTAX - $Id: output_semact.c 1728 2009-05-22 09:02:45Z sagot $" WHAT_DEBUG
static SXBOOLEAN is_print_headers
static SXBOOLEAN is_print_xml_headers
static SXINT * spf_count
static SXINT rec_level
static SXINT maxxt
static SXBOOLEAN nl_done
FILE * xml_file = NULL
static charxml_file_name
static FILE * odag_file
static charodag_file_name
static char compact_infos [32]
static SXINT sentence_id
char output_sem_pass_arg
static char Usage []
static charoption_tbl []
static SXINT option_kind []
static SXINT cur_snt_id
static SXINT offset

Define Documentation

#define noOPTION ( opt   )     (~OPTION (opt))

Definition at line 82 of file output_semact.c.

#define ODAG   4

Definition at line 90 of file output_semact.c.

Referenced by output_args_decode().

#define OPT_NB   ((sizeof(option_tbl)/sizeof(*option_tbl))-1)

Definition at line 84 of file output_semact.c.

#define OPTION ( opt   )     (1 << (opt - 1))

Definition at line 81 of file output_semact.c.

#define PRINT_HEADERS   2

Definition at line 88 of file output_semact.c.

Referenced by output_args_decode().

#define PRINT_XML_HEADER   3

Definition at line 89 of file output_semact.c.

Referenced by output_args_decode().

#define SENTENCE_CONCAT   0X80000000

Definition at line 50 of file output_semact.c.

#define SENTENCE_OR   0X40000000

Definition at line 51 of file output_semact.c.

#define Tpq2str ( Tpq   )     (Tpq ? (spf.inputG.tstring [-Tij2T (Tpq-spf.outputG.maxxnt)]) : NULL)

Definition at line 65 of file output_semact.c.

#define UNKNOWN_ARG   0

Definition at line 86 of file output_semact.c.

#define XML   1

Definition at line 87 of file output_semact.c.

Referenced by output_args_decode().


Function Documentation

static void dag_output ( void   )  [static]

Definition at line 877 of file output_semact.c.

References compact_infos, spf_yield2dfa(), and SXFALSE.

Referenced by output_sem_pass().

SXINT easy_get_sentence_no ( void   ) 

Definition at line 371 of file output_semact.c.

Referenced by output_best_weights(), and output_sem_pass().

static SXINT option_get_kind ( char arg  )  [static]

Definition at line 109 of file output_semact.c.

References OPT_NB, option_kind, option_tbl, and UNKNOWN_ARG.

Referenced by output_args_decode().

static char* option_get_text ( SXINT  kind  )  [static]

Definition at line 130 of file output_semact.c.

References OPT_NB, option_kind, and option_tbl.

Referenced by output_args_decode().

static SXBOOLEAN output_args_decode ( int *  pargnum,
int  argc,
char argv[] 
) [static]
static char* output_args_usage ( void   )  [static]

Definition at line 152 of file output_semact.c.

References Usage.

Referenced by output_semact().

static char* output_ME ( void   )  [static]

Definition at line 145 of file output_semact.c.

References ME.

Referenced by output_semact().

void output_sem_final ( void   ) 

Definition at line 1054 of file output_semact.c.

References odag_file, and xml_file.

Referenced by output_semact().

static SXINT output_sem_pass ( void   )  [static]
void output_semact ( void   ) 
int seek_Aij ( char A,
SXINT  Pij 
)

Definition at line 424 of file output_semact.c.

int seek_prefix_Aij ( char Easy_A,
SXINT  Pij 
)

Definition at line 406 of file output_semact.c.

static void spf_td_walk_incl_terminals ( SXINT  Aij,
char *(*)(char *)  ntstring2name,
char ntkind,
char ntkindshort 
) [static]
static SXINT xml_count_leaves ( void   )  [static]

Definition at line 444 of file output_semact.c.

References maxxt, p, q, and spf_get_Tij2tok_no_stack().

Referenced by xml_print_forest().

static void xml_escape_fprintf ( FILE *  file,
char string 
) [static]

Definition at line 793 of file output_semact.c.

Referenced by xml_output().

static void xml_gen_header ( void   )  [static]

Definition at line 813 of file output_semact.c.

References is_print_headers, xml_file, and xml_file_name.

Referenced by xml_output().

static void xml_output ( SXBOOLEAN  print_unique_tree  )  [static]
static void xml_print_forest ( void   )  [static]
static void xml_print_nt_set ( SXBA  Aij_set  )  [static]

Definition at line 535 of file output_semact.c.

References sentence_id, sxba_scan(), and xml_file.

Referenced by xml_print_forest().

static void xml_print_terminal ( SXINT  Tij  )  [static]

Definition at line 585 of file output_semact.c.

References sentence_id, spf_get_Tij2tok_no_stack(), and xml_file.

Referenced by xml_print_unique_tree().

static SXVOID xml_print_terminal_leaves ( void   )  [static]

Definition at line 476 of file output_semact.c.

References maxxt, p, q, spf_get_Tij2tok_no_stack(), T, and xml_file.

Referenced by xml_print_forest().

static void xml_print_unique_tree ( SXINT  Aij  )  [static]

Definition at line 639 of file output_semact.c.

References ME, sentence_id, SXBOOLEAN, SXFALSE, sxtrap(), SXTRUE, xml_file, and xml_print_terminal().

Referenced by xml_output().


Variable Documentation

char compact_infos[32] [static]

Definition at line 60 of file output_semact.c.

Referenced by dag_output().

SXINT cur_snt_id [static]

Definition at line 235 of file output_semact.c.

SXBOOLEAN is_print_headers [static]

Definition at line 45 of file output_semact.c.

Referenced by output_args_decode(), and xml_gen_header().

SXBOOLEAN is_print_xml_headers [static]

Definition at line 46 of file output_semact.c.

Referenced by output_args_decode(), and xml_output().

SXINT maxxt [static]

Definition at line 52 of file output_semact.c.

Referenced by output_sem_pass(), xml_count_leaves(), and xml_print_terminal_leaves().

char ME[] = "output_semact" [static]
SXBOOLEAN nl_done [static]

Definition at line 53 of file output_semact.c.

Referenced by spf_td_walk_incl_terminals().

FILE* odag_file [static]

Definition at line 57 of file output_semact.c.

Referenced by output_sem_final(), and output_sem_pass().

char* odag_file_name [static]

Definition at line 58 of file output_semact.c.

Referenced by output_args_decode(), and output_sem_pass().

SXINT offset [static]

Definition at line 582 of file output_semact.c.

Referenced by after_last_idag_trans(), FSA_walk(), and varstr_lcatenate_with_escape().

SXINT option_kind[] [static]
Initial value:
 {
    UNKNOWN_ARG,
    XML,
    PRINT_HEADERS, PRINT_HEADERS,
    PRINT_XML_HEADER, PRINT_XML_HEADER,
    ODAG,
}

Definition at line 100 of file output_semact.c.

Referenced by option_get_kind(), and option_get_text().

char* option_tbl[] [static]
Initial value:
 {
    "",
    "xml",
    "ph","print_headers",
    "pxh","print_xml_header",
    "odag",
}

Definition at line 92 of file output_semact.c.

Referenced by option_get_kind(), and option_get_text().

Definition at line 109 of file sxsem_mngr.c.

Referenced by output_sem_pass(), and sxsem_mngr_sem_pass().

SXINT rec_level [static]

Definition at line 49 of file output_semact.c.

Referenced by spf_td_walk_incl_terminals().

SXINT sentence_id [static]
SXINT* spf_count [static]

Definition at line 48 of file output_semact.c.

Referenced by spf_td_walk_incl_terminals().

char Usage[] [static]
Initial value:
 "\
\t\t-xml pathname,\n\
\t\t-odag pathname,\n\
\t\t-ph, -print_headers,\n\
\t\t-pxh, -print_xml_header\n\
\t\t-odag,\n\
"

Definition at line 73 of file output_semact.c.

Referenced by output_args_usage().

char WHAT_OUTPUT_SEMACT[] = "@(#)SYNTAX - $Id: output_semact.c 1728 2009-05-22 09:02:45Z sagot $" WHAT_DEBUG

Definition at line 39 of file output_semact.c.

FILE* xml_file = NULL
char* xml_file_name [static]

Definition at line 56 of file output_semact.c.

Referenced by output_args_decode(), output_sem_pass(), and xml_gen_header().


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