Partilhar via


Resumo de expressões

  • primary-expression:
    identifier

    constant

    string-literal

    ( expression )

  • expression:
    assignment-expression

    expression , assignment-expression

  • constant-expression:
    conditional-expression

  • conditional-expression:
    logical-OR-expression

    logical-OR-expression ? expression : conditional-expression

  • assignment-expression:
    conditional-expression

    unary-expression assignment-operator assignment-expression

  • postfix-expression:
    primary-expression

    postfix-expression [ expression ]

    postfix-expression ( argument-expression-list opt )

    postfix-expression . identifier

    postfix-expression –> identifier

    postfix-expression ++

    postfix-expression ––

  • argument-expression-list:
    assignment-expression

    argument-expression-list , assignment-expression

  • unary-expression:
    postfix-expression

    ++ unary-expression

    –– unary-expression

    unary-operator

    cast-expression

    sizeof unary-expression

    sizeof ( type-name )

  • unary-operator: uma destas opções:
    & * + – ~ !

  • cast-expression:
    unary-expression

    ( type-name ) cast-expression

  • multiplicative-expression:
    cast-expression

    multiplicative-expression * cast-expression

    multiplicative-expression / cast-expression

    multiplicative-expression % cast-expression

  • expressão de adição:
    multiplicative-expression

    additive-expression + multiplicative-expression

    additive-expression multiplicative-expression

  • shift-expression:
    additive-expression

    shift-expression << additive-expression

    shift-expression >> additive-expression

  • expressão relacional:
    shift-expression

    relational-expression < shift-expression

    relational-expression > shift-expression relational-expression <= shift-expression

    relational-expression >= shift-expression

  • equality-expression:
    relational-expression

    equality-expression == relational-expression

    equality-expression != relational-expression

  • expressão AND:
    expressão de igualdade

    expressão AND & expressão de igualdade

  • expressão OR exclusiva:
    expressão AND

    expressão OR exclusiva ^ expressão AND

  • expressão OR inclusiva:
    expressão OR exclusiva

    expressão OR inclusiva: | expressão OR exclusiva

  • expressão AND lógica:
    expressão OR inclusiva:

    expressão AND lógica && expressão OR inclusiva

  • expressão OR lógica:
    expressão AND lógica

    expressão OR lógica || expressão AND lógica

Consulte também

Referência

Gramática de estrutura da frase