I can't quite understand what the syntax mean in C99. Here by saying C99 I mean ISO/IEC 9899:1999. Well, I think the grammar syntax part doesn't change much since ANSI C, C89.
Take for an example from this question:
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
I wonder why in the syntax of multiplicative operators we have a "cast-expression" ? And what grammar can this syntax imply? In that question @Avi said that in
a*b*c
"c must be parsed as a cast-expression", I can't quite understand this.
Take another example from c99 6.6.1,the syntax of constant expressions
Syntax
constant-expression:
conditional-expression
why this conditional-expression come up here? Can someone show me how to explain those syntax? Thank you all in advance.