Re: Include system

new topic     » goto parent     » topic index » view thread      » older message » newer message

Chris Bensler wrote:
> ags wrote:
> > I've just had a thought about the include system, well an observation
> > really.
> > 
> > A program in a sub folder of an include file can say something like:
> > }}}
<eucode>
> > include ..\file_one.e
> > </eucode>
{{{

> > Which sucessfully includes a file from one directory level up.
> > 
> > But if that file_one.e includes another file from the folder it is in, eg
> > file_two.e,
> > the interpreter will not be able to locate it.
> > 
> > What is to stop the interpreter automatically searching the folder an
> > include
> > is actually in for any includes that file looks for?
> > 
> > Or would this break things? (even more blink
> > 
> > I say this because of making library distributions--if you want to keep any
> > demos in a sub folder you would want to include ..\something.ew (or include
> > ..\include\something.ew) but if that file in turn includes stuff then things
> > get broken.
> > 
> > Gary
> 
> No, it wouldn't break anything.
> I beleive this issue is one of the final frontiers for the evolution of  Eu's
> physical include system, and I've been suggesting (or wanting to, I can't
> remember
> though I'm sure I mentioned it at least a few times) it for a long time. I
> never
> really pushed it though since it first required being able to use subfolders
> for includes, which is only officially possible since 3.0.
> 
> I've implemented it in my preprocessor and I'm trying to implement it in the
> Eu opensource, if I can ever manage to spend enough time to figure out Robs
> code.
> 
> Here is how it works in my preprocessor to give an idea for those who may not
> understand what is being talked about. Maybe someone else with more experience
> with the Eu source code can implement it...
> 
> All I do in my preprocessor is keep track of the active include folder.
> 
> Currently Eu searches for includes
> 1. in the program folder
> 2. in the EUINC paths
> 3. in EUDIR/include path
> 
> With relative include paths Eu would search
> 1. in the active include folder
> 2. in the program folder
> 3. in the EUINC paths
> 4. in the EUDIR/include path

I have no objections in principle to this change.
If you (Chris Bensler) would like to do it, I can give you
developer permissions on SourceForge. Maybe you should
let other people on EUforum comment on it first before
you proceed. You might also want to be more specific about the
algorithm before coding it. Since this is a front-end only issue,
someone could make this change without any knowledge 
of the C backend. This would be a good exercise for someone
who wants to get familiar with modifying Euphoria under 
SVN (subversion) control on SoureForge.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu