Re: Semantics in Delphi yacc

"Eric" <>
15 Mar 2006 22:13:24 -0500

          From comp.compilers

Related articles
Semantics in Delphi yacc (Pepe Gerloc) (2006-03-14)
Re: Semantics in Delphi yacc (Hans-Peter Diettrich) (2006-03-15)
Re: Semantics in Delphi yacc (Marco van de Voort) (2006-03-15)
Re: Semantics in Delphi yacc (Eric) (2006-03-15)
| List of all articles for this month |

From: "Eric" <>
Newsgroups: comp.compilers
Date: 15 Mar 2006 22:13:24 -0500
References: 06-03-051
Keywords: Basic, yacc
Posted-Date: 15 Mar 2006 22:13:24 EST

Do yourself a very big favor and use Coco/R, the Delphi Parser
Generator, or ANTLR. All of these have proven Delphi support. But they
all use LL(1) or LL(K) parsing, which is different than LALR as used by
yacc. These create recursive descent parsers. These are a little
slower, but easy to debug by tracing at runtime.

If you must use LALR (because you already have familiarity with it),
then try the Gold parser generator. This also has Delphi support, I
think. This family of yacc-like tools generates table-driven parsers.
These are fast, but difficult to debug.

I love the simplicity of Coco/R - you can write attributes in your
grammer that control how the parse tree is created at runtime. This
saves a ton of code and has a lot of elegance.

I think the other tools I mentioned may support an attributed grammer,
too. I don't have any real experience with those tools.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.