Related articles |
---|
[11 earlier articles] |
Re: Syntax diagram driven parser sebmol@gmx.net (Sebastian Moleski) (2000-10-01) |
Re: Syntax diagram driven parser irobot@swbell.net (Brian Webb) (2000-10-01) |
Re: Syntax diagram driven parser vbdis@aol.com (2000-10-01) |
Re: Syntax diagram driven parser vbdis@aol.com (2000-10-08) |
Re: Syntax diagram driven parser vbdis@aol.com (2000-10-08) |
Re: Syntax diagram driven parser aaron1000@webtv.net (2000-10-08) |
Re: Syntax diagram driven parser joachim_d@gmx.de (Joachim Durchholz) (2000-10-10) |
Re: Syntax diagram driven parser vbdis@aol.com (2000-10-12) |
From: | "Joachim Durchholz" <joachim_d@gmx.de> |
Newsgroups: | comp.compilers |
Date: | 10 Oct 2000 00:53:48 -0400 |
Organization: | Compilers Central |
References: | 00-10-013 00-10-037 |
Keywords: | parse, tools |
VBDis <vbdis@aol.com> wrote:
>
> The resulting grammar uses my own extensions to BNF, with context
> variables.
Ah. This sounds similar van Wijngaarden Two-Level grammars. These are
context-sensitive, just like your grammar is. They can also be used
to express typing constraints, so you wrote something much more
powerful than you might have intended.
> In the OPL syntax also cases exist, where the kind of a symbol is
> important, whether it represents e.g. a constant value, a module name
> etc. I'm not very familiar with theory of grammars, but I doubt that
> a parser would be able to determine the kind of a symbol, which is
> imported from another module, and thus *cannot* know which syntax rule
> to use.
Hmmm... you'd have to parse the imported module as well to gain that
information. Or learn how to decipher the format of compiled Delphi
modules.
Yuck.
I don't know the actual Delphi syntax and what you're exactly trying to
do. It might be a good idea to write a grammar that's context free and
occasionally accepts a grammatically wrong Delphi program. (That's the
classical approach for add-on tools that are not compilers in
themselves.)
Regards,
Joachim
Return to the
comp.compilers page.
Search the
comp.compilers archives again.