CFGs vs. "declare variable before use"

"Edsko de Vries" <devriese@cs.tcd.ie>
26 May 2005 23:12:01 -0400

          From comp.compilers

Related articles
CFGs vs. "declare variable before use" devriese@cs.tcd.ie (Edsko de Vries) (2005-05-26)
Re: CFGs vs. "declare variable before use" wyrmwif@tsoft.org (SM Ryan) (2005-05-28)
Re: CFGs vs. "declare variable before use" mefrill@yandex.ru (mefrill) (2005-05-28)
Re: CFGs vs. "declare variable before use" torbenm@diku.dk (2005-05-28)
Re: CFGs vs. "declare variable before use" cfc@shell01.TheWorld.com (Chris F Clark) (2005-05-28)
Re: CFGs vs. "declare variable before use" torbenm@diku.dk (2005-05-31)
Re: CFGs vs. "declare variable before use" gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-05-31)
[6 later articles]
| List of all articles for this month |
From: "Edsko de Vries" <devriese@cs.tcd.ie>
Newsgroups: comp.compilers
Date: 26 May 2005 23:12:01 -0400
Organization: http://groups.google.com
Keywords: parse, question
Posted-Date: 26 May 2005 23:12:01 EDT

Hi,


A common statement I read about the limitations of CFGs is that they
cannot be used to express the requirement that "variables must be
declared before they are used". However, I have been unable to find
any formal justifications for this statement (e.g., in the style of
the proof using the pumping lemma that a^n b^n c^n is not a context
free language). Could anyone point me to some relevant literature?
Also, are people aware of any other limitations of CFGs, esp. in the
context of (the semantics of) programming languages, such as the one I
mentioned, preferably with proofs?


Thanks,


Edsko


Post a followup to this message

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