Delphi 2009 syntax; not official, but a great start and complement to DelphiAST
Posted by jpluimers on 2018/01/30
A while ago, I found out that [WayBack] Toon Krijthe made a [Archive.is] Delphi 2009 syntax sample which is a great complement to the DelphiAST parser given that Borland/CodeGear/Embarcadero/Idera never published one in the 22+years that Delphi is alive.
–jeroen
dennis said
the antlr delphi grammar looks good as well:
https://github.com/fabriciocolombo/sonar-delphi/blob/master/src/main/antlr3/org/sonar/plugins/delphi/antlr/Delphi.g
dennis said
Doesn’t look 100% correct just by looking at one of the first lines:
Program : [ ProgramHead ] , [ UsesFileClause ] , Block , “,”
shouldn’t the last one read “.” instead of “,” ?
rvelthuis said
Yes, that should definitely be a “.”.
thaddy said
There was a Delphi 7 grammar published by Borland/Inprise, but not complete and merely served as documentation.
In itself it was the basis of more complete – and working – Delphi grammars. You should find it on the Delphi7 disks if you have D7 architect or enterprise still around. (Which I suppose you do..) It is somewhere in the help files.
HeartWare said
IIRC there was a syntax diagram in one of the manuals (at the time where manuals were delivered with the product). Can’t remember if this was in Delphi’s time, or if it was before Delphi 1.0
jpluimers said
I think that was way back in the Turbo Pascal manuals. It was relatively complete, but then the Delphi changes came along (: