Current File : /home/pacjaorg/public_html/kmm/media/vendor/codemirror/mode/forth/forth.min.js
(function(n){typeof exports=="object"&&typeof module=="object"?n(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";function R(t){var i=[];return t.split(" ").forEach(function(e){i.push({name:e})}),i}var f=R("INVERT AND OR XOR 2* 2/ LSHIFT RSHIFT 0= = 0< < > U< MIN MAX 2DROP 2DUP 2OVER 2SWAP ?DUP DEPTH DROP DUP OVER ROT SWAP >R R> R@ + - 1+ 1- ABS NEGATE S>D * M* UM* FM/MOD SM/REM UM/MOD */ */MOD / /MOD MOD HERE , @ ! CELL+ CELLS C, C@ C! CHARS 2@ 2! ALIGN ALIGNED +! ALLOT CHAR [CHAR] [ ] BL FIND EXECUTE IMMEDIATE COUNT LITERAL STATE ; DOES> >BODY EVALUATE SOURCE >IN <# # #S #> HOLD SIGN BASE >NUMBER HEX DECIMAL FILL MOVE . CR EMIT SPACE SPACES TYPE U. .R U.R ACCEPT TRUE FALSE <> U> 0<> 0> NIP TUCK ROLL PICK 2>R 2R@ 2R> WITHIN UNUSED MARKER I J TO COMPILE, [COMPILE] SAVE-INPUT RESTORE-INPUT PAD ERASE 2LITERAL DNEGATE D- D+ D0< D0= D2* D2/ D< D= DMAX DMIN D>S DABS M+ M*/ D. D.R 2ROT DU< CATCH THROW FREE RESIZE ALLOCATE CS-PICK CS-ROLL GET-CURRENT SET-CURRENT FORTH-WORDLIST GET-ORDER SET-ORDER PREVIOUS SEARCH-WORDLIST WORDLIST FIND ALSO ONLY FORTH DEFINITIONS ORDER -TRAILING /STRING SEARCH COMPARE CMOVE CMOVE> BLANK SLITERAL"),O=R("IF ELSE THEN BEGIN WHILE REPEAT UNTIL RECURSE [IF] [ELSE] [THEN] ?DO DO LOOP +LOOP UNLOOP LEAVE EXIT AGAIN CASE OF ENDOF ENDCASE");n.defineMode("forth",function(){function t(i,e){var E;for(E=i.length-1;E>=0;E--)if(i[E].name===e.toUpperCase())return i[E]}return{startState:function(){return{state:"",base:10,coreWordList:f,immediateWordList:O,wordList:[]}},token:function(i,e){var E;if(i.eatSpace())return null;if(e.state===""){if(i.match(/^(\]|:NONAME)(\s|$)/i))return e.state=" compilation","builtin compilation";if(E=i.match(/^(\:)\s+(\S+)(\s|$)+/),E)return e.wordList.push({name:E[2].toUpperCase()}),e.state=" compilation","def"+e.state;if(E=i.match(/^(VARIABLE|2VARIABLE|CONSTANT|2CONSTANT|CREATE|POSTPONE|VALUE|WORD)\s+(\S+)(\s|$)+/i),E)return e.wordList.push({name:E[2].toUpperCase()}),"def"+e.state;if(E=i.match(/^(\'|\[\'\])\s+(\S+)(\s|$)+/),E)return"builtin"+e.state}else{if(i.match(/^(\;|\[)(\s)/))return e.state="",i.backUp(1),"builtin compilation";if(i.match(/^(\;|\[)($)/))return e.state="","builtin compilation";if(i.match(/^(POSTPONE)\s+\S+(\s|$)+/))return"builtin"}if(E=i.match(/^(\S+)(\s+|$)/),E)return t(e.wordList,E[1])!==void 0?"variable"+e.state:E[1]==="\\"?(i.skipToEnd(),"comment"+e.state):t(e.coreWordList,E[1])!==void 0?"builtin"+e.state:t(e.immediateWordList,E[1])!==void 0?"keyword"+e.state:E[1]==="("?(i.eatWhile(function(r){return r!==")"}),i.eat(")"),"comment"+e.state):E[1]===".("?(i.eatWhile(function(r){return r!==")"}),i.eat(")"),"string"+e.state):E[1]==='S"'||E[1]==='."'||E[1]==='C"'?(i.eatWhile(function(r){return r!=='"'}),i.eat('"'),"string"+e.state):E[1]-68719476735?"number"+e.state:"atom"+e.state}}}),n.defineMIME("text/x-forth","forth")});
Site is undergoing maintenance

PACJA Events

Maintenance mode is on

Site will be available soon. Thank you for your patience!