title: How is the conditional operator parsed?
body: <p>So, the <a href="https://en.cppreference.com/w/c/language/operator_precedence#cite_note-3" rel="nofollow noreferrer">cppreference</a> claims:</p>
  
  <blockquote>
    <p>The expression in the middle of the conditional operator (between ? and :) is parsed as if parenthesized: its precedence relative to ?: is ignored.<br/></p>
  </blockquote>
  
  <p>However, it appears to me that the part of the expression after the ':' operator is also parsed as if it were between parentheses. I've tried to implement the ternary operator in my programming language (and you can see the results of parsing expressions <a href="https://flatassembler.github.io/compiler.html" rel="nofollow noreferrer">here</a>), and my parser pretends that the part of the expression after ':' is also parenthesized. For example, for the expression <code>(1?1:0?2:0)-1</code>, the interpreter for my programming language outputs <code>0</code>, and this appears to be compatible with C. For instance, the C program:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main() {
      printf("%d\n",(1?1:0?2:0)-1);
  }
  </code></pre>
  
  <p>Outputs <code>0</code>.<br/>
  Had I programmed the parser of my programming language that, when parsing the ternary operators, simply take the first already parsed node after ':' and take it as the third operand to '?:', it would output the same as <code>((1?1:0)?2:0)-1</code>, that is <code>1</code>.<br/>
  My question is whether this would (pretending that the expression after the ':' is parenthesized) always be compatible with C?</p>