C99 での構文の意味がよくわかりません。ここで C99 と言うのは、ISO/IEC 9899:1999 を意味します。まあ、文法の構文部分は ANSI C、C89 からあまり変わっていないと思います。
この質問の例を見てみましょう:
6.5.5 Multiplicative operators
Syntax
multiplicative-expression:
cast-expression
multiplicative-expression * cast-expression
multiplicative-expression / cast-expression
multiplicative-expression % cast-expression
Constraints
Each of the operands shall have arithmetic type. The operands of the % operator
shall have integer type.
Semantics
The usual arithmetic conversions are performed on the operands.
The result of the binary * operator is the product of the operands.
The result of the / operator is the quotient
なぜ乗法演算子の構文に「キャスト式」があるのだろうか? そして、この構文はどのような文法を意味するのでしょうか? その質問で@Aviは
a*b*c
「cはキャスト式として解析する必要があります」、これはよくわかりません。
c99 6.6.1 の定数式の構文から別の例を見てみましょう。
Syntax
constant-expression:
conditional-expression
なぜこの条件式がここに出てくるのですか? 誰かがそれらの構文を説明する方法を教えてもらえますか? よろしくお願いします。