/*---------------------------------------------------------------------------*
 *  LRCODED.d - LIBERO dialog data definitions for lrcode.c.                 *
 *  Generated by LIBERO 2.30 on  3 Jul, 1997, 11:49.                         *
 *  Schema file used: lrschema.c.                                            *
 *---------------------------------------------------------------------------*/

/*- Symbolic constants and event numbers ------------------------------------*/

#define _LR_STOP                        0xFFFFL
#define _LR_NULL_EVENT                  -2
enum {
    terminate_event = -1,
    close_event = 0,
    comment_event = 1,
    copy_event = 2,
    declare_event = 3,
    delete_event = 4,
    do_event = 5,
    done_event = 6,
    echo_event = 7,
    else_event = 8,
    enddo_event = 9,
    endif_event = 10,
    error_event = 11,
    exit_event = 12,
    extend_event = 13,
    false_event = 14,
    file_exists_event = 15,
    finished_event = 16,
    have_else_event = 17,
    if_event = 18,
    ignore_event = 19,
    include_event = 20,
    internal_event = 21,
    ok_event = 22,
    option_event = 23,
    output_event = 24,
    pop_event = 25,
    push_event = 26,
    rename_event = 27,
    set_event = 28,
    source_line_event = 29,
    substr_event = 30,
    true_event = 31
};

enum {
    _LR_defaults_state = 4,
    _LR_STATE_after_init = 0,
    _LR_STATE_have_schema_line = 1,
    _LR_STATE_after_test_do = 2,
    _LR_STATE_after_test_if = 3,
    _LR_STATE_defaults = 4
};


/*- Variables used by dialog interpreter ------------------------------------*/

typedef int event_t;                    /*  Type for dialog entity           */
typedef void (fsmfunct) (void);         /*  Address of FSM function          */

static event_t
    _LR_event,                          /*  Event for state transition       */
    _LR_state,                          /*  Current dialog state             */
    _LR_savest,                         /*  Saved dialog state               */
    _LR_index,                          /*  Index into vector table          */
    the_next_event,                     /*  Next event from module           */
    the_exception_event;                /*  Exception event from module      */

static dbyte
   *_LR_vecptr;                         /*  Pointer into vector table        */

static Bool
    exception_raised;                   /*  TRUE if exception raised         */

/*- Function prototypes -----------------------------------------------------*/

#ifndef MODULE
#define MODULE  static void             /*  Libero dialog modules            */
#endif

local  raise_exception                  (event_t event);
MODULE initialise_the_program           (void);
MODULE get_external_event               (void);
MODULE alloc_symbol_table               (void);
MODULE assign_variable_value            (void);
MODULE check_do_block_is_open           (void);
MODULE check_do_is_not_reentrant        (void);
MODULE check_if_block_is_open           (void);
MODULE check_if_else_defined            (void);
MODULE check_output_opened              (void);
MODULE close_do_block_level             (void);
MODULE close_if_block_level             (void);
MODULE close_output_file                (void);
MODULE close_schema_file                (void);
MODULE copy_specified_file              (void);
MODULE declare_user_variable            (void);
MODULE delete_specified_file            (void);
MODULE free_symbol_table                (void);
MODULE get_next_schema_line             (void);
MODULE include_specified_file           (void);
MODULE open_do_block_level              (void);
MODULE open_extend_file                 (void);
MODULE open_if_block_level              (void);
MODULE open_output_file                 (void);
MODULE open_schema_file                 (void);
MODULE output_line_of_source            (void);
MODULE parse_do_block                   (void);
MODULE parse_if_block                   (void);
MODULE parse_internal_module_name       (void);
MODULE parse_option_value               (void);
MODULE parse_substring_specification    (void);
MODULE pop_variable_value               (void);
MODULE push_variable_value              (void);
MODULE rename_specified_file            (void);
MODULE return_error_feedback            (void);
MODULE set_exit_code_if_any             (void);
MODULE skip_to_do_block_end             (void);
MODULE skip_to_do_block_start           (void);
MODULE skip_to_if_block_else            (void);
MODULE skip_to_if_block_end             (void);
MODULE skip_to_if_block_start           (void);
MODULE terminate_the_program            (void);
MODULE test_do_conditions               (void);
MODULE test_if_conditions               (void);
MODULE trace_symbols_if_wanted          (void);
MODULE write_message_to_stdout          (void);

