I need a complete Object Pascal syntax (preferably Delphi 2009). Some of the syntax is given by the help files, but not all information is provided. So I started collecting loose bits of information. Recently I added these to a more or less complete syntax description (EBNF like).
Although it looks extensive, there are still bugs and I'm sure parts are missing (specially in the .NET syntax). So I'm asking the SO Delphi community. Do you have any information or can you correct the errors? In return I provide the complete syntax to the community. It probably saves you some time ;-). In the future, I like to do the same for other languages (Like C#/C++/Java).
The syntax description I already have is given: My Syntax sofar. Or if you like a Text version. (The XHTML is generated from the text version).
Please note that the syntax focusses on the syntactical part, because the lexical part is not really a problem.
Update
I have a new version of the Delphi Syntax. html version. It includes al versions including 2009. Prism extentions are still on the todo list. And I'm not sure if I'm going to keep them together.
For the real purists, it also contains the full assembler code (which does not support the full 100% of the intel set but only a few instructions are missed.).
You could always read the source to the Free Pascal Compiler. It supports Object Pascal.
What exactly are the bugs and functionality you're missing?
From scanning over your document, it seems you mingle syntax and semantics. I do not understand why to distinguish between SimpleTypeFloat and SimpleTypeOrdinal on a syntactic level, or code operator precedence as syntactic feature in AddOp and MulOp. true, false, nil are identifiers just as any variable name you choose.
There is no complete, published syntax for Delphi. Bear in mind that .net and win32 delphi have different syntaxes.
This project has hand-build Delphi parser in it. And lots of test cases of code that compiles but pushes the limits of the syntax.
This might be a good help. It is the parser used in TwoDesk's Castalia.
Try this: DGrok - Delphi grammar
Delphi 7's grammar is in the back of the Object Pascal book.
You mean for a few thousand dollars they don't even send you that? Do they even send you a 6' x 6' poster?