home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_200 / 232_01 / cmds.h < prev    next >
Text File  |  1987-06-17  |  3KB  |  136 lines

  1. /*
  2.     Little Smalltalk
  3.  
  4.     The following very common commands are given a concise description
  5.     in bytecodes.
  6.  
  7. */
  8.  
  9. static char *unspecial[] = {"new", "isNil", "notNil", "size", "class",
  10.         "value", "first", "next", "print", "printString",
  11.         "strictlyPositive", "currentKey", "not",
  12.  
  13.         /* after the first 16 - which should be the most common
  14.         messages, order doesn't make as much difference so we
  15.         might as well list things in alphabetical order */
  16.  
  17.         "abs",
  18.         "asArray",
  19.         "asFloat",
  20.         "asString",
  21.         "asSymbol",
  22.         "block",
  23.         "compareError",
  24.         "copy",
  25.         "current",
  26.         "deepCopy",
  27.         "exp",
  28.         "findLast",
  29.         "firstKey",
  30.         "gamma",
  31.         "isEmpty",
  32.         "isLowercase",
  33.         "isUppercase",
  34.         "last",
  35.         "lastKey",
  36.         "ln",
  37.         "newProcess",
  38.         "not",
  39.         "opError",
  40.         "read",
  41.         "removeError",
  42.         "removeFirst",
  43.         "removeLast",
  44.         "resume",
  45.         "rounded",
  46.         "shallowCopy",
  47.         "sqrt",
  48.         "squared",
  49.         "state",
  50.         "superClass",
  51.         "truncated",
  52.         "unblock",
  53.         "x",
  54.         "y",
  55.         0 };
  56.  
  57. # define VALUECMD 5
  58. # define PRNTCMD  8
  59.  
  60. static char *binspecial[] = {"new:", "at:", "to:", "do:", "value:",
  61.                       "==", "~~", "timesRepeat:", "whileTrue:", "whileFalse:",
  62.                       "ifTrue:", "ifFalse:", "error:", "add:",
  63.               "/", "coerce:",
  64.  
  65.               "^",
  66.               ",",
  67.               "//",
  68.               "addAll:",
  69.               "addAllLast:",
  70.               "addFirst:",
  71.               "addLast:",
  72.               "binaryDo:",
  73.               "checkBucket:",
  74.               "collect:",
  75.               "deepCopy:",
  76.               "gcd:",
  77.               "getList:",
  78.               "hashNumber:",
  79.               "includes:",
  80.               "inRange:",
  81.               "keysDo:",
  82.               "log:",
  83.               "maxtype:",
  84.               "newProcessWith:",
  85.               "occurrencesOf:",
  86.               "raisedTo:",
  87.               "reject:",
  88.               "remove:",
  89.               "removeKey:",
  90.               "respondsTo:",
  91.               "reverseDo:",
  92.               "roundTo:",
  93.               "select:",
  94.               "shallowCopy:",
  95.               "sort:",
  96.               "termErr:",
  97.               "truncateTo:",
  98.               "write:",
  99.               "x:",
  100.               "y:",
  101.               "includesKey:",
  102.               0};
  103.  
  104. static char *arithspecial[] = {"+", "-", "*", "\\\\",
  105.                         "bitShift:", "bitAnd:", "bitOr:",
  106.                         "<", "<=", "=", "~=", ">=", ">",
  107.             "rem:", "quo:", "min:", "max:",
  108.             0};
  109.  
  110. static char *keyspecial[] = {"at:put:", "ifTrue:ifFalse:", "ifFalse:ifTrue:",
  111.                         "value:value:", "to:by:", "at:ifAbsent:",
  112.             "indexOf:ifAbsent:", "inject:into:",
  113.             "remove:ifAbsent:", "removeKey:ifAbsent:",
  114.             "between:and:",
  115.             "findFirst:ifAbsent:", "findLast:ifAbsent:",
  116.             "equals:startingAt:",
  117.             "findAssociation:inList:",
  118.             "detect:ifAbsent:",
  119.             0};
  120.  
  121. /*    The classes included in the standard prelude
  122.     also have a very concise description in bytecode representation
  123. */
  124.  
  125. static char *classpecial[] = {"Array", "ArrayedCollection",
  126.     "Bag", "Block", "Boolean", "ByteArray",
  127.     "Char", "Class", "Collection", "Complex",
  128.     "Dictionary", "False", "File", "Float",
  129.     "Integer", "Interpreter", "Interval",
  130.     "KeyedCollection", "List", "Magnitude", "Number",
  131.     "Object", "OrderedCollection", "Point",
  132.     "Radian", "Random",
  133.     "SequenceableCollection", "Set", "String", "Symbol",
  134.     "True", "UndefinedObject",
  135.     0 };
  136.