Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

Official ZPE/YASS documentationYASS keywords

The following is a list of the tokens used by YASS and their byte-code representations. These values are used by the compiler when it constructs the IAST. Some entries represent internal compiler nodes rather than source-code keywords, so their keyword column is blank.

Byte code Name Keyword or syntax
-30 IMPLEMENTS implements
-29 INTERFACE interface
-28 ORDERED_MAP_TYPE
-27 FLOOR_DIVIDE div
-26 IS_TYPE_OF
-25 QUERY
-24 WHERE where
-23 SELECT select
-22 TEST test
-21 DOUBLE_FAT_ARROW ==>
-20 BLOCK block
-19 LABEL label
-18 GOTO goto
-17 MODULE module
-16 TEMPLATE `
-15 TYPE type
typeof
-14 BREAKPOINT #breakpoint#
-13 TYPED_PARAMETER
-12 DIRECTIVE directive
-11 CAST cast
-10 NAMED_ARGUMENT
-9 EXPRESSION
-8 LOGICAL_EXPRESSION
-7 INFINITE_PARAMETERS
-6 ARGUMENTS
-5 PARAMETERS
-4 NULL null
-3 UNDEFINED undefined
-2 EXECUTION_FAILED
-1 RESERVED
0 PROTECTED protected
1 PRIVATE private
2 PUBLIC public
3 IDENTIFIER _?([A-Za-z][A-Za-z0-9_~]*)
4 VAR $
5 INT [+-]?[0-9]+
6 DOUBLE 3.14
-0.5
1E6
7 BOOL true
false
8 STRING "..."
'...'
9 OBJECT {}
10 LIST []
11 ASSOCIATION
DOUBLE_ARROW
=>
12 FUNCTION function
13 EMPTY empty
14 IS_SET is_set
15 UNSET unset
16 ASSIGN =
17 END end
18 LBRA (
19 RBRA )
20 COMMA ,
21 IF if
22 ELSE else
23 ELSEIF elseif
24 WHEN when
25 IS is
26 SWITCH switch
27 CASE case
28 DEFAULT default
29 OTHERWISE otherwise
30 WHILE while
31 UNTIL until
32 FOR for
33 FOR_TO
34 EQUAL ==
35 NEQUAL !=
36 GT >
37 LT <
38 GTE >=
≥
39 LTE <=
≤
40 EXACTLY_EQUAL ===
41 EXACTLY_NEQUAL !==
42 LAND &&
∧
43 LOR ||
∨
44 POST_INCREMENT
45 PRE_INCREMENT
46 POST_DECREMENT
47 PRE_DECREMENT
48 INCREMENT ++
49 DECREMENT --
50 LSQBR [
51 RSQBR ]
52 DO do
53 LBRACE {
54 RBRACE }
55 PLUS +
56 MULT *
57 MINUS -
58 DIVIDE /
59 MODULO %
60 CIRCUMFLEX ^
61 EACH each
62 AS as
63 IN in
64 STRUCTURE structure
struct
class
65 NEW new
66 ARROW_OPERATOR ->
67 DOT .
68 THEN then
69 SEMI_COLON ;
70 THIS this
self
super
71 LAMBDA_CALL
72 AT @
73 TERNARY ?
74 COLON :
75 TRY try
76 CATCH catch
on_error
77 CONCAT &
78 HEXADECIMAL (0|1)x[0-9A-Fa-f]+
79 OCTAL (0|1)o[0-7]+
80 BINARY (0|1)b[01]+
81 INCLUDES includes
82 IMPORT import
require
83 ARROW_EXPRESSION =>
84 RETURN return
85 BREAK break
86 NEGATION !
not
87 VAR_BY_REF &$
88 INDEX_ACCESSOR
89 DECONSTRUCTING_ASSIGNMENT ($x, $y) = ...
$x, $y = ...
90 TUPLE (a, b)
91 NEGATIVE
92 DEFINE define
93 ASSERT assert
94 INHERITS inherits
extends
95 COUNT count
length
96 ALT_VALUE ??
97 TO to
98 LOOP loop
99 OPEN_HEREDOC <<
100 CLOSE_HEREDOC >>
101 MATCH match
102 MULTI_ASSIGN *=
103 DIVIDE_ASSIGN /=
104 POWER_ASSIGN ^=
105 LET let
var
106 CONST const
107 NAMESPACE namespace
108 BE be
109 DECLARE declare
110 RECORD record
111 FIELD
112 STATIC static
113 SCOPE_RESOLUTION ::
114 GLOBAL global
115 FROM from
116 PIPE
UNION_TYPE
|
117 SPECIAL_KEYWORD increase
by
online
118 MIXED_TYPE mixed
119 STRING_TYPE string
120 NUMBER_TYPE number
121 BOOLEAN_TYPE boolean
122 LIST_TYPE list
123 MAP_TYPE map
124 FUNCTION_TYPE fn
125 OBJECT_TYPE object
126 RETURN_TYPE
127 PRINT print

DOUBLE_ARROW is an alias of ASSOCIATION, and UNION_TYPE is an alias of PIPE. Each pair therefore shares a byte-code value.

SPECIAL_KEYWORD is assigned to context-sensitive words that do not need separate byte-code values. The current special keywords are increase, by, and online.

Comments

There are no comments on this page.

New comment

Comments are welcome and encouraged, including disagreement and critique. However, this is not a space for abuse. Disagreement is welcome; personal attacks, harassment, or hate will be removed instantly. This site reflects personal opinions, not universal truths. If you can’t distinguish between the two, this probably isn’t the place for you. The system temporarily stores IP addresses and browser user agents for the purposes of spam prevention, moderation, and safeguarding. This data is automatically removed after fourteen days. Your email address is stored so that replies can be sent to your email address.

Comments powered by BalfComment

Feedback 👍
Comments are sent via email to me.