Related articles |
---|
Semantics in Delphi yacc kr_01@gigamail.com (Pepe Gerloc) (2006-03-14) |
Re: Semantics in Delphi yacc DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-03-15) |
Re: Semantics in Delphi yacc marcov@stack.nl (Marco van de Voort) (2006-03-15) |
Re: Semantics in Delphi yacc englere.geo@yahoo.com (Eric) (2006-03-15) |
From: | "Eric" <englere.geo@yahoo.com> |
Newsgroups: | comp.compilers |
Date: | 15 Mar 2006 22:13:24 -0500 |
Organization: | http://groups.google.com |
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.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.