public void Initialize() { _interpreter.AddImmediateWord("CATCH", CatchAction); _interpreter.AddPrimitiveWord("THROW", ThrowAction); _interpreter.AddPrimitiveWord("ABORT", AbortAction); _interpreter.AddImmediateWord("ABORT\"", AbortWithMessageAction); }
public void Initialize() { _interpreter.AddWord(new StoreWord(_interpreter)); // ! _interpreter.AddWord(new NumberSignWord(_interpreter)); // # _interpreter.AddWord(new NumberSignGreaterWord(_interpreter)); // #> _interpreter.AddWord(new NumberSignSWord(_interpreter)); // #S _interpreter.AddWord(new TickWord(_interpreter)); // ' _interpreter.AddWord(new ParenWord(_interpreter)); // ( _interpreter.AddWord(new StarWord(_interpreter)); // * _interpreter.AddWord(new StarSlashWord(_interpreter)); // */ _interpreter.AddWord(new StarSlashModWord(_interpreter)); // */MOD _interpreter.AddWord(new PlusWord(_interpreter)); // + _interpreter.AddWord(new PlusStoreWord(_interpreter)); // +! _interpreter.AddWord(new PlusLoopWord(_interpreter)); // +LOOP _interpreter.AddWord(new CommaWord(_interpreter)); // , _interpreter.AddWord(new MinusWord(_interpreter)); // - _interpreter.AddWord(new DotWord(_interpreter)); // . _interpreter.AddWord(new DotQuoteWord(_interpreter)); // ." _interpreter.AddPrimitiveWord("/", SlashAction); _interpreter.AddWord(new SlashModWord(_interpreter)); // /MOD _interpreter.AddPrimitiveWord("0<", ZeroLessAction); _interpreter.AddPrimitiveWord("0=", ZeroEqualsAction); _interpreter.AddPrimitiveWord("1+", OnePlusAction); _interpreter.AddPrimitiveWord("1-", OneMinusAction); _interpreter.AddPrimitiveWord("2!", TwoStoreAction); _interpreter.AddPrimitiveWord("2*", TwoStarAction); _interpreter.AddPrimitiveWord("2/", TwoSlashAction); _interpreter.AddPrimitiveWord("2@", TwoFetchAction); _interpreter.AddPrimitiveWord("2DROP", TwoDropAction); _interpreter.AddPrimitiveWord("2DUP", TwoDupAction); _interpreter.AddPrimitiveWord("2OVER", TwoOverAction); _interpreter.AddPrimitiveWord("2SWAP", TwoSwapAction); _interpreter.AddPrimitiveWord(":", ColonAction); _interpreter.AddImmediateWord(";", SemicolonAction); _interpreter.AddPrimitiveWord("<", LessThanAction); _interpreter.AddWord(new LessNumberSignWord(_interpreter)); // <# _interpreter.AddPrimitiveWord("=", EqualsAction); _interpreter.AddPrimitiveWord(">", GreaterThanAction); _interpreter.AddPrimitiveWord(">BODY", ToBodyAction); _interpreter.AddPrimitiveWord(">NUMBER", ToNumberAction); _interpreter.AddPrimitiveWord(">R", ToRAction); _interpreter.AddPrimitiveWord("?DUP", QuestionDupeAction); _interpreter.AddPrimitiveWord("@", FetchAction); _interpreter.AddPrimitiveWord("ABORT", AbortAction); _interpreter.AddImmediateWord("ABORT\"", AbortWithMessageAction); _interpreter.AddPrimitiveWord("ABS", AbsAction); _interpreter.AddPrimitiveWord("ALIGN", AlignAction); _interpreter.AddPrimitiveWord("ALIGNED", AlignedAction); _interpreter.AddPrimitiveWord("ALLOT", AllotAction); _interpreter.AddPrimitiveWord("AND", AndAction); _interpreter.AddPrimitiveWord("BASE", BaseAction); _interpreter.AddImmediateWord("BEGIN", BeginAction); _interpreter.AddConstantWord("BL", ' '); _interpreter.AddPrimitiveWord("C!", CStoreAction); _interpreter.AddPrimitiveWord("C,", CCommaAction); _interpreter.AddPrimitiveWord("C@", CFetchAction); _interpreter.AddPrimitiveWord("CELL+", CellPlusAction); _interpreter.AddPrimitiveWord("CELLS", CellsAction); _interpreter.AddPrimitiveWord("CHAR", CharAction); _interpreter.AddPrimitiveWord("CHAR+", CharPlusAction); _interpreter.AddPrimitiveWord("CHARS", CharsAction); _interpreter.AddPrimitiveWord("CONSTANT", ConstantAction); _interpreter.AddPrimitiveWord("COUNT", CountAction); _interpreter.AddPrimitiveWord("CR", CrAction); _interpreter.AddPrimitiveWord("CREATE", CreateAction); _interpreter.AddPrimitiveWord("DECIMAL", DecimalAction); _interpreter.AddPrimitiveWord("DEPTH", DepthAction); _interpreter.AddImmediateWord("DO", DoAction); _interpreter.AddImmediateWord("DOES>", DoesAction); _interpreter.AddPrimitiveWord("DROP", DropAction); _interpreter.AddPrimitiveWord("DUP", DupAction); _interpreter.AddImmediateWord("ELSE", ElseAction); _interpreter.AddPrimitiveWord("EMIT", EmitAction); _interpreter.AddPrimitiveWord("EVALUATE", EvaluateAction); _interpreter.AddPrimitiveWord("EXECUTE", ExecuteAction); _interpreter.AddImmediateWord("EXIT", ExitAction); _interpreter.AddWord(new FillWord(_interpreter)); // FILL _interpreter.AddPrimitiveWord("FIND", FindAction); _interpreter.AddPrimitiveWord("FM/MOD", FMSlashModAction); _interpreter.AddPrimitiveWord("HERE", HereAction); _interpreter.AddWord(new HoldWord(_interpreter)); // HOLD _interpreter.AddImmediateWord("I", GetInnerIndexAction); _interpreter.AddImmediateWord("IF", IfAction); _interpreter.AddPrimitiveWord("IMMEDIATE", ImmediateAction); _interpreter.AddPrimitiveWord("INVERT", InvertAction); _interpreter.AddImmediateWord("J", GetOuterIndexAction); _interpreter.AddImmediateWord("LEAVE", LeaveAction); _interpreter.AddImmediateWord("LITERAL", LiteralAction); _interpreter.AddPrimitiveWord("LSHIFT", LShiftAction); _interpreter.AddPrimitiveWord("M*", MStarAction); _interpreter.AddImmediateWord("LOOP", LoopAction); _interpreter.AddPrimitiveWord("MAX", MaxAction); _interpreter.AddPrimitiveWord("MIN", MinAction); _interpreter.AddPrimitiveWord("MOD", ModAction); _interpreter.AddPrimitiveWord("MOVE", MoveAction); _interpreter.AddPrimitiveWord("NEGATE", NegateAction); _interpreter.AddPrimitiveWord("OR", OrAction); _interpreter.AddPrimitiveWord("OVER", OverAction); _interpreter.AddImmediateWord("POSTPONE", PostponeAction); _interpreter.AddPrimitiveWord("QUIT", QuitAction); _interpreter.AddPrimitiveWord("R>", RFromAction); _interpreter.AddPrimitiveWord("R@", RFetchAction); _interpreter.AddImmediateWord("RECURSE", RecurseAction); _interpreter.AddImmediateWord("REPEAT", RepeatAction); _interpreter.AddPrimitiveWord("ROT", RoteAction); _interpreter.AddPrimitiveWord("RSHIFT", RShiftAction); _interpreter.AddImmediateWord("S\"", SQuoteAction); _interpreter.AddPrimitiveWord("S>D", SToDAction); _interpreter.AddWord(new SignWord(_interpreter)); // SIGN _interpreter.AddPrimitiveWord("SM/REM", SMSlashRemAction); _interpreter.AddPrimitiveWord("SPACE", SpaceAction); _interpreter.AddPrimitiveWord("SPACES", SpacesAction); _interpreter.AddPrimitiveWord("STATE", StateAction); _interpreter.AddPrimitiveWord("SWAP", SwapAction); _interpreter.AddImmediateWord("THEN", ThenAction); _interpreter.AddPrimitiveWord("TYPE", TypeAction); _interpreter.AddPrimitiveWord("U.", UDotAction); _interpreter.AddPrimitiveWord("U<", ULessThanAction); _interpreter.AddPrimitiveWord("UM*", UMStarAction); _interpreter.AddPrimitiveWord("UM/MOD", UMSlashModAction); _interpreter.AddImmediateWord("UNLOOP", UnloopAction); _interpreter.AddImmediateWord("UNTIL", UntilAction); _interpreter.AddPrimitiveWord("VARIABLE", VariableAction); _interpreter.AddImmediateWord("WHILE", WhileAction); _interpreter.AddPrimitiveWord("WORD", WordAction); _interpreter.AddPrimitiveWord("XOR", XorAction); _interpreter.AddImmediateWord("[", LeftBracketAction); _interpreter.AddImmediateWord("[']", BracketTickAction); _interpreter.AddImmediateWord("[CHAR]", BracketCharAction); _interpreter.AddImmediateWord("]", RightBracketAction); }
public void Initialize() { _interpreter.AddPrimitiveWord("2CONSTANT", TwoConstantAction); _interpreter.AddImmediateWord("2LITERAL", TwoLiteralAction); _interpreter.AddPrimitiveWord("2VARIABLE", TwoVariableAction); _interpreter.AddPrimitiveWord("D+", DPlusAction); _interpreter.AddPrimitiveWord("D-", DMinusAction); _interpreter.AddPrimitiveWord("D.", DDotAction); _interpreter.AddPrimitiveWord("D0<", DZeroLessAction); _interpreter.AddPrimitiveWord("D0=", DZeroEqualsAction); _interpreter.AddPrimitiveWord("D2*", DTwoStarAction); _interpreter.AddPrimitiveWord("D2/", DTwoSlashAction); _interpreter.AddPrimitiveWord("D<", DLessThanAction); _interpreter.AddPrimitiveWord("D=", DEqualsAction); _interpreter.AddPrimitiveWord("D>S", DToSAction); _interpreter.AddPrimitiveWord("DABS", DAbsAction); _interpreter.AddPrimitiveWord("DMAX", DMaxAction); _interpreter.AddPrimitiveWord("DMIN", DMinAction); _interpreter.AddPrimitiveWord("DNEGATE", DNegateAction); }
public void Initialize() { _interpreter.AddPrimitiveWord("2ROT", TwoRotAction); _interpreter.AddPrimitiveWord(">DOUBLE", ToNumberAction); _interpreter.AddPrimitiveWord("D1+", DOnePlusAction); _interpreter.AddPrimitiveWord("D1-", DOneMinusAction); _interpreter.AddPrimitiveWord("D2+", AddTwoAction); _interpreter.AddPrimitiveWord("D2-", DTwoMinusAction); _interpreter.AddPrimitiveWord("D*", DStarAction); _interpreter.AddPrimitiveWord("D/", DSlashAction); _interpreter.AddPrimitiveWord("DMOD", DModAction); _interpreter.AddPrimitiveWord("D/MOD", DSlashModAction); _interpreter.AddPrimitiveWord("DNOT", DNotAction); _interpreter.AddPrimitiveWord("DAND", DAndAction); _interpreter.AddPrimitiveWord("DOR", DOrAction); _interpreter.AddPrimitiveWord("DXOR", DXorAction); _interpreter.AddPrimitiveWord("D<>", DNotNequalsAction); _interpreter.AddPrimitiveWord("D<=", DLessThanOrEqualAction); _interpreter.AddPrimitiveWord("D>", DGreaterThanAction); _interpreter.AddPrimitiveWord("D>=", DGreaterThanOrEqualAction); _interpreter.AddPrimitiveWord("D0<>", DZeroNotEqualsAction); _interpreter.AddPrimitiveWord("D0>", DZeroGreaterAction); }
public void Initialize() { _interpreter.AddImmediateWord(".(", DotParenAction); _interpreter.AddPrimitiveWord("0<>", ZeroNotEqualsAction); _interpreter.AddPrimitiveWord("0>", ZeroGreaterAction); _interpreter.AddPrimitiveWord("2>R", TwoToRAction); _interpreter.AddPrimitiveWord("2R>", TwoRFromAction); _interpreter.AddPrimitiveWord("2R@", TwoRFetchAction); _interpreter.AddPrimitiveWord(":NONAME", NonameAction); _interpreter.AddImmediateWord(";", SemicolonAction); // Extended version. _interpreter.AddPrimitiveWord("<>", NotEqualsAction); _interpreter.AddImmediateWord("?DO", QuestionDoAction); _interpreter.AddImmediateWord("AGAIN", AgainAction); _interpreter.AddPrimitiveWord("HEX", HexAction); _interpreter.AddPrimitiveWord("NIP", NipAction); _interpreter.AddPrimitiveWord("PICK", PickAction); _interpreter.AddPrimitiveWord("ROLL", RollAction); _interpreter.AddImmediateWord("S\\\"", SBackslashQuoteAction); // S\" ..." _interpreter.AddPrimitiveWord("TO", ToAction); _interpreter.AddPrimitiveWord("TUCK", TuckAction); _interpreter.AddPrimitiveWord("VALUE", ValueAction); _interpreter.AddWord(new WithinWord(_interpreter)); _interpreter.AddPrimitiveWord("\\", BackslashAction); _interpreter.AddConstantWord("FALSE", 0); _interpreter.AddConstantWord("TRUE", -1); _interpreter.AddPrimitiveWord("B!", BStoreAction); _interpreter.AddPrimitiveWord("B,", BCommaAction); _interpreter.AddPrimitiveWord("B@", BFetchAction); _interpreter.AddPrimitiveWord("BYTE+", BytePlusAction); _interpreter.AddPrimitiveWord("BYTES", BytesAction); _interpreter.AddPrimitiveWord("-ROLL", MinusRollAction); _interpreter.AddPrimitiveWord("-ROT", MinusRotAction); _interpreter.AddPrimitiveWord("2+", TwoPlusAction); _interpreter.AddPrimitiveWord("2-", TwoMinusAction); _interpreter.AddPrimitiveWord("2NIP", TwoNipAction); _interpreter.AddPrimitiveWord("2TUCK", TwoTuckAction); _interpreter.AddPrimitiveWord("<=", LessOrEqualsAction); _interpreter.AddPrimitiveWord(">=", GreaterOrEqualsAction); _interpreter.AddPrimitiveWord("CLEAR", ClearAction); }
public void Initialize() { _interpreter.AddPrimitiveWord("DF!", DFStoreAction); // Does the same as the word F!. _interpreter.AddPrimitiveWord("DF@", DFFetchAction); // Does the same as the word F@. _interpreter.AddPrimitiveWord("DFALIGN", DFAlignAction); // Does the same as the word FALIGN. _interpreter.AddPrimitiveWord("DFALIGNED", DFAlignedAction); // Does the same as the word FALIGNED. _interpreter.AddPrimitiveWord("DFLOAT+", DFloatPlusAction); // Does the same as the word FLOAT+. _interpreter.AddPrimitiveWord("DFLOATS", DFloatsAction); // Does the same as the word FLOATS. _interpreter.AddPrimitiveWord("F**", FStarStarAction); _interpreter.AddPrimitiveWord("F.", FdotAction); _interpreter.AddPrimitiveWord("F>S", FToSAction); _interpreter.AddPrimitiveWord("FABS", FAbsAction); _interpreter.AddPrimitiveWord("FACOS", FAcosAction); _interpreter.AddPrimitiveWord("FACOSH", FAcoshAction); _interpreter.AddPrimitiveWord("FALOG", FAlogAction); _interpreter.AddPrimitiveWord("FASIN", FAsinAction); _interpreter.AddPrimitiveWord("FASINH", FAsinhAction); _interpreter.AddPrimitiveWord("FATAN", FAtanAction); _interpreter.AddPrimitiveWord("FATAN2", FAtan2Action); _interpreter.AddPrimitiveWord("FATANH", FAtanhAction); _interpreter.AddPrimitiveWord("FCOS", FCosAction); _interpreter.AddPrimitiveWord("FCOSH", FCoshAction); _interpreter.AddPrimitiveWord("FEXP", FExpAction); _interpreter.AddPrimitiveWord("FEXPM1", FExpM1Action); _interpreter.AddPrimitiveWord("FLN", FLnAction); _interpreter.AddPrimitiveWord("FLNP1", FLnP1Action); _interpreter.AddPrimitiveWord("FLOG", FLogAction); _interpreter.AddPrimitiveWord("FSIN", FSinAction); _interpreter.AddPrimitiveWord("FSINCOS", FSinCosAction); _interpreter.AddPrimitiveWord("FSINH", FSinhAction); _interpreter.AddPrimitiveWord("FSQRT", FSqrtAction); _interpreter.AddPrimitiveWord("FTAN", FTanAction); _interpreter.AddPrimitiveWord("FTANH", FTanhAction); _interpreter.AddPrimitiveWord("FTRUNC", FTruncAction); _interpreter.AddPrimitiveWord("FVALUE", FValueAction); _interpreter.AddPrimitiveWord("S>F", SToFAction); _interpreter.AddPrimitiveWord("SF!", SFStoreAction); _interpreter.AddPrimitiveWord("SF@", SFFetchAction); _interpreter.AddPrimitiveWord("SFALIGN", () => 1); // Does nothing. _interpreter.AddPrimitiveWord("SFALIGNED", SFAlignedAction); // Does the same as the word DFALIGNED. _interpreter.AddPrimitiveWord("SFLOAT+", SFloatPlusAction); // Does the same as the word CELL+. _interpreter.AddPrimitiveWord("SFLOATS", SFloatsAction); // Does the same as the word CELLS. // Extra _interpreter.AddPrimitiveWord("F=", FEqualsAction); _interpreter.AddPrimitiveWord("F<>", FNotEqualsAction); _interpreter.AddPrimitiveWord("F<=", FLessThanOrEqualsAction); _interpreter.AddPrimitiveWord("F>", FGreaterThanAction); _interpreter.AddPrimitiveWord("F>=", FGreaterThanOrEqualsAction); _interpreter.AddPrimitiveWord("F0<>", FZeroNotEqualsAction); _interpreter.AddPrimitiveWord("F0>", FZeroGreaterThanAction); _interpreter.AddPrimitiveWord("F1+", FOnePlusAction); _interpreter.AddPrimitiveWord("F1-", FOneMinusAction); _interpreter.AddPrimitiveWord("F2+", FTwoPlusAction); _interpreter.AddPrimitiveWord("F2-", FTwoMinusAction); _interpreter.AddPrimitiveWord("F2*", FTwoStarAction); _interpreter.AddPrimitiveWord("F2/", FTwoSlashAction); }
public void Initialize() { _interpreter.AddPrimitiveWord(">FLOAT", ToNumberAction); _interpreter.AddPrimitiveWord("D>F", DToFAction); _interpreter.AddPrimitiveWord("F!", FStoreAction); _interpreter.AddPrimitiveWord("F*", FStarAction); _interpreter.AddPrimitiveWord("F+", FPlusAction); _interpreter.AddPrimitiveWord("F-", FMinusAction); _interpreter.AddPrimitiveWord("F/", FSlashAction); _interpreter.AddPrimitiveWord("F0<", FZeroLessThanAction); _interpreter.AddPrimitiveWord("F0=", FZeroEqualsAction); _interpreter.AddPrimitiveWord("F<", FLessThanAction); _interpreter.AddPrimitiveWord("F>D", FToDAction); _interpreter.AddPrimitiveWord("F@", FFetchAction); _interpreter.AddPrimitiveWord("FALIGN", FAlignAction); _interpreter.AddPrimitiveWord("FALIGNED", FAlignedAction); _interpreter.AddPrimitiveWord("FCONSTANT", FConstantAction); _interpreter.AddPrimitiveWord("FDEPTH", FDepthAction); _interpreter.AddPrimitiveWord("FDROP", FDropAction); _interpreter.AddPrimitiveWord("FDUP", FDupAction); _interpreter.AddPrimitiveWord("FDUP", FDupAction); _interpreter.AddImmediateWord("FLITERAL", FLiteralAction); _interpreter.AddPrimitiveWord("FLOAT+", FloatPlusAction); _interpreter.AddPrimitiveWord("FLOATS", FloatsAction); _interpreter.AddPrimitiveWord("FLOOR", FloorAction); _interpreter.AddPrimitiveWord("FMAX", FMaxAction); _interpreter.AddPrimitiveWord("FMIN", FMinAction); _interpreter.AddPrimitiveWord("FNEGATE", FNegateAction); _interpreter.AddPrimitiveWord("FOVER", FOverAction); _interpreter.AddPrimitiveWord("FROT", FRoteAction); _interpreter.AddPrimitiveWord("FROUND", FRoundAction); _interpreter.AddPrimitiveWord("FSWAP", FSwapAction); _interpreter.AddPrimitiveWord("FVARIABLE", FVariableAction); }