::SHE+ILA::'s Parser gets interesting :) [$75]

Confident Woman in Modern Office with High-Tech Screens
46
0
  • Squishy Plushie's avatar Artist
    Squishy Pl...
  • Prompt
    Read prompt
  • DDG Model
    DaVinci2
  • Access
    Public
  • Created
    4d ago
  • Try

More about ::SHE+ILA::'s Parser gets interesting :) [$75]

A *very* short extract from the Assembler code :
STATE3: DW ALPH, NUM, DOLLAR, PARENS, BRACKETS, BRACES, OPERATORS
Basically, this state-machine-driven parser is *much* more playful than the old stack one (or even recursive descent). There are currently four windows (Sheila, SYSTAT, Segs, and Keyboard). It subclasses INT $09, trnslates scan codes to ASCII, then looks up the ASCII in a CHARTAB to get a Character Class (lol, not a RPG one) and Flag byte, then uses the Class and current State to pick a vector from the state table (see example above), does a CALL [BX] to call its action routine and update the screen window, and jump to a new State. Very easy and quick in ASM. It doesn't even need to fork (i.e. queue a lower priority procedure) to avoid eating up interrupt time. Eventually it will pipe the resultant parse trees into a Buf, which will be executed by ::ILA:: (the runtime interpreter). Oh, I also need to add a "BAD" state, so it can trap syntax errors in the keyboard driver and bleep, to catch trash like "X <:: 123abcQWERTYbleh"lol";

Comments


Loading Dream Comments...

Discover more dreams from this artist