The following is a list of the keywords in YASS, as well as their byte-code representation. Note, that certain byte codes are not used for individual keywords but for the representation in the the fAST that is generated and are represented by no keyword.
Byte code name | Byte code | Keyword |
---|---|---|
CAST | -11 | cast |
NAMED_ARGUMENT | -10 | |
MATHEMATICAL_EXPRESSION | -9 | |
LOGICAL_EXPRESSION | -8 | |
INFINITE PARAMETERS | -7 | |
ARGUMENTS | -6 | |
PARAMETERS | -5 | |
NULL | -4 | null |
UNDEFINED | -3 | undefined |
EXECUTION_FAILED | -2 | |
RESERVED | -1 | |
PROTECTED | 0 | |
PRIVATE | 1 | private |
PUBLIC | 2 | public |
NAME | 3 | _?([A-z][A-z0-9_]*) |
VAR | 4 | $ |
INT | 5 | ((-?[1-9]+)|[0-9][0-9]*)(E[0-9]+)? |
DOUBLE | 6 | ((-?[0-9]+((\\.)[0-9]+))(E(-?)[0-9]+)?)|(-?[0-9]+(E(-?)[0-9]+)?) |
BOOL | 7 | true false |
STRING | 8 | (\".*\")|('.*') |
OBJECT | 9 | |
LIST | 10 | |
ASSOCIATION | 11 | |
FUNCTION | 12 | function or fn |
ASSIGN | 16 | = |
END | 17 | end |
LBRA | 18 | ( |
RBRA | 19 | ) |
COMMA | 20 | , |
IF | 21 | if |
ELSE | 22 | else |
ELSEIF | 23 | else if or elseif |
WHEN | 24 | when |
IS | 25 | is |
SWITCH | 26 | switch |
CASE | 27 | case |
DEFAULT | 28 | default |
OTHERWISE | 29 | otherwise |
WHILE | 30 | while |
UNTIL | 31 | until |
FOR | 32 | for |
EQUAL | 33 | == |
NEQUAL | 34 | != |
GT | 35 | > |
LT | 36 | < |
GTE | 37 | >= |
LTE | 38 | <= |
EXACTLY_EQUAL | 39 | === |
EXACTLY_NEQUAL | 40 | !== |
LAND | 41 | && or and |
LOR | 42 | || or or |
POST_INCREMENT | 43 | |
PRE_INCREMENT | 44 | |
POST_DECREMENT | 45 | |
PRE_DECREMENT | 46 | |
INCREMENT | 47 | ++ |
DECREMENT | 48 | -- |
LOOP | 49 | loop |
LSQBR | 50 | [ |
RSQBR | 51 | ] |
DO | 52 | do |
LBRACE | 53 | { |
RBRACE | 54 | } |
PLUS | 55 | + |
MULT | 56 | * |
MINUS | 57 | - |
DIVIDE | 58 | / |
MODULO | 59 | % |
CIRCUMFLEX | 60 | ^ |
EACH | 61 | each |
AS | 62 | as |
IN | 63 | in |
STRUCTURE | 64 | structure or struct or class |
NEW | 65 | new or copyof |
OBJECT_POINTER | 66 | -> |
DOT | 67 | . |
THEN | 68 | then |
SEMI_COLON | 69 | ; |
THIS | 70 | this |
LAMBDA_CALL | 71 | |
AT | 72 | at |
TERNARY_MARK | 73 | ? |
COLON | 74 | : |
TRY | 75 | try |
CATCH | 76 | catch |
CONCAT | 77 | & |
HEXADECIMAL | 78 | (0|1)x[0-9A-F]+ |
OCTAL | 79 | (0|1)o[0-7]+ |
BINARY | 80 | (0|1)b[01]+ |
INCLUDES | 81 | includes |
IMPORT | 82 | import |
ALIASES | 83 | aliases |
RETURN | 84 | return |
BREAK | 85 | break |
NEGATION | 86 | ! |
VAR_BY_REF | 87 | &$ |
INDEX_ACCESSOR | 88 | |
NEGATIVE | 91 | - |
DEFINE | 92 | define |
ASSERTS | 93 | asserts |
INHERITS | 94 | inherits |
COUNT | 95 | count |
ALT_VALUE | 96 | ?? |
TO | 97 | to |
OPEN_HEREDOC | 98 | << |
CLOSE_HEREDOC | 99 | >> |
MATCH | 100 | match |
MULTI_ASSIGN | 101 | *= |
DIVIDE_ASSIGN | 102 | /= |
POWER_ASSIGN | 103 | ^= |
LET | 104 | let |
BE | 105 | be |
DECLARE | 106 | declare |
RECORD | 107 | unused |
CUSTOM_MODULE | 116 | |
MIXED_TYPE | 117 | mixed |
STRING_TYPE | 118 | string |
NUMBER_TYPE | 119 | number |
BOOLEAN_TYPE | 120 | boolean |
LIST_TYPE | 121 | list |
FUNCTION_TYPE | 123 | function |
OBJECT_TYPE | 124 | object |
SPECIAL_KEYWORD | 125 |
increase by
|
The SPECIAL_KEYWORD keyword is a group of syntactic sugar based keywords to help keep the number of byte codes down by combining them into one. It then can perform string checks on the word as opposed to relying on a byte code alone.
Comments