[fpc-pascal] Parser Generator

Marc Santhoff M.Santhoff at web.de
Fri May 20 10:53:45 CEST 2016


On Fr, 2016-05-20 at 08:38 +0000, Mark Morgan Lloyd wrote:
> Marc Santhoff wrote:
> > On Do, 2016-05-19 at 13:10 +0200, Torsten Bonde Christiansen wrote:
> > 
> >> * GOLD Parser: http://www.goldparser.org/
> 
> >> * COCO/R: http://www.ssw.uni-linz.ac.at/Research/Projects/Coco/
> 
> >> * TP Yacc/Lex: (included in Free Pascal)
> 
> > http://www.atocc.de/cgi-bin/atocc/site.cgi?lang=en&site=main
> > 
> > Sorry, I had no time to test it yet.
> 
> "For target code generation you need to specify code fragments for each 
> rule in VCC."

Örks. Didn't read that.

> I think the important thing for all of these is that they still assume a 
> lot of hard work from the person defining the custom syntax. They're not 
> a magic bullet.

There are some tools I liked very much when dealing with language
translation in the past, but they don't fit her. None of them generates
Pascal Code out of the box.

ANTLR3 was my favourite, generating tree walkers with little extra work
(iirc). But it generates Java code.

> For the last 30 years or so I've been using a compiler compiler 
> originally written in 1964, the implementation has matured as different 
> pascal compilers have become available. I'm not suggesting that this is 
> usable in the general case, but looked at objectively it does allow me 
> to make gross behavioural changes fairly easily, e.g. to define novel 
> string properties and to embed pragmata in comments.

Beautiful. Would you mind disclosing the name of that fine tool? ;)

Marc





More information about the fpc-pascal mailing list