On 16/10/2009 10:53, Florian Klaempfl wrote:
Marco van de Voort schrieb:
In our previous episode, J�rgen Hestermann said:
There is not even a proper open one for Delphi. At least there wasn't till a
while back.
That may be because it is no longer possible to write a BNF grammar for
these compilers due to the c-style extensions.
Odd that there are grammers for C and C++ then, and they have no problem :-)
Please don't grab any random other thread to make your point.
The reason is probably more because Wirthian languages traditionally use
recursive descent parsers.
gcc as well for several years simply because a recursive descent parser
is faster than one generated automatically from a BNF grammar.
A while back, I read "Compiler Construction", by Prof. Wirth, now
available for download:
http://www-old.oberon.ethz.ch/WirthPubl/CBEAll.pdf
It looks like recursive descent parsers and EBNF grammars go quite well
together, so having a recursive descent parser should not be a bar to
having a grammar.
Is the problem that you start off with a grammar, write the parser, then
maintain the parser without updating the grammar?
Frank
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal