dan-gph
dan-gph

Reputation: 16909

Parser generator for Delphi?

Can anyone recommend a parser generator that will produce win32 Delphi code? What I'm trying to do is create a simple Domain-Specific Language.

Upvotes: 5

Views: 3195

Answers (5)

dan-gph
dan-gph

Reputation: 16909

I found Antlr For Delphi 3.1.1.

SharpPlus Antlr For Delphi Target 3.1.1, a language tool that provides a framework for constructing recognizers, interpreters, compilers with Delphi!

It is a commercial product. I have no idea what it is like.

Upvotes: 0

Alistair Ward
Alistair Ward

Reputation: 1093

How complex is your DSL?

I created a parser (in Delphi) for the new Delphi RIDL language to support some in-house COM generation tools we use.

My approach was to use ANTLR to play around with the syntax rules until I had something that parsed the various test files I had. I then hand-coded a recursive descent parser (based on the Java generated by ANTLR). I was also using the Castalia Delphi Parser in the project, so I based my lexical analyser on that.

Recursive descent parsers are actually really simple (but tedious :-) ) to write manually.

Upvotes: 5

Marco van de Voort
Marco van de Voort

Reputation: 26356

The Delphi versions of Coco/R are quite ok:

http://www.ssw.uni-linz.ac.at/Research/Projects/Coco/

most notably Pat Terry's one:

http://www.scifac.ru.ac.za/coco/

Upvotes: 5

jrodenhi
jrodenhi

Reputation: 2237

I have not tried this at all and I just noticed the information while I was reading through the documentation, but FastScript, in their documentation which you can get here, says that you can use their parser to create your own language which you specify in an XML file. This might give you something you can use.

Upvotes: 2

Andrej Kirejeŭ
Andrej Kirejeŭ

Reputation: 5481

Try this:

http://www.grendelproject.nl/dyacclex/

Upvotes: 4

Related Questions