Return useful information to the author
A CoreLang parser will read source text and identify its structure. Language checks will then decide whether the rule is complete and meaningful. For example, they should report that a rebooking rule has no responsible team and point to the relevant place in the source.
DSLSH already keeps an editor and parser synchronised. The editor sends document changes; DSLSH updates the parser view and returns highlighting and error information. THE CREXX Edition demonstrates that connection in a working editor. Its browser interface is a working proof of concept, not a production or multi-user web editor.
CoreLang should use these components for its first authoring demonstration while remaining usable through other editors and domain-specific interfaces.
Reuse the CREXX execution path
When an example needs to run, the proposed first path is:
- The CoreLang parser identifies the source structure, and CoreLang validation checks it against the agreed business meaning.
- A small internal form carries the executable part without exposing machine instructions to the language author.
- A CoreLang emitter writes RXAS, the readable assembly language accepted by the CREXX assembler.
- The existing
rxastool checks, optimises and assembles that source. - The existing
rxlinktool links the required modules and libraries. - RXVM, the CREXX virtual machine, runs the program.
The CREXX repository contains the working assembler, linker, virtual machine, libraries and supporting tools. The CoreLang parser, emitter and connection from source to execution are proposed work. Using this path would not make CoreLang use cREXX syntax.
Keep LLVM as later research
An LLVM backend could later produce native machine code, but it requires stable decisions about values, calls, errors, libraries, debugging and packaging. Those decisions are more complex than the first small example needs.
The shortest useful path is to make one CoreLang example work through RXAS. LLVM experiments can follow when they answer a specific question and can be compared with the working path.