On Thu, Jan 31, 2019 at 5:27 PM Barbara Morris <bmorris@xxxxxxxxxx> wrote:
The compiler code for scanning free-form definitions is almost all the
same as for fixed-form code, and there are a few things available in
fixed form columns that the compiler needs so it knows which direction
It's a fascinating glimpse into language design and compiler design.
Has there been any thought given to the idea of an RPG V? It would a
great opportunity to completely exorcise fixed-form, and maybe rework
some things so that the language is more maintainable and extensible.
(That latter thing is just a pure guess on my part. I have zero actual
knowledge of RPG internals.)
The compiler takes completely different paths for externally-described
vs program-described data structures, so it needs to know right away
what it's dealing with.
Could the scanner not incorporate some amount of look-ahead (i.e., put
off some decisions until more information has been scanned)? I mean,
some keywords *can* be moved around, both in fixed and free, so....
Earlier you said the free-form scanner code is "almost the same" as
the fixed-form scanner code. Why almost? Why isn't there a single
codebase which serves both? If they are separate anyway, why couldn't
the free-form scanner be made deliberately less similar? (And again,
maybe this is something for RPG V.)
Please don't take this as grilling. It's more just musing. I have
incredible respect for language designers and implementers, and in
particular for those who have worked or are still working on RPG.