On Fri, 15 Dec 2023, Adriaan van Os wrote:
Michael Van Canneyt via fpc-pascal wrote:
The fact that the semicolon before the else is optional ?
I don't see a semicolon in the formal syntax.
This works:
OK, than an optional semicolon must be added to the <exceptionhandlers> rule
exceptionhandlers = [ exception-handler { ";" exception-handler } [ ";" ] [
"ELSE" statement-list ] | statement-list ] .
Well, you can have ;;;;; as well.
It means exception-handler can be empty in your repeat:
{ ';' [exception-handler] }
Or the whole ; is simply sloppyness on the part of the compiler.
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal