Re: How to handle qualified identifiers such as x.y in a Pascal-like language

Hans-Peter Diettrich <DrDiettrich1@aol.com>
Wed, 22 Jun 2011 11:47:19 +0100

          From comp.compilers

Related articles
How to handle qualified identifiers such as x.y in a Pascal-like langu noitalmost@cox.net (noitalmost) (2011-06-20)
Re: How to handle qualified identifiers such as x.y in a Pascal-like l torbenm@diku.dk (2011-06-22)
Re: How to handle qualified identifiers such as x.y in a Pascal-like l DrDiettrich1@aol.com (Hans-Peter Diettrich) (2011-06-22)
Re: How to handle qualified identifiers such as x.y in a Pascal-like l gene.ressler@gmail.com (Gene) (2011-06-22)
Re: How to handle qualified identifiers such as x.y in a Pascal-like l noitalmost@cox.net (noitalmost) (2011-06-23)
Re: How to handle qualified identifiers such as x.y in a Pascal-like l DrDiettrich1@aol.com (Hans-Peter Diettrich) (2011-06-24)
Re: How to handle qualified identifiers such as x.y in a Pascal-like l uu3kw29sb7@snkmail.com (\[Linux Magazine\]) (2011-06-24)
Re: How to handle qualified identifiers such as x.y in a Pascal-like l gneuner2@comcast.net (George Neuner) (2011-06-24)
Re: How to handle qualified identifiers such as x.y in a Pascal-like l gene.ressler@gmail.com (Gene) (2011-06-24)
[12 later articles]
| List of all articles for this month |

From: Hans-Peter Diettrich <DrDiettrich1@aol.com>
Newsgroups: comp.compilers
Date: Wed, 22 Jun 2011 11:47:19 +0100
Organization: Compilers Central
References: 11-06-037
Posted-Date: 23 Jun 2011 20:30:17 EDT

noitalmost schrieb:
> What I don't quite understand is how to parse access to a variable in
> an outer stack frame. And I think this is similar to the problem of
> nested procedures (which I also don't quite know how to handle).


First of all: local procedures using local variables in an *outer*
stackframe are problematic. Such a language feature deserves much
work, in detail when you also want to allow to use local procedures as
callbacks (procedure pointers). I'd drop that from my language.


Otherwise John already explained how to pass a reference to outer
stackspace(s) to the nested procedure, as an hidden parameter. But
this added parameter will disallow to give away references to the
local subroutine, because the caller then doesn't know about that
parameter.


DoDi



Post a followup to this message

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