fdoc

subroutineparse_unaryrecursiveprivate

recursive subroutine parse_unary(c, s, id)

A factor, perhaps negated.

Arguments

NameTypeIntentAttributesDescription
ctype(fypp_t)inout

the state

stype(scan_t)inout

the expression

idintegerout

the result

Calls

Source

Show the code
recursive subroutine parse_unary(c, s, id)
    type(fypp_t), intent(inout) :: c    !! the state
    type(scan_t), intent(inout) :: s    !! the expression
    integer, intent(out) :: id          !! the result
    integer :: operand

    if (at_word(s, '-')) then
        call next_token(c, s)
        call parse_unary(c, s, operand)
        id = new_expr(c, E_NEG, operand)
    else
        call parse_postfix(c, s, id)
    end if
end subroutine parse_unary

Graphs

Calls

Called by