fdoc

subroutinecompileprivate

subroutine compile(c, text, id)

Compile expression text.

Arguments

NameTypeIntentAttributesDescription
ctype(fypp_t)inout

the state

textcharacter(len=*)in

the expression

idintegerout

the result

Calls

Source

Show the code
subroutine compile(c, text, id)
    type(fypp_t), intent(inout) :: c        !! the state
    character(len=*), intent(in) :: text    !! the expression
    integer, intent(out) :: id              !! the result
    type(scan_t) :: s

    id = index_find(c%compiled, text)
    if (id > 0) return
    s%text = text
    call next_token(c, s)
    call parse_list(c, s, id)
    if (s%kind /= T_END) call fail(c, 'cannot read the expression: '//text)
    if (id > 0) call index_set(c%compiled, text, id)
end subroutine compile

Graphs

Calls

Called by