Sven Barth schrieb:

A semicolon has the problem that you need to distinguish between it being a modifier and a normal following identifier as not every keyword is a keyword in every context (like for example "read" and "write" for properties).

In this discussion I almost miss the elementary distinction between keywords (reserved words) and directives. Unlike keywords, directives are context sensitive and can be used as identifiers in all other places. That's why directives should *follow* identifiers, never precede them.

The semicolon usage is not well designed in Delphi, additional (intermediate) semicolons are not required and should be banned. Then the parser can continue to search for directives until the end of an applicable construct (declaration...) is found, which may be a semicolon or something else (comma, parenthesis...), depending on the construct syntax.

DoDi

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to