-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtokens-list.hug
265 lines (239 loc) · 5.93 KB
/
tokens-list.hug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
! ******************************************************************************
! * *
! * All Hugo Tokens *
! * *
! ******************************************************************************
! This test files contains all the Hugo tokens in one file, to quickly check
! that they are all captured as expected.
! ==============================================================================
! [opt] Operators
! ==============================================================================
! Comparison operators
< <= == ~= >= >
! Mathematical operators:
* / - +
! Bitwise operators:
& | ~
! ------------------------------------------------------------------------------
! Special Tokens
! ------------------------------------------------------------------------------
! Hash (#) for properties count, and ampersand (&) for addresses:
# &
if obj.#adjectives
x = &object.property
! ==============================================================================
! [std] Punctuation
! ==============================================================================
{ } [ ] ( ) ; .
! ==============================================================================
! [kwa] Hugo keywords
! ==============================================================================
! The full list of Hugo keywords, currently all captured as Keywords Group 1.
addcontext
alias
and
anything
array
attribute
break
call
capital
case
child
children
class
cls
color
colour
compound
constant
dict
do
elder
eldest
else
elseif
enumerate
event
for
global
graphics
held
hex
if
in
input
is
jump
local
locate
move
multi
multiheld
multinotheld
music
nearby
newline
not
notheld
number
or
parent
pause
picture
playback
print
printchar
property
punctuation
quit
random
readfile
readval
recordoff
recordon
removal
remove
repeat
replace
resource
restart
restore
return
routine
run
runevents
save
scriptoff
scripton
select
sibling
sound
start
step
string
synonym
system
text
to
undo
verb
video
while
window
word
writefile
writeval
xverb
younger
youngest
! ==============================================================================
! [kwb] Predefined Engine Stored Values
! ==============================================================================
! Keywords Group 2 gathers various predefined global engines values, variables
! and constants.
! ------------------------------------------------------------------------------
! Builtin Global Variables
! ------------------------------------------------------------------------------
actor
endflag
location
object
objects
player
prompt
self
system_status
verbroutine
words
xobject
! ------------------------------------------------------------------------------
! Builtin Properties
! ------------------------------------------------------------------------------
! NOTE: "adjectives" and "nouns" are aliases defined by hugo library, and not
! tokens defined in the Hugo engine and compiler.
adjective
after
article
before
name
noun
! ------------------------------------------------------------------------------
! Built-in Engine Variables
! ------------------------------------------------------------------------------
parse$
serial$
! ==============================================================================
! [kwc] Special System Words
! ==============================================================================
! Keywords Group 3, includes Char constants and other special system- defined
! tokens that didn't fit elsewhere.
! ------------------------------------------------------------------------------
! ASCII Characters Constants
! ------------------------------------------------------------------------------
printchar 'A', 'B'
! ------------------------------------------------------------------------------
! Hardcoded Boolean Constants
! ------------------------------------------------------------------------------
true
false
! ------------------------------------------------------------------------------
! System Words
! ------------------------------------------------------------------------------
~all
~and
~any
~except
~oops
! ------------------------------------------------------------------------------
! Properties Qualifiers
! ------------------------------------------------------------------------------
$additive
$complex
! ==============================================================================
! [kwd] Limit Settings
! ==============================================================================
! Limit settings are currently captured as Keywords Group 4.
! See The Hugo Book: Appendix C: Limit Settings.
! Static and non-modifiable limits:
$MAXATTRIBUTES
$MAXGLOBALS
$MAXLOCALS
! Modifiable limits settings:
$MAXALIASES
$MAXARRAYS
$MAXCONSTANTS
$MAXDICTEXTEND
$MAXDICT
$MAXDIRECTORIES
$MAXEVENTS
$MAXFLAGS
$MAXLABELS
$MAXOBJECTS
$MAXPROPERTIES
$MAXROUTINES
$MAXSPECIALWORDS
! ==============================================================================
! Compiler Directives
! ==============================================================================
#if
#ifclear SOME_FLAG
#if clear SOME_FLAG
#ifdefined SOME_FLAG
#if defined SOME_FLAG
#ifset SOME_FLAG
#if set SOME_FLAG
#ifundefined SOME_FLAG
#if undefined SOME_FLAG
#else
#elseif
#endif
#clear SOME_FLAG
#set SOME_FLAG
#include "filename"
#link"filename"
#message "Hello world!"
#message warning "Be careful!"
#message error "Thigs went down the drain!"
#switches -ls
#version 2.5