views:

44

answers:

2

Does anyone of you know if the BNF or EBNF of Turbo Pascal is available somewhere (LEGALLY!!)?

+3  A: 

Will Delphi 5 do?

Ignacio Vazquez-Abrams
Not really, sorry, because the goal is to compile TP 7.0 in the end. :-)
Turing Complete
@Turing Complete: Isn't there already a TP 7.0 compiler? Why do you want another?
Ira Baxter
Delphi is a superset of ObjectPascal.
Ignacio Vazquez-Abrams
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
@IgnacioTrue, you are right. I will accept your answer now, I checked the link and it's perfect. :-)
Turing Complete
Where did you get TP sources from?
el.pescado
+2  A: 

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