Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!news.glorb.com!usenet.stanford.edu!news.iecc.com!nerds-end From: Hans-Peter Diettrich Newsgroups: comp.compilers Subject: Re: How to handle qualified identifiers such as x.y in a Pascal-like language Date: Wed, 22 Jun 2011 11:47:19 +0100 Organization: Compilers Central Lines: 18 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <11-06-039@comp.compilers> References: <11-06-037@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: gal.iecc.com 1308875417 66696 64.57.183.58 (24 Jun 2011 00:30:17 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Fri, 24 Jun 2011 00:30:17 +0000 (UTC) Posted-Date: 23 Jun 2011 20:30:17 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: x330-a1.tempe.blueboxinc.net comp.compilers:165 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