In the interpreter, it's possible to use filename %"%"
This is not possible when the same script is compiled, error is returned:
*** Syntax Error: Invalid string! value
*** in file: /Users/sony/Code/red/test.red
*** line: 2
*** at: {"%"}
Compile following script:
Red[]
%"%"
Latest Red on macOS.
The complete equivalence of interpreter-lexer and compiler-lexer has obviously not yet been achieved. There are more issues of this nature still pending.
On the substance: I think that this particular filename should be forbidden.
@meijeru why do you think so? If file system supports it, why it should be illegal?
In Red, % normally starts a two-hex digit code for a character. So it would be just to avoid confusion. Anyhow, in the interpreter, %% instead of %"%" also gives an error. This reinforces my plea for more consistent lexing.
The %"..." syntax is an escape mechanism allowing filesystem-specific characters to be provided unescaped. So %"%" should be accepted, as it is accepted by most filesystems.