We help IT Professionals succeed at work.

About delphi 1--6 grammar documents!

shenqw
shenqw asked
on
Hello,everyone, I need the delphi 1--6 grammar documents.
Best in BNF format.  (The Object pascal garmmar in " Object pascal help" is very simple, I need another document.).
  Please help me out.  Thanks!


shenqw
Comment
Watch Question

Commented:
Delphi 6 (finally) comes with complete Object Pascal grammar in a EBNF-like notation, have you seen it?
The help topic is "Object Pascal grammar" in Delphi 6 "Object Pascal Language Guide" help file: del6op.hlp.
HTH
TOndrej

Author

Commented:
Hi, TOndrej.
  Yes, I had seen it. But i find it has many faults.
also , It's so simple, I want more details about the grammar.

i.e :

Parameter -> IdentList  [':' ([ARRAY OF] SimpleType | STRING | FILE)]

          -> Ident ':' SimpleType '=' ConstExpr


SimpleType -> (OrdinalType | RealType)
OrdinalType -> (SubrangeType | EnumeratedType | OrdIdent)


use thid BNF. In delphi app, the follow code can't been
compliered.

//************begin**********************
procedure Test(const T:array of TMessage);
//************end************************



shenqw


Commented:
OK. But TMessage is not a SimpleType; it's a record type.

Author

Commented:
So I need another document about the grarmmar.

Commented:
I was looking for the very same thing some weeks ago, and I ended up with some error-checked versions of the contents of the help file grammar description. Since OP is proprietary, the exact language internals and documentations are mostly only known to Borland. Sorry I couldn't be of more help.
Commented:
You're right, the grammar is not complete. :-(

I've briefly searched the Web, but most of the links were newsgroup questions like 'Where can I find Object Pascal grammar?' - it looks like there is no official, complete grammar available.

With that in mind, you can still have a look here:

http://www.stud.mw.tu-muenchen.de/~rz1/Grammar.html

HTH
TOndrej

Author

Commented:
 thinks, TOndrej .
  Anybody has more Info.?

shenqw

Commented:
TOndrej, actually these were the pages where I found the grammar myself when I was looking for it. I guess there just isn't much more available.

Commented:
Wouldn't it be great if someone could create a complete documentation of Object Pascal grammar?
I guess it can take quite a long time, but would be extremely helpful for lots of people...
As for myself, I don't have the time, sorry <sigh>.

Commented:
Yeah, that would be nice, but a very huge task - the language has been enhanced a lot since Delphi 1 and it would take lots of research and work to create an accurate documentation. And I don't have this kind of time either.

Author

Commented:
Thanks for TOndrej.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.