/*---------------------------------------------------------------------------*
 *  LRLOADD.d - LIBERO dialog data definitions for lrload.c.                 *
 *  Generated by LIBERO 2.20 on 31 Dec, 1996, 13:44.                         *
 *  Schema file used: lrschema.c.                                            *
 *---------------------------------------------------------------------------*/

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

#define _LR_STOP                        0xFFFFL
#define _LR_NULL_EVENT                  -2
enum {
    terminate_event = -1,
    comment_event = 0,
    error_event = 1,
    event_number_event = 2,
    item_name_event = 3,
    module_flag_event = 4,
    next_pointer_event = 5,
    no_more_event = 6,
    ok_event = 7,
    option_event = 8,
    state_name_event = 9,
    state_name_term_event = 10,
    superstate_ref_event = 11
};

enum {
    _LR_defaults_state = 9,
    _LR_STATE_after_init = 0,
    _LR_STATE_expect_state_name = 1,
    _LR_STATE_after_state = 2,
    _LR_STATE_expect_event_name = 3,
    _LR_STATE_expect_next_pointer = 4,
    _LR_STATE_after_next_pointer = 5,
    _LR_STATE_after_event = 6,
    _LR_STATE_after_module_flag = 7,
    _LR_STATE_after_module = 8,
    _LR_STATE_defaults = 9
};


/*- 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 attach_empty_module              (void);
MODULE attach_new_event                 (void);
MODULE attach_new_module                (void);
MODULE attach_new_state                 (void);
MODULE attach_next_state                (void);
MODULE attach_same_next_state           (void);
MODULE attach_uses_superstate           (void);
MODULE build_source_file_name           (void);
MODULE close_dialog_file                (void);
MODULE display_unexpected_token         (void);
MODULE expand_macro_constructs          (void);
MODULE expect_event_definition          (void);
MODULE expect_event_name                (void);
MODULE expect_module_name               (void);
MODULE expect_next_pointer              (void);
MODULE expect_state_definition          (void);
MODULE expect_state_name                (void);
MODULE get_next_token                   (void);
MODULE open_dialog_file                 (void);
MODULE process_comment_value            (void);
MODULE process_option_value             (void);
MODULE return_error_feedback            (void);
MODULE store_event_number               (void);
MODULE terminate_the_program            (void);
MODULE warning_on_state_name            (void);

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

static dbyte _LR_nextst [][12] =
{
    { 0,0,0,0,0,0,0,1,0,0,0,0 },
    { 0,0,0,2,0,0,0,0,0,2,0,0 },
    { 0,0,3,2,0,0,0,0,0,2,2,2 },
    { 0,0,0,4,0,0,0,0,0,0,0,0 },
    { 0,0,0,0,7,5,0,0,0,0,0,0 },
    { 0,0,3,6,7,0,5,0,0,2,0,0 },
    { 0,0,3,2,7,0,0,0,0,2,0,0 },
    { 0,0,3,8,0,0,7,0,0,2,0,0 },
    { 0,0,3,2,7,0,0,0,0,2,0,0 },
    { 9,9,9,9,9,9,9,0,9,9,9,9 }
};

static dbyte _LR_action [][12] =
{
    { 0,0,0,0,0,0,0,1,0,0,0,0 },
    { 0,0,0,3,0,0,0,0,0,2,0,0 },
    { 0,0,5,3,0,0,0,0,0,2,6,4 },
    { 0,0,0,7,0,0,0,0,0,0,0,0 },
    { 0,0,0,0,9,8,0,0,0,0,0,0 },
    { 0,0,12,10,9,0,13,0,0,11,0,0 },
    { 0,0,15,17,16,0,0,0,0,14,0,0 },
    { 0,0,15,18,0,0,19,0,0,14,0,0 },
    { 0,0,5,3,16,0,0,0,0,2,0,0 },
    { 22,23,20,20,20,20,24,0,21,20,20,20 }
};

static dbyte _LR_vector [][6+1] =
{
    {0},
    {18,16,17,_LR_STOP},
    {3,15,17,_LR_STOP},
    {24,3,15,17,_LR_STOP},
    {6,15,17,_LR_STOP},
    {22,12,17,_LR_STOP},
    {17,_LR_STOP},
    {1,14,17,_LR_STOP},
    {11,17,_LR_STOP},
    {5,13,17,_LR_STOP},
    {4,17,_LR_STOP},
    {5,0,3,15,17,_LR_STOP},
    {5,0,22,12,17,_LR_STOP},
    {5,0,10,7,8,23,_LR_STOP},
    {0,3,15,17,_LR_STOP},
    {0,22,12,17,_LR_STOP},
    {13,17,_LR_STOP},
    {0,24,3,15,17,_LR_STOP},
    {2,17,_LR_STOP},
    {0,10,7,8,23,_LR_STOP},
    {9,8,21,23,_LR_STOP},
    {20,17,_LR_STOP},
    {19,17,_LR_STOP},
    {8,21,23,_LR_STOP},
    {10,7,8,23,_LR_STOP}
};

static fsmfunct *_LR_module [] =
{
    attach_empty_module,
    attach_new_event,
    attach_new_module,
    attach_new_state,
    attach_next_state,
    attach_same_next_state,
    attach_uses_superstate,
    build_source_file_name,
    close_dialog_file,
    display_unexpected_token,
    expand_macro_constructs,
    expect_event_definition,
    expect_event_name,
    expect_module_name,
    expect_next_pointer,
    expect_state_definition,
    expect_state_name,
    get_next_token,
    open_dialog_file,
    process_comment_value,
    process_option_value,
    return_error_feedback,
    store_event_number,
    terminate_the_program,
    warning_on_state_name
};

