Comments
Loading Dream Comments...
You must be logged in to write a comment - Log In
*** FIRST, SEE THE OTHER DRAWING FOR THE BEGINNING OF THIS SOURCE CODE ***
[22] E2:: throw "*** ! missing"; // get out of here
[23] // line deleted as redundant;
[24] L2:: (L4) [? srce[1] .ne. "[" ?]; // go to L4 if srce[1] isn't a left square bracket;
[25] stack < "!["; // Push "!" and "[";
[26] srce => dummy; // Discard first element;
[27] hold < obj[1]; // Prefix obj[1] onto hold;
[28] obj => dummy; // Discard;
[29] REPEAT; // go to label REPEAT;
[30] L4:: (L5) [? .and./ srce[1] .in. (";", ".then." ) ?]; // go to L5 if top of srce is ";" or ".then.";
[31] stack < srce[1]; // Push srce[1];
[32] L5: srce => dummy; // Discard top of srce;
[33] REPEAT; // go to label REPEAT;
[34] TESTHIER:: (END) [? 0 .eq. #srce ?]; // go to label END if srce is empty;
[35] hier1 <:: hier[ operators .lookup. srce[1] ];
[36] hier2 <:: hier[ operators .lookup. stack[1] ];
[37] (REPEAT) [? hier2 .lt. hier1 ?]; // go to label REPEAT if hier2 is less than hier1;
[38] obj < stack[1]; // push top of stack onto front of obj;
[39] stack => dummy; // discard top of stack;
[40] TESTHIER; // go to label TESTHIER;
[41] END:: // End of procedure StackParse;
};
operators <:: ("(", "{", "!", "'", ";", "}", ")", ".if.", "else.", ".then.", ".go to.", ".lt.", ".le.", ".eq.", "ge.", ".gt.", ".ne.", "<::", ",", "]", "+", "-", "*", ".div.". ".mod.", "[");
hier <:: (0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8);