🥞 FORTH STACK DIFFICULTY: Adept Behavioral

Interpreter (Forth)

Invoke the outer dark to parse chaotic incantations.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Interpreter
ARCANUM SCHOOL: Divination // Void-Parsing
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// FORTH PATTERN //
\ Void-Parsing: The Interpreter
\ Using EVALUATE to parse dynamic strings as code.

: SUMMON ( -- ) ." Summoning circle drawn." CR ;
: BIND ( -- ) ." Chains of binding applied." CR ;

: RUN-SCROLL ( c-addr u -- )
  ." Reading from the forbidden scroll..." CR
  EVALUATE ;

\ Usage:
\ S" SUMMON BIND" RUN-SCROLL

Forth is its own interpreter. To construct a domain-specific language or parse dynamic spells, we simply pass strings containing our arcane syntax into EVALUATE. The outer interpreter takes over, executing the void-text as if it were compiled reality.

Runic Tags: #behavioral #interpreter #forth #parsing