Extending the ::SHE+ILA:: Compiler

95
0
  • Squishy Plushie's avatar Artist
    Squishy Pl...
  • DDG Model
    QWEN
  • Access
    Public
  • Created
    1d ago
  • Try

Prompt

A large pink plushie cat reading a purple book.

More about Extending the ::SHE+ILA:: Compiler

As seen in the "Train and Boot" drawing, the stand-alone ::SHE+ILA:: compiler (PARSER.COM -- a DOS file NOT a website!!) contains just enough states in order to read an exofile (PARSER.SHE) which contains the remaining syntax of the ::SHE+ILA:: programming language. (This technique is sometimes called "bootstrapping", not to be confused with Initial Program Load which is also called Bootstrapping or Rebooting). The PARSER.SHE file contains up to 256 lines, each of the following format :

Table[current state number] <:: (two character state ID, colour, input routine number, input routine range, action handler number, action handler param, array of 32 next state numbers);
"current state number" goes from 1 to 256 sequentially.

The two character state ID is displayed in the input window header (e.g. "NM" or "{*", see original screen dump).
The colour is used when displaying the input character on the screen (see screen dump picture)
The input routine number selects how we get the next character (e.g. from the keyboard).
The input routine range selects how we process the input character, e.g. treat it as alphabetic (A_Z) or punctuation (SPACE to "?").
The action handler number chooses an internal routine to call as we exit the current state, e.g. to emit 80x86 or ILA code.
The action handler param is passed to the chosen action handler.
The 32 next states provide 32 exits $00_$1F to the next state, selected by the input character.
Space for these 256 Table Instances is provided within the ASM code of PARSER.COM, so we can run under Real Mode, without needing a ::SHE:: kernel. Compiler output is written to the exofile PARSER.OUT.

More compactly and easier to read :
Table[$hex current state] <:: (two character state ID, colour, input routine number, input routine range, action handler number, action handler param, 64char string in hex of all next states as a string);
Since the compiler has got to parse the thing anyway, it may as well make it easier for us to type in :)

Comments


Loading Dream Comments...

Discover more dreams from this artist