Does anyone of you know if the BNF or EBNF of Turbo Pascal is available somewhere (LEGALLY!!)?
Asked
Active
Viewed 934 times
2 Answers
3
Will Delphi 5 do?

Ignacio Vazquez-Abrams
- 776,304
- 153
- 1,341
- 1,358
-
Not really, sorry, because the goal is to compile TP 7.0 in the end. :-) – Turing Complete Jul 06 '10 at 09:35
-
@Turing Complete: Isn't there already a TP 7.0 compiler? Why do you want another? – Ira Baxter Jul 06 '10 at 09:41
-
Delphi is a superset of ObjectPascal. – Ignacio Vazquez-Abrams Jul 06 '10 at 09:43
-
Ira, the idea is to compile TP 7.0 with a very sophisticated runtime environment that even simulates part of the hardware into IL. – Turing Complete Jul 06 '10 at 09:44
-
@Ignacio True, you are right. I will accept your answer now, I checked the link and it's perfect. :-) – Turing Complete Jul 06 '10 at 09:45
-
Where did you get TP sources from? – el.pescado - нет войне Jul 06 '10 at 10:25
-
Note that the Delphi grammars are afaik not the exact grammar used, but just for documentation purposes. – Marco van de Voort Jul 28 '11 at 20:29
-
@Turing Complete: Are you done with it (TP7 grammar & the runtime environment)? – menjaraz Jan 03 '12 at 11:05
2
The DMS Software Reengineering Toolkit is a commercial platform for building program analysis and transformation tools. It is configured by providing it with an explicit BNF grammar for the langauge to be processed.
DMS can be obtained with a Delphi 6 front end. This has been used to implement AOP for Delphi.
Building other dialects is straightforward.
EDIT: (respond to comment by OP on another answer): DMS would be a very convenient platform on which to build a compiler.

Ira Baxter
- 93,541
- 22
- 172
- 341