POV-Ray : Newsgroups : povray.general : Who Not Make Naming Conflicts Disappear? : Re: Who Not Make Naming Conflicts Disappear? Server Time
31 Jul 2024 16:24:35 EDT (-0400)
  Re: Who Not Make Naming Conflicts Disappear?  
From: Randall Sawyer
Date: 6 Dec 2006 20:55:01
Message: <web.457773a4315c6ef0e81faf070@news.povray.org>
"Randall Sawyer" <sra### [at] yahoocom> wrote:

> Otherwise, perhaps there is a way to modify the aliasing algorithm to allow
> for 'membrane namespaces' to overlap, thus demanding that each include file
> in the tree be accessed only once.  Of course, if an author includes a file
> which is also included by another include file, then its namespace will
> have to be restored before the parser includes it in the root file.

Yes, that's it.

When you 'run' POV-Ray, it would first have to scan your file, then its
'#include'd files and then those files' '#include'd files and so on,
building a map of the 'includes tree'.

Then, it would run an algorithm to generate an 'alias table' based on the
'includes tree' - accounting for any redundant includes.

Then, as each include file is loaded into the buffer, its 'declaration
space' and 'implementation space' (if appropriate) would be aliased
according to the values in the 'alias table'.

The 'declaration space' of any immediate includes would not receive any
aliases (That would still be the author's responsibility).  Finally, the
whole assemblage would be parsed.

Now, you're good to go.

Did I overlook anything?

Well, talk is cheap.  I'd better get to work on a mock-up.

-Randall


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.