Of course it isn't trivial. But I made a bit of progress on it today.
One thing I forgot about is that PATH!s are used to represent filenames in some places. While they can't represent every possible filename, they can be used for tame ones... such as foo/bar/baz.txt
... and since Rebol source code files have tame names, PATH! is used in order to avoid needing the % prefix everywhere. Looks nicer in "file specification dialects".
(This "abuse" of PATH! instead of using FILE! was Carl's choice, originating from R3-Alpha. The desire to use this for filenames like 1-file.txt
is an argument for the FUSED! proposal.)
But of course my "scan all dots as slashes" interferes with that. So I'm going to say that it stops turning dots into slashes once it sees an actual slash in the scan.
>> transcode "foo.baz.bar/mumble/frotz.txt"
== foo/baz/bar/mumble/frotz.txt
>> transcode "/foo/baz/bar/mumble/frotz.txt"
== foo/baz/bar/mumble/frotz.txt
That is compatible with what bootstrap should need.
Of course there's another thing the bootstrap executable can't/won't do, and that's make PATH!s with SET-WORD!s or SET-TUPLE!s at the tail. The modern executable will need these for antiform frame assignments. But simply skip the slash and do normal assignment.
>> transcode "/foo: func [x] [print [x]]"
== [foo: func [x] [print [x]]]
>> transcode "/obj.accessor: func [x] [print [x]]"
== [obj/accessor: func [x] [print [x]]"
I'm honestly looking forward to going through and wiping out the old all-path notation, introducing the tuples and colons in the bootstrap scripts. Sad, isn't it?