sxearley_main.c File Reference

#include "sxversion.h"
#include "sxunix.h"
#include "earley.h"
#include "udag_scanner.h"
#include <float.h>
#include <math.h>
Include dependency graph for sxearley_main.c:

Go to the source code of this file.

Defines

#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 VERBOSE   1
#define NO_SEM   2
#define DEFAULT_SEM   3
#define PARSE_TREE_NUMBER   4
#define TIME   5
#define STDIN   6
#define PRINT_PROD   7
#define HELP   8
#define TRY_LOWER   9
#define TRY_UPPER   10
#define CAPITALIZED_INITIAL_UNKNOWN_WORD   11
#define LOWER_CASE_INITIAL_UNKNOWN_WORD   12
#define DIGIT_SEQUENCE   13
#define PARSE_FOREST   14
#define TIME_OUT   15
#define VIRTUAL_TIME_OUT   16
#define TAGGED_DAG   17
#define TAGGED_SDAG   18
#define DAG_INPUT   19
#define UDAG_INPUT   20
#define SDAG_INPUT   21
#define STRING_INPUT   22
#define CHECK_RHS_SEQUENCES   23
#define DYNAMIC_SET_AUTOMATON   24
#define BEAM_VALUE   25
#define MAX_INPUT_SIZE   26
#define TMP_FILE_FOR_STDIN   27
#define SOURCE_FILE   28

Functions

static SXINT option_get_kind (char *arg)
static charoption_get_text (SXINT kind)
static void earley_run (char *pathname)
int sxearley_main (int argc, char *argv[])

Variables

char WHAT_SXEARLEY_MAIN [] = "@(#)SYNTAX - $Id: sxearley_main.c 1772 2009-11-02 14:52:57Z syntax $" WHAT_DEBUG
static char ME [] = "sxearley_main"
SXUINT maximum_input_size
SXBOOLEAN tmp_file_for_stdin
SXBOOLEAN sxtty_is_stderr
static SXBOOLEAN is_help
static char Usage []
static charoption_tbl []
static SXINT option_kind []

Define Documentation

#define BEAM_VALUE   25

Definition at line 120 of file sxearley_main.c.

Referenced by sxearley_main().

#define CAPITALIZED_INITIAL_UNKNOWN_WORD   11

Definition at line 106 of file sxearley_main.c.

Referenced by sxearley_main().

#define CHECK_RHS_SEQUENCES   23

Definition at line 118 of file sxearley_main.c.

Referenced by sxearley_main().

#define DAG_INPUT   19

Definition at line 114 of file sxearley_main.c.

#define DEFAULT_SEM   3

Definition at line 98 of file sxearley_main.c.

#define DIGIT_SEQUENCE   13

Definition at line 108 of file sxearley_main.c.

Referenced by sxearley_main().

#define DYNAMIC_SET_AUTOMATON   24

Definition at line 119 of file sxearley_main.c.

Referenced by sxearley_main().

#define HELP   8

Definition at line 103 of file sxearley_main.c.

#define LOWER_CASE_INITIAL_UNKNOWN_WORD   12

Definition at line 107 of file sxearley_main.c.

Referenced by sxearley_main().

#define MAX_INPUT_SIZE   26

Definition at line 121 of file sxearley_main.c.

Referenced by sxearley_main().

#define NO_SEM   2

Definition at line 97 of file sxearley_main.c.

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

Definition at line 91 of file sxearley_main.c.

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

Definition at line 93 of file sxearley_main.c.

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

Definition at line 90 of file sxearley_main.c.

#define PARSE_FOREST   14

Definition at line 109 of file sxearley_main.c.

Referenced by sxearley_main().

#define PARSE_TREE_NUMBER   4

Definition at line 99 of file sxearley_main.c.

#define PRINT_PROD   7

Definition at line 102 of file sxearley_main.c.

Referenced by sxearley_main().

#define SDAG_INPUT   21

Definition at line 116 of file sxearley_main.c.

#define SOURCE_FILE   28

Definition at line 123 of file sxearley_main.c.

#define STDIN   6

Definition at line 101 of file sxearley_main.c.

#define STRING_INPUT   22

Definition at line 117 of file sxearley_main.c.

#define TAGGED_DAG   17

Definition at line 112 of file sxearley_main.c.

Referenced by sxearley_main().

#define TAGGED_SDAG   18

Definition at line 113 of file sxearley_main.c.

Referenced by sxearley_main().

#define TIME   5

Definition at line 100 of file sxearley_main.c.

#define TIME_OUT   15

Definition at line 110 of file sxearley_main.c.

Referenced by sxearley_main().

#define TMP_FILE_FOR_STDIN   27

Definition at line 122 of file sxearley_main.c.

Referenced by sxearley_main().

#define TRY_LOWER   9

