mime::addr_routeaddr (private)

 mime::addr_routeaddr token [ checkP ]

Defined in packages/acs-tcl/tcl/tcllib-doc-procs.tcl

Parse a route address using internal MIME parser state.

Parameters:
token (required)
Internal address-parser token.
checkP (optional, defaults to "1")
Whether to require a closing angle bracket.

Partial Call Graph (max 5 caller/called nodes):
mime::addr_phrase mime::addr_phrase (private) mime::addr_routeaddr mime::addr_routeaddr mime::addr_phrase->mime::addr_routeaddr mime::addr_specification mime::addr_specification (private) mime::addr_specification->mime::addr_routeaddr mime::addr_domain mime::addr_domain (private) mime::addr_routeaddr->mime::addr_domain mime::addr_local mime::addr_local mime::addr_routeaddr->mime::addr_local mime::addr_route mime::addr_route mime::addr_routeaddr->mime::addr_route mime::parselexeme mime::parselexeme (private) mime::addr_routeaddr->mime::parselexeme

Testcases:
No testcase defined.
Source code:
    # FRINK: nocheck
    variable $token
    upvar 0 $token state

    set lookahead $state(input)
    if {[parselexeme $token] eq "LX_ATSIGN"} {
        #TODO: this path is not covered by tests
        mime::addr_route $token
    } else {
        set state(input) $lookahead
    }

    mime::addr_local $token

    switch -- $state(lastC) {
        LX_ATSIGN {
            mime::addr_domain $token
        }

        LX_SEMICOLON
            -
        LX_RBRACKET
            -
        LX_COMMA
            -
        LX_END {
        }

        default {
            return -code 7 [
                format "expecting at-sign after local-part (found %s)"  $state(buffer)]
        }
    }

    if {($checkP) && ($state(lastC) ne "LX_RBRACKET")} {
        return -code 7 [
            format "expecting right-bracket (found %s)" $state(buffer)]
    }

    return 1
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: