I am not completely sure I have understood what you're saying but, the thing about terminators and separators doesn't just affect the "if/then/else" statement, it affects the entire grammar.
Yes there are plenty of differences caused by the difference between terminator and separator.
Not been talking about them, I tried to make this clear:
The part, my response is tailored too, is that the potentially "if/then" related "source of confusion for Pascal newcomers" is the difference between terminator and separator.
This thread was about the if/then stuff. I only state:
- The absence of a ";" for
- an empty statement (or even after a none empty statement)
- between "then" and "else" of an "if"
- This absence is not (or at least not only; and in my opinion: not primarily) due to the terminator/separator difference.
- This absence is first/before caused by the definition of "if then else" being a statement (see the fpc docs)
Both (a terminator or separator) would break the "one statement" definition of the "if then else".
Yes, you could allow terminators for sub-statement within the overall "if then else" statement.
But you also need to drop the requirement that "if then else" has a terminator of its own, or it will be "if a then b; else c; ;" (2 final terminators).
But (in a scenario with stmt terminators) a statement should have a terminator. If not, would it still be a statement? So by those changes the definition of "if then else" as a statement would have been voided.
And hence, before the terminator/separator difference matters (in this one and specific context), other definitions must be changed first.