/*- Static areas ------------------------------------------------------------*/

static dbyte _LR_nextst [][32] =
{
    { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0
     ,0,0
    },
    { 1,1,1,1,1,2,0,1,1,2,1,0,1,1,0,1,1,0,3,0,1,1,0,1,1,1,1,1,1,1
     ,1,0
    },
    { 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,0,0,0,0,0,0,0
     ,0,0
    },
    { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
     ,0,1
    },
    { 0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
     ,0,0
    }
};

static dbyte _LR_action [][32] =
{
    { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,1,0,0,0,0,0,0,0
     ,0,0
    },
    { 9,3,12,6,13,20,0,14,23,21,24,0,25,8,0,26,26,0,22,0,10,19,0,5
     ,7,17,16,11,15,4,18,0
    },
    { 0,0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,27,0,0,0,0,0,0
     ,0,0,0
    },
    { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,32,0,0,0,0,0,0,0,0,0,0,0
     ,0,0,30
    },
    { 0,0,0,0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
     ,0,0
    }
};

static dbyte _LR_vector [][6+1] =
{
    {0},
    {0,21,15,_LR_STOP},
    {38,_LR_STOP},
    {15,_LR_STOP},
    {22,15,_LR_STOP},
    {26,15,_LR_STOP},
    {12,15,_LR_STOP},
    {20,15,_LR_STOP},
    {18,15,_LR_STOP},
    {6,9,15,_LR_STOP},
    {16,15,_LR_STOP},
    {30,15,_LR_STOP},
    {11,15,_LR_STOP},
    {13,15,_LR_STOP},
    {42,15,_LR_STOP},
    {1,15,_LR_STOP},
    {29,15,_LR_STOP},
    {28,15,_LR_STOP},
    {27,15,_LR_STOP},
    {25,15,_LR_STOP},
    {17,23,3,39,_LR_STOP},
    {2,39,_LR_STOP},
    {19,24,40,_LR_STOP},
    {4,36,8,15,_LR_STOP},
    {4,8,15,_LR_STOP},
    {32,9,10,41,14,38,_LR_STOP},
    {9,10,41,14,38,_LR_STOP},
    {34,15,_LR_STOP},
    {39,_LR_STOP},
    {33,7,15,_LR_STOP},
    {37,15,_LR_STOP},
    {5,36,8,15,_LR_STOP},
    {35,15,_LR_STOP},
    {9,10,41,31,14,38,_LR_STOP}
};

static fsmfunct *_LR_module [] =
{
    alloc_symbol_table,
    assign_variable_value,
    check_do_block_is_open,
    check_do_is_not_reentrant,
    check_if_block_is_open,
    check_if_else_defined,
    check_output_opened,
    close_do_block_level,
    close_if_block_level,
    close_output_file,
    close_schema_file,
    copy_specified_file,
    declare_user_variable,
    delete_specified_file,
    free_symbol_table,
    get_next_schema_line,
    include_specified_file,
    open_do_block_level,
    open_extend_file,
    open_if_block_level,
    open_output_file,
    open_schema_file,
    output_line_of_source,
    parse_do_block,
    parse_if_block,
    parse_internal_module_name,
    parse_option_value,
    parse_substring_specification,
    pop_variable_value,
    push_variable_value,
    rename_specified_file,
    return_error_feedback,
    set_exit_code_if_any,
    skip_to_do_block_end,
    skip_to_do_block_start,
    skip_to_if_block_else,
    skip_to_if_block_end,
    skip_to_if_block_start,
    terminate_the_program,
    test_do_conditions,
    test_if_conditions,
    trace_symbols_if_wanted,
    write_message_to_stdout
};

