John Darrington <[EMAIL PROTECTED]> writes:

> I wonder if it would be a good idea to allow strings to be shell
> expanded.   For example, it would be convenient to be able to write:
>
> GET FILE='$HOME/foo.sav'.
>
> instead of 
>
> GET FILE='/home/john/foo.sav'.

It does sound convenient.

> On the other hand, it makes it slightly incompatible.  Also strings
> which represent data should probably not be expanded, which would mean
> that somehow the syntax parser would have to be able to distinguish
> between the two types of string.

I think that trying to do this in the lexical analyzer is the
wrong place.  Instead, functions that want to open files should
apply this transformation before they open them.  We already have
a function to substitute environment variables, by the way:
fn_interp_vars().

One logical place to call fn_interp_vars() would be fn_open(),
which already handles opening many of the files we open in PSPP
(and probably should be doing more of it).
-- 
Ben Pfaff 
email: [EMAIL PROTECTED]
web: http://benpfaff.org


_______________________________________________
pspp-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to