Definition at line 104 of file sxearley_main.c.

Referenced by sxearley_main().

#define TRY_UPPER   10

Definition at line 105 of file sxearley_main.c.

Referenced by sxearley_main().

#define UDAG_INPUT   20

Definition at line 115 of file sxearley_main.c.

#define UNKNOWN_ARG   0

Definition at line 95 of file sxearley_main.c.

#define VERBOSE   1

Definition at line 96 of file sxearley_main.c.

#define VIRTUAL_TIME_OUT   16

Definition at line 111 of file sxearley_main.c.

Referenced by sxearley_main().


Function Documentation

static void earley_run ( char pathname  )  [static]
static SXINT option_get_kind ( char arg  )  [static]

Definition at line 191 of file sxearley_main.c.

References OPT_NB, option_kind, option_tbl, SOURCE_FILE, and STDIN.

Referenced by sxearley_main().

static char* option_get_text ( SXINT  kind  )  [static]

Definition at line 212 of file sxearley_main.c.

References OPT_NB, option_kind, and option_tbl.

Referenced by sxearley_main().

int sxearley_main ( int  argc,
char argv[] 
)

Variable Documentation

SXBOOLEAN is_help [static]

Definition at line 57 of file sxearley_main.c.

Referenced by sxearley_main().

Definition at line 118 of file earley_parser.c.

char ME[] = "sxearley_main" [static]

Definition at line 35 of file sxearley_main.c.

Referenced by earley_run(), and sxearley_main().

SXINT option_kind[] [static]
Initial value:
 {
    UNKNOWN_ARG,
    VERBOSE, VERBOSE, -VERBOSE, -VERBOSE,
    NO_SEM, NO_SEM,
    DEFAULT_SEM, DEFAULT_SEM,
    PARSE_TREE_NUMBER, PARSE_TREE_NUMBER,
    TIME, TIME, -TIME, -TIME,
    STDIN,
    PRINT_PROD, PRINT_PROD,
    HELP,
    TRY_LOWER, TRY_LOWER,
    TRY_UPPER, TRY_UPPER,
    CAPITALIZED_INITIAL_UNKNOWN_WORD,
    LOWER_CASE_INITIAL_UNKNOWN_WORD,
    DIGIT_SEQUENCE,
    PARSE_FOREST, PARSE_FOREST,
    TIME_OUT, TIME_OUT,
    VIRTUAL_TIME_OUT, VIRTUAL_TIME_OUT,
    TAGGED_DAG, TAGGED_DAG,
    TAGGED_SDAG, TAGGED_SDAG,
    DAG_INPUT,
    UDAG_INPUT,
    SDAG_INPUT,
    STRING_INPUT,
    CHECK_RHS_SEQUENCES, CHECK_RHS_SEQUENCES,
    DYNAMIC_SET_AUTOMATON, DYNAMIC_SET_AUTOMATON,
    BEAM_VALUE, BEAM_VALUE,
    MAX_INPUT_SIZE, MAX_INPUT_SIZE,
    TMP_FILE_FOR_STDIN, TMP_FILE_FOR_STDIN,
}

Definition at line 157 of file sxearley_main.c.

Referenced by option_get_kind(), and option_get_text().

char* option_tbl[] [static]
Initial value:
 {
    "",
    "v", "verbose", "nv", "noverbose",
    "ns", "no_semantics",
    "ds", "default_semantics",
    "ptn", "parse_tree_number",
    "t", "time", "nt", "no_time",
    "stdin",
    "pp", "print_prod",
    "-help",
    "tl", "try_lower",
    "tu", "try_upper",
    "Uw",
    "uw",
    "digits",
    "pf", "parse_forest",
    "to", "time_out",
    "vto", "virtual_time_out",
    "td", "tagged_dag",
    "pos", "tagged_sdag",
    "dag",
    "udag",
    "sdag",
    "string",
    "crs", "check_rhs_sequences",
    "dsa", "dynamic_set_automaton",
    "b", "beam",
    "mis", "max_input_size",
    "tmp", "tmp_file_for_stdin",
}

Definition at line 126 of file sxearley_main.c.

Referenced by option_get_kind(), and option_get_text().

SXBOOLEAN sxtty_is_stderr

Definition at line 120 of file earley_parser.c.

Referenced by main(), and sxearley_main().

SXBOOLEAN tmp_file_for_stdin

Definition at line 119 of file earley_parser.c.

Referenced by earley_run(), and sxearley_main().

char Usage[] [static]

Definition at line 58 of file sxearley_main.c.

Referenced by sxearley_main().

char WHAT_SXEARLEY_MAIN[] = "@(#)SYNTAX - $Id: sxearley_main.c 1772 2009-11-02 14:52:57Z syntax $" WHAT_DEBUG

Definition at line 33 of file sxearley_main.c.


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