~crc_/retroforth#95: 
RFC: non-unu source files

RetroForth/nga requires source files to be in unu format (http://unu.retroforth.org). Should I add support for plain, non-unu source files?

Considerations here:

  • what new command line arguments are needed
  • do we need a variation of include that works with non-unu sources?
Status
RESOLVED IMPLEMENTED
Submitter
~crc_
Assigned to
No-one
Submitted
1 year, 3 months ago
Updated
5 months ago
Labels
No labels applied.

~rickcarlino 1 year, 3 months ago

I've seen a few folks get tripped up by Unu, so I think this is a good idea. You could possibly use a -p / --plain flag. I think it would be important to have a unified include word that can mix Unu and non-Unu source files.

~rickcarlino 1 year, 3 months ago

Thinking about it more, it would seem that having an "Unu-aware" include word might mandate a known file extension. If that's the case, maybe there is no need for a special flag (the Unu-ness of a source file would be inferred from the file extension).

~crc_ 1 year, 3 months ago

Arland suggests having the include functionality scan the files for ~~~ and/or ``` blocks rather than using a specific file extension (or set thereof).

~rickcarlino 1 year, 3 months ago

That's another option.

Some possible hiccups that would need to be considered:

  • performance when loading large files.
  • Accidental false positives in applications that do funny things with text input parsing and have stray ~~~ chars in unexpected places.

Another option I hadn't considered could be to have some sort of pragma comment that is always on the first line of a non-unu source..

Eg:

\DISABLE_UNU

~crc_ REPORTED CLOSED 5 months ago

~crc_ CLOSED REPORTED 5 months ago

~crc_ REPORTED IMPLEMENTED 5 months ago

This has been implemented.

Register here or Log in to comment, or comment via email.