VMS Help  —  RTL Routines, LIB$  LIB$TPARSE
    The Table-Driven Finite-State Parser routine is a general-
    purpose, table-driven parser implemented as a finite-state
    automaton, with extensions that make it suitable for a wide
    range of applications. It parses a string and returns a message
    indicating whether or not the input string is valid.

    LIB$T[ABLE_]PARSE is called with the address of an argument
    block, the address of a state table, and the address of a keyword
    table. The input string is specified as part of the argument
    block.

    The LIB$ facility supports the following two versions of the
    Table-Driven Finite-State Parser:

    LIB$TPARSE       Available on VAX systems.
                     LIB$TPARSE is available on Alpha and I64
                     systems in translated form. In this form, it
                     is applicable to translated VAX images only.
    LIB$TABLE_PARSE  Available on VAX, Alpha, and I64 systems.

    LIB$TPARSE and LIB$TABLE_PARSE differ mainly in the way they pass
    arguments to action routines.

    The term LIB$T[ABLE_]PARSE is used here to describe concepts that
    apply to both LIB$TPARSE and LIB$TABLE_PARSE.

    Format

      LIB$TPARSE/LIB$TABLE_PARSE  argument-block ,state-table

                                  ,key-table

1  –  Returns

    OpenVMS usage:cond_value
    type:         longword (unsigned)
    access:       write only
    mechanism:    by value

2  –  Arguments

 argument-block

    OpenVMS usage:unspecified
    type:         unspecified
    access:       modify
    mechanism:    by reference

    LIB$T[ABLE_]PARSE argument block. The argument-block argument
    contains the address of this argument block.

    The LIB$T[ABLE_]PARSE argument block contains information about
    the state of the parse operation. It is a means of communication
    between LIB$T[ABLE_]PARSE and the user's program. It is passed as
    an argument to all action routines.

    You must declare and initialize the argument block.

    LIB$T[ABLE_]PARSE supports the following argument blocks:

    o  A 32-bit argument block that accommodates longword addresses,
       values, and input tokens on VAX, Alpha, and I64 systems.

       On Alpha and I64 systems, this argument block also
       accommodates a numeric token whose binary representation is
       less than or equal to 2**64.

    o  A 64-bit argument block that accommodates quadword addresses,
       values, and input tokens on Alpha and I64 systems.

 state-table

    OpenVMS usage:unspecified
    type:         unspecified
    access:       read only
    mechanism:    by reference

    Starting state in the state table. The state-table argument is
    the address of this starting state. Usually, the name appearing
    as the first argument of the $INIT_STATE macro is used.

    You must define the state table for your parser.
    LIB$T[ABLE_]PARSE provides macros in the MACRO and BLISS
    languages for this purpose.

 key-table

    OpenVMS usage:unspecified
    type:         unspecified
    access:       read only
    mechanism:    by reference

    Keyword table. The key-table argument is the address of this
    keyword table. This name must be the same as that which appears
    as the second argument of the $INIT_STATE macro.

    You must only assign a name to the keyword table. The
    LIB$T[ABLE_]PARSE macros allocate and define the table.
Close Help