Последняя активность 1734365264

yumaikas's Avatar yumaikas ревизий этого фрагмента 1734365264. К ревизии

1 file changed, 1198 insertions

html_calc.gd(файл создан)

@@ -0,0 +1,1198 @@
1 + class_name VeraGenerated
2 + extends Reference
3 + var strings: Array = []
4 + var slots: Dictionary = {}
5 + var huge: int = 9223372036854775807
6 + func _c_get(k, f):
7 + if counters.has(k):
8 + return counters[k]
9 + return f
10 +
11 + var string_constants = [
12 + "br",
13 + "app",
14 + "button",
15 + "calc-output",
16 + "div",
17 + "AC",
18 + "All Clear",
19 + "C",
20 + "Clear",
21 + "0",
22 + "9",
23 + "8",
24 + "7",
25 + "6",
26 + "5",
27 + "4",
28 + "3",
29 + "2",
30 + "1",
31 + "+",
32 + "/",
33 + "*",
34 + "-",
35 + ".",
36 + "=",
37 + "Press 7",
38 + "Press 8",
39 + "Press 9",
40 + "Press Divide",
41 + "Press 4",
42 + "Press 5",
43 + "Press 6",
44 + "Press Multiply",
45 + "Press 1",
46 + "Press 2",
47 + "Press 3",
48 + "Press Subtract",
49 + "Press 0",
50 + "Press Dot",
51 + "Press Equal",
52 + "Press Add",
53 + ]
54 + func _set_slot_DOM_id():
55 + slots["DOM id"] = strings.pop_front()
56 +
57 + func _fetch_slot_DOM_id():
58 + strings.push_back(slots["DOM id"])
59 +
60 + func _set_slot_inner_content():
61 + slots["inner content"] = strings.pop_front()
62 +
63 + func _fetch_slot_inner_content():
64 + strings.push_back(slots["inner content"])
65 +
66 + func _set_slot_vera_event():
67 + slots["vera event"] = strings.pop_front()
68 +
69 + func _fetch_slot_vera_event():
70 + strings.push_back(slots["vera event"])
71 +
72 + func _set_slot_num_A():
73 + slots["num A"] = strings.pop_front()
74 +
75 + func _fetch_slot_num_A():
76 + strings.push_back(slots["num A"])
77 +
78 + func _set_slot_num_B():
79 + slots["num B"] = strings.pop_front()
80 +
81 + func _fetch_slot_num_B():
82 + strings.push_back(slots["num B"])
83 +
84 + func _set_slot_acc():
85 + slots["acc"] = strings.pop_front()
86 +
87 + func _fetch_slot_acc():
88 + strings.push_back(slots["acc"])
89 +
90 + func _set_slot_mem():
91 + slots["mem"] = strings.pop_front()
92 +
93 + func _fetch_slot_mem():
94 + strings.push_back(slots["mem"])
95 +
96 + var counters = {
97 + "ui init" = 1,
98 + }
99 + func on_log_string(counters):
100 + push_error('on_log_string is not implemented!');
101 +
102 +
103 + func on_clear_log(counters):
104 + push_error('on_clear_log is not implemented!');
105 +
106 +
107 + func on_reset_ui(counters):
108 + push_error('on_reset_ui is not implemented!');
109 +
110 + func match():
111 + var _ = counters
112 + if _["push string"] > 0:
113 + strings.push_back(string_constants[_["push string"]-1])
114 + _["push string"] = 0
115 + return true
116 +
117 + if counters["set slot DOM id"] > 0 and counters["nostub"] > 0:
118 + set_slot_DOM_id(counters)
119 +
120 + counters["set slot DOM id"] = 0
121 +
122 + counters["nostub"] = 0
123 + return true
124 +
125 +
126 + if counters["fetch slot DOM id"] > 0 and counters["nostub"] > 0:
127 + fetch_slot_DOM_id(counters)
128 +
129 + counters["fetch slot DOM id"] = 0
130 +
131 + counters["nostub"] = 0
132 + return true
133 +
134 +
135 + if counters["set slot inner content"] > 0 and counters["nostub"] > 0:
136 + set_slot_inner_content(counters)
137 +
138 + counters["set slot inner content"] = 0
139 +
140 + counters["nostub"] = 0
141 + return true
142 +
143 +
144 + if counters["fetch slot inner content"] > 0 and counters["nostub"] > 0:
145 + fetch_slot_inner_content(counters)
146 +
147 + counters["fetch slot inner content"] = 0
148 +
149 + counters["nostub"] = 0
150 + return true
151 +
152 +
153 + if counters["set slot vera event"] > 0 and counters["nostub"] > 0:
154 + set_slot_vera_event(counters)
155 +
156 + counters["set slot vera event"] = 0
157 +
158 + counters["nostub"] = 0
159 + return true
160 +
161 +
162 + if counters["fetch slot vera event"] > 0 and counters["nostub"] > 0:
163 + fetch_slot_vera_event(counters)
164 +
165 + counters["fetch slot vera event"] = 0
166 +
167 + counters["nostub"] = 0
168 + return true
169 +
170 +
171 + if counters["set slot num A"] > 0 and counters["nostub"] > 0:
172 + set_slot_num_A(counters)
173 +
174 + counters["set slot num A"] = 0
175 +
176 + counters["nostub"] = 0
177 + return true
178 +
179 +
180 + if counters["fetch slot num A"] > 0 and counters["nostub"] > 0:
181 + fetch_slot_num_A(counters)
182 +
183 + counters["fetch slot num A"] = 0
184 +
185 + counters["nostub"] = 0
186 + return true
187 +
188 +
189 + if counters["set slot num B"] > 0 and counters["nostub"] > 0:
190 + set_slot_num_B(counters)
191 +
192 + counters["set slot num B"] = 0
193 +
194 + counters["nostub"] = 0
195 + return true
196 +
197 +
198 + if counters["fetch slot num B"] > 0 and counters["nostub"] > 0:
199 + fetch_slot_num_B(counters)
200 +
201 + counters["fetch slot num B"] = 0
202 +
203 + counters["nostub"] = 0
204 + return true
205 +
206 +
207 + if counters["set slot acc"] > 0 and counters["nostub"] > 0:
208 + set_slot_acc(counters)
209 +
210 + counters["set slot acc"] = 0
211 +
212 + counters["nostub"] = 0
213 + return true
214 +
215 +
216 + if counters["fetch slot acc"] > 0 and counters["nostub"] > 0:
217 + fetch_slot_acc(counters)
218 +
219 + counters["fetch slot acc"] = 0
220 +
221 + counters["nostub"] = 0
222 + return true
223 +
224 +
225 + if counters["set slot mem"] > 0 and counters["nostub"] > 0:
226 + set_slot_mem(counters)
227 +
228 + counters["set slot mem"] = 0
229 +
230 + counters["nostub"] = 0
231 + return true
232 +
233 +
234 + if counters["fetch slot mem"] > 0 and counters["nostub"] > 0:
235 + fetch_slot_mem(counters)
236 +
237 + counters["fetch slot mem"] = 0
238 +
239 + counters["nostub"] = 0
240 + return true
241 +
242 +
243 + if counters["@on log"] > 0:
244 + on_log_string(counters)
245 +
246 + counters["@on log"] = 0
247 + return true
248 +
249 +
250 + if counters["@clear log"] > 0:
251 + on_clear_log(counters)
252 +
253 + counters["@clear log"] = 0
254 + return true
255 +
256 +
257 + if counters["@reset ui"] > 0:
258 + on_reset_ui(counters)
259 +
260 + counters["@reset ui"] = 0
261 + return true
262 +
263 +
264 + if _["# meta code status"] > 0:
265 +
266 + var acc = _c_get("# meta code status", 0)
267 + _["# meta code status"] = max(_c_get("# meta code status", 0) - acc, 0);
268 + _["Untested"] = _c_get("Untested", 0) + acc * 1;
269 + _["uncompiled"] = _c_get("uncompiled", 0) + acc * 1;
270 + return true
271 +
272 + if _["#include"] > 0 and _["strings.nv"] > 0 and _["slots.nv"] > 0 and _["DOM.nv"] > 0:
273 +
274 + var acc = huge
275 + acc = min(acc, _c_get("#include", 0)
276 + acc = min(acc, _c_get("strings.nv", 0)
277 + acc = min(acc, _c_get("slots.nv", 0)
278 + acc = min(acc, _c_get("DOM.nv", 0)
279 + _["#include"] = max(_c_get("#include", 0) - acc, 0);
280 + _["strings.nv"] = max(_c_get("strings.nv", 0) - acc, 0);
281 + _["slots.nv"] = max(_c_get("slots.nv", 0) - acc, 0);
282 + _["DOM.nv"] = max(_c_get("DOM.nv", 0) - acc, 0);
283 + return true
284 +
285 + if _["add string br"] > 0:
286 +
287 + var acc = _c_get("add string br", 0)
288 + _["add string br"] = max(_c_get("add string br", 0) - acc, 0);
289 + _["push string"] = _c_get("push string", 0) + acc * 1;
290 + return true
291 +
292 + if _["add string app"] > 0:
293 +
294 + var acc = _c_get("add string app", 0)
295 + _["add string app"] = max(_c_get("add string app", 0) - acc, 0);
296 + _["push string"] = _c_get("push string", 0) + acc * 2;
297 + return true
298 +
299 + if _["add string button"] > 0:
300 +
301 + var acc = _c_get("add string button", 0)
302 + _["add string button"] = max(_c_get("add string button", 0) - acc, 0);
303 + _["push string"] = _c_get("push string", 0) + acc * 3;
304 + return true
305 +
306 + if _["add string calc-output"] > 0:
307 +
308 + var acc = _c_get("add string calc-output", 0)
309 + _["add string calc-output"] = max(_c_get("add string calc-output", 0) - acc, 0);
310 + _["push string"] = _c_get("push string", 0) + acc * 4;
311 + return true
312 +
313 + if _["add string div"] > 0:
314 +
315 + var acc = _c_get("add string div", 0)
316 + _["add string div"] = max(_c_get("add string div", 0) - acc, 0);
317 + _["push string"] = _c_get("push string", 0) + acc * 5;
318 + return true
319 +
320 + if _["add string AC"] > 0:
321 +
322 + var acc = _c_get("add string AC", 0)
323 + _["add string AC"] = max(_c_get("add string AC", 0) - acc, 0);
324 + _["push string"] = _c_get("push string", 0) + acc * 6;
325 + return true
326 +
327 + if _["add string All Clear"] > 0:
328 +
329 + var acc = _c_get("add string All Clear", 0)
330 + _["add string All Clear"] = max(_c_get("add string All Clear", 0) - acc, 0);
331 + _["push string"] = _c_get("push string", 0) + acc * 7;
332 + return true
333 +
334 + if _["add string C"] > 0:
335 +
336 + var acc = _c_get("add string C", 0)
337 + _["add string C"] = max(_c_get("add string C", 0) - acc, 0);
338 + _["push string"] = _c_get("push string", 0) + acc * 8;
339 + return true
340 +
341 + if _["add string Clear"] > 0:
342 +
343 + var acc = _c_get("add string Clear", 0)
344 + _["add string Clear"] = max(_c_get("add string Clear", 0) - acc, 0);
345 + _["push string"] = _c_get("push string", 0) + acc * 9;
346 + return true
347 +
348 + if _["add string 0"] > 0:
349 +
350 + var acc = _c_get("add string 0", 0)
351 + _["add string 0"] = max(_c_get("add string 0", 0) - acc, 0);
352 + _["push string"] = _c_get("push string", 0) + acc * 10;
353 + return true
354 +
355 + if _["add string 9"] > 0:
356 +
357 + var acc = _c_get("add string 9", 0)
358 + _["add string 9"] = max(_c_get("add string 9", 0) - acc, 0);
359 + _["push string"] = _c_get("push string", 0) + acc * 11;
360 + return true
361 +
362 + if _["add string 8"] > 0:
363 +
364 + var acc = _c_get("add string 8", 0)
365 + _["add string 8"] = max(_c_get("add string 8", 0) - acc, 0);
366 + _["push string"] = _c_get("push string", 0) + acc * 12;
367 + return true
368 +
369 + if _["add string 7"] > 0:
370 +
371 + var acc = _c_get("add string 7", 0)
372 + _["add string 7"] = max(_c_get("add string 7", 0) - acc, 0);
373 + _["push string"] = _c_get("push string", 0) + acc * 13;
374 + return true
375 +
376 + if _["add string 6"] > 0:
377 +
378 + var acc = _c_get("add string 6", 0)
379 + _["add string 6"] = max(_c_get("add string 6", 0) - acc, 0);
380 + _["push string"] = _c_get("push string", 0) + acc * 14;
381 + return true
382 +
383 + if _["add string 5"] > 0:
384 +
385 + var acc = _c_get("add string 5", 0)
386 + _["add string 5"] = max(_c_get("add string 5", 0) - acc, 0);
387 + _["push string"] = _c_get("push string", 0) + acc * 15;
388 + return true
389 +
390 + if _["add string 4"] > 0:
391 +
392 + var acc = _c_get("add string 4", 0)
393 + _["add string 4"] = max(_c_get("add string 4", 0) - acc, 0);
394 + _["push string"] = _c_get("push string", 0) + acc * 16;
395 + return true
396 +
397 + if _["add string 3"] > 0:
398 +
399 + var acc = _c_get("add string 3", 0)
400 + _["add string 3"] = max(_c_get("add string 3", 0) - acc, 0);
401 + _["push string"] = _c_get("push string", 0) + acc * 17;
402 + return true
403 +
404 + if _["add string 2"] > 0:
405 +
406 + var acc = _c_get("add string 2", 0)
407 + _["add string 2"] = max(_c_get("add string 2", 0) - acc, 0);
408 + _["push string"] = _c_get("push string", 0) + acc * 18;
409 + return true
410 +
411 + if _["add string 1"] > 0:
412 +
413 + var acc = _c_get("add string 1", 0)
414 + _["add string 1"] = max(_c_get("add string 1", 0) - acc, 0);
415 + _["push string"] = _c_get("push string", 0) + acc * 19;
416 + return true
417 +
418 + if _["add string +"] > 0:
419 +
420 + var acc = _c_get("add string +", 0)
421 + _["add string +"] = max(_c_get("add string +", 0) - acc, 0);
422 + _["push string"] = _c_get("push string", 0) + acc * 20;
423 + return true
424 +
425 + if _["add string /"] > 0:
426 +
427 + var acc = _c_get("add string /", 0)
428 + _["add string /"] = max(_c_get("add string /", 0) - acc, 0);
429 + _["push string"] = _c_get("push string", 0) + acc * 21;
430 + return true
431 +
432 + if _["add string *"] > 0:
433 +
434 + var acc = _c_get("add string *", 0)
435 + _["add string *"] = max(_c_get("add string *", 0) - acc, 0);
436 + _["push string"] = _c_get("push string", 0) + acc * 22;
437 + return true
438 +
439 + if _["add string -"] > 0:
440 +
441 + var acc = _c_get("add string -", 0)
442 + _["add string -"] = max(_c_get("add string -", 0) - acc, 0);
443 + _["push string"] = _c_get("push string", 0) + acc * 23;
444 + return true
445 +
446 + if _["add string ."] > 0:
447 +
448 + var acc = _c_get("add string .", 0)
449 + _["add string ."] = max(_c_get("add string .", 0) - acc, 0);
450 + _["push string"] = _c_get("push string", 0) + acc * 24;
451 + return true
452 +
453 + if _["add string ="] > 0:
454 +
455 + var acc = _c_get("add string =", 0)
456 + _["add string ="] = max(_c_get("add string =", 0) - acc, 0);
457 + _["push string"] = _c_get("push string", 0) + acc * 25;
458 + return true
459 +
460 + if _["add string Press 7"] > 0:
461 +
462 + var acc = _c_get("add string Press 7", 0)
463 + _["add string Press 7"] = max(_c_get("add string Press 7", 0) - acc, 0);
464 + _["push string"] = _c_get("push string", 0) + acc * 26;
465 + return true
466 +
467 + if _["add string Press 8"] > 0:
468 +
469 + var acc = _c_get("add string Press 8", 0)
470 + _["add string Press 8"] = max(_c_get("add string Press 8", 0) - acc, 0);
471 + _["push string"] = _c_get("push string", 0) + acc * 27;
472 + return true
473 +
474 + if _["add string Press 9"] > 0:
475 +
476 + var acc = _c_get("add string Press 9", 0)
477 + _["add string Press 9"] = max(_c_get("add string Press 9", 0) - acc, 0);
478 + _["push string"] = _c_get("push string", 0) + acc * 28;
479 + return true
480 +
481 + if _["add string Press Divide"] > 0:
482 +
483 + var acc = _c_get("add string Press Divide", 0)
484 + _["add string Press Divide"] = max(_c_get("add string Press Divide", 0) - acc, 0);
485 + _["push string"] = _c_get("push string", 0) + acc * 29;
486 + return true
487 +
488 + if _["add string Press 4"] > 0:
489 +
490 + var acc = _c_get("add string Press 4", 0)
491 + _["add string Press 4"] = max(_c_get("add string Press 4", 0) - acc, 0);
492 + _["push string"] = _c_get("push string", 0) + acc * 30;
493 + return true
494 +
495 + if _["add string Press 5"] > 0:
496 +
497 + var acc = _c_get("add string Press 5", 0)
498 + _["add string Press 5"] = max(_c_get("add string Press 5", 0) - acc, 0);
499 + _["push string"] = _c_get("push string", 0) + acc * 31;
500 + return true
501 +
502 + if _["add string Press 6"] > 0:
503 +
504 + var acc = _c_get("add string Press 6", 0)
505 + _["add string Press 6"] = max(_c_get("add string Press 6", 0) - acc, 0);
506 + _["push string"] = _c_get("push string", 0) + acc * 32;
507 + return true
508 +
509 + if _["add string Press Multiply"] > 0:
510 +
511 + var acc = _c_get("add string Press Multiply", 0)
512 + _["add string Press Multiply"] = max(_c_get("add string Press Multiply", 0) - acc, 0);
513 + _["push string"] = _c_get("push string", 0) + acc * 33;
514 + return true
515 +
516 + if _["add string Press 1"] > 0:
517 +
518 + var acc = _c_get("add string Press 1", 0)
519 + _["add string Press 1"] = max(_c_get("add string Press 1", 0) - acc, 0);
520 + _["push string"] = _c_get("push string", 0) + acc * 34;
521 + return true
522 +
523 + if _["add string Press 2"] > 0:
524 +
525 + var acc = _c_get("add string Press 2", 0)
526 + _["add string Press 2"] = max(_c_get("add string Press 2", 0) - acc, 0);
527 + _["push string"] = _c_get("push string", 0) + acc * 35;
528 + return true
529 +
530 + if _["add string Press 3"] > 0:
531 +
532 + var acc = _c_get("add string Press 3", 0)
533 + _["add string Press 3"] = max(_c_get("add string Press 3", 0) - acc, 0);
534 + _["push string"] = _c_get("push string", 0) + acc * 36;
535 + return true
536 +
537 + if _["add string Press Subtract"] > 0:
538 +
539 + var acc = _c_get("add string Press Subtract", 0)
540 + _["add string Press Subtract"] = max(_c_get("add string Press Subtract", 0) - acc, 0);
541 + _["push string"] = _c_get("push string", 0) + acc * 37;
542 + return true
543 +
544 + if _["add string Press 0"] > 0:
545 +
546 + var acc = _c_get("add string Press 0", 0)
547 + _["add string Press 0"] = max(_c_get("add string Press 0", 0) - acc, 0);
548 + _["push string"] = _c_get("push string", 0) + acc * 38;
549 + return true
550 +
551 + if _["add string Press Dot"] > 0:
552 +
553 + var acc = _c_get("add string Press Dot", 0)
554 + _["add string Press Dot"] = max(_c_get("add string Press Dot", 0) - acc, 0);
555 + _["push string"] = _c_get("push string", 0) + acc * 39;
556 + return true
557 +
558 + if _["add string Press Equal"] > 0:
559 +
560 + var acc = _c_get("add string Press Equal", 0)
561 + _["add string Press Equal"] = max(_c_get("add string Press Equal", 0) - acc, 0);
562 + _["push string"] = _c_get("push string", 0) + acc * 40;
563 + return true
564 +
565 + if _["add string Press Add"] > 0:
566 +
567 + var acc = _c_get("add string Press Add", 0)
568 + _["add string Press Add"] = max(_c_get("add string Press Add", 0) - acc, 0);
569 + _["push string"] = _c_get("push string", 0) + acc * 41;
570 + return true
571 +
572 + if _["ui init"] > 0:
573 +
574 + var acc = _c_get("ui init", 0)
575 + _["ui init"] = max(_c_get("ui init", 0) - acc, 0);
576 + _["@reset ui"] = _c_get("@reset ui", 0) + acc * 1;
577 + _["add string app"] = _c_get("add string app", 0) + acc * 1;
578 + _["mount element by id"] = _c_get("mount element by id", 0) + acc * 1;
579 + _["create display label"] = _c_get("create display label", 0) + acc * 1;
580 + _["create buttons"] = _c_get("create buttons", 0) + acc * 1;
581 + _["mount to output"] = _c_get("mount to output", 0) + acc * 1;
582 + return true
583 +
584 + if _["create button"] > 0:
585 +
586 + var acc = _c_get("create button", 0)
587 + _["create button"] = max(_c_get("create button", 0) - acc, 0);
588 + _["set slot inner content"] = _c_get("set slot inner content", 0) + acc * 1;
589 + _["set slot vera event"] = _c_get("set slot vera event", 0) + acc * 1;
590 + _["create button.2"] = _c_get("create button.2", 0) + acc * 1;
591 + return true
592 +
593 + if _["create button.2"] > 0:
594 +
595 + var acc = _c_get("create button.2", 0)
596 + _["create button.2"] = max(_c_get("create button.2", 0) - acc, 0);
597 + _["add string button"] = _c_get("add string button", 0) + acc * 1;
598 + _["create element"] = _c_get("create element", 0) + acc * 1;
599 + return true
600 +
601 + if _["next row"] > 0:
602 +
603 + var acc = _c_get("next row", 0)
604 + _["next row"] = max(_c_get("next row", 0) - acc, 0);
605 + _["add string br"] = _c_get("add string br", 0) + acc * 1;
606 + _["create element"] = _c_get("create element", 0) + acc * 1;
607 + return true
608 +
609 + if _["create element"] > 0:
610 +
611 + var acc = _c_get("create element", 0)
612 + _["create element"] = max(_c_get("create element", 0) - acc, 0);
613 + _["@create element"] = _c_get("@create element", 0) + acc * 1;
614 + return true
615 +
616 + if _["mount element by id"] > 0:
617 +
618 + var acc = _c_get("mount element by id", 0)
619 + _["mount element by id"] = max(_c_get("mount element by id", 0) - acc, 0);
620 + _["@mount element by id"] = _c_get("@mount element by id", 0) + acc * 1;
621 + return true
622 +
623 + if _["create display label"] > 0:
624 +
625 + var acc = _c_get("create display label", 0)
626 + _["create display label"] = max(_c_get("create display label", 0) - acc, 0);
627 + _["add string calc-output"] = _c_get("add string calc-output", 0) + acc * 1;
628 + _["set DOM id"] = _c_get("set DOM id", 0) + acc * 1;
629 + _["create display label.2"] = _c_get("create display label.2", 0) + acc * 1;
630 + return true
631 +
632 + if _["set DOM id"] > 0:
633 +
634 + var acc = _c_get("set DOM id", 0)
635 + _["set DOM id"] = max(_c_get("set DOM id", 0) - acc, 0);
636 + _["set slot DOM id"] = _c_get("set slot DOM id", 0) + acc * 1;
637 + return true
638 +
639 + if _["create display label.2"] > 0:
640 +
641 + var acc = _c_get("create display label.2", 0)
642 + _["create display label.2"] = max(_c_get("create display label.2", 0) - acc, 0);
643 + _["add string div"] = _c_get("add string div", 0) + acc * 1;
644 + _["create element"] = _c_get("create element", 0) + acc * 1;
645 + _["finish label row"] = _c_get("finish label row", 0) + acc * 1;
646 + return true
647 +
648 + if _["finish label row"] > 0:
649 +
650 + var acc = _c_get("finish label row", 0)
651 + _["finish label row"] = max(_c_get("finish label row", 0) - acc, 0);
652 + _["next row"] = _c_get("next row", 0) + acc * 1;
653 + return true
654 +
655 + if _["create buttons"] > 0:
656 +
657 + var acc = _c_get("create buttons", 0)
658 + _["create buttons"] = max(_c_get("create buttons", 0) - acc, 0);
659 + _["create AC C row"] = _c_get("create AC C row", 0) + acc * 1;
660 + _["create 7 8 9 / row"] = _c_get("create 7 8 9 / row", 0) + acc * 1;
661 + _["create 4 5 6 * row"] = _c_get("create 4 5 6 * row", 0) + acc * 1;
662 + _["create 1 2 3 - row"] = _c_get("create 1 2 3 - row", 0) + acc * 1;
663 + _["create 0 . = +"] = _c_get("create 0 . = +", 0) + acc * 1;
664 + return true
665 +
666 + if _["create AC C row"] > 0:
667 +
668 + var acc = _c_get("create AC C row", 0)
669 + _["create AC C row"] = max(_c_get("create AC C row", 0) - acc, 0);
670 + _["create AC button"] = _c_get("create AC button", 0) + acc * 1;
671 + _["create C button"] = _c_get("create C button", 0) + acc * 1;
672 + return true
673 +
674 + if _["create AC button"] > 0:
675 +
676 + var acc = _c_get("create AC button", 0)
677 + _["create AC button"] = max(_c_get("create AC button", 0) - acc, 0);
678 + _["add string AC"] = _c_get("add string AC", 0) + acc * 1;
679 + _["add string All Clear"] = _c_get("add string All Clear", 0) + acc * 1;
680 + _["create button"] = _c_get("create button", 0) + acc * 1;
681 + return true
682 +
683 + if _["create C button"] > 0:
684 +
685 + var acc = _c_get("create C button", 0)
686 + _["create C button"] = max(_c_get("create C button", 0) - acc, 0);
687 + _["add string C"] = _c_get("add string C", 0) + acc * 1;
688 + _["add string Clear"] = _c_get("add string Clear", 0) + acc * 1;
689 + _["create button"] = _c_get("create button", 0) + acc * 1;
690 + _["ACC finish"] = _c_get("ACC finish", 0) + acc * 1;
691 + return true
692 +
693 + if _["ACC finish"] > 0:
694 +
695 + var acc = _c_get("ACC finish", 0)
696 + _["ACC finish"] = max(_c_get("ACC finish", 0) - acc, 0);
697 + _["next row"] = _c_get("next row", 0) + acc * 1;
698 + return true
699 +
700 + if _["create 7 8 9 / row"] > 0:
701 +
702 + var acc = _c_get("create 7 8 9 / row", 0)
703 + _["create 7 8 9 / row"] = max(_c_get("create 7 8 9 / row", 0) - acc, 0);
704 + _["add button 7"] = _c_get("add button 7", 0) + acc * 1;
705 + _["add button 8"] = _c_get("add button 8", 0) + acc * 1;
706 + _["add button 9"] = _c_get("add button 9", 0) + acc * 1;
707 + _["add button /"] = _c_get("add button /", 0) + acc * 1;
708 + return true
709 +
710 + if _["add button 7"] > 0:
711 +
712 + var acc = _c_get("add button 7", 0)
713 + _["add button 7"] = max(_c_get("add button 7", 0) - acc, 0);
714 + _["add string 7"] = _c_get("add string 7", 0) + acc * 1;
715 + _["add string Press 7"] = _c_get("add string Press 7", 0) + acc * 1;
716 + _["create button"] = _c_get("create button", 0) + acc * 1;
717 + return true
718 +
719 + if _["add button 8"] > 0:
720 +
721 + var acc = _c_get("add button 8", 0)
722 + _["add button 8"] = max(_c_get("add button 8", 0) - acc, 0);
723 + _["add string 8"] = _c_get("add string 8", 0) + acc * 1;
724 + _["add string Press 8"] = _c_get("add string Press 8", 0) + acc * 1;
725 + _["create button"] = _c_get("create button", 0) + acc * 1;
726 + return true
727 +
728 + if _["add button 9"] > 0:
729 +
730 + var acc = _c_get("add button 9", 0)
731 + _["add button 9"] = max(_c_get("add button 9", 0) - acc, 0);
732 + _["add string 9"] = _c_get("add string 9", 0) + acc * 1;
733 + _["add string Press 9"] = _c_get("add string Press 9", 0) + acc * 1;
734 + _["create button"] = _c_get("create button", 0) + acc * 1;
735 + return true
736 +
737 + if _["add button /"] > 0:
738 +
739 + var acc = _c_get("add button /", 0)
740 + _["add button /"] = max(_c_get("add button /", 0) - acc, 0);
741 + _["add string /"] = _c_get("add string /", 0) + acc * 1;
742 + _["add string Press Divide"] = _c_get("add string Press Divide", 0) + acc * 1;
743 + _["create button"] = _c_get("create button", 0) + acc * 1;
744 + _["789 Finish"] = _c_get("789 Finish", 0) + acc * 1;
745 + return true
746 +
747 + if _["789 Finish"] > 0:
748 +
749 + var acc = _c_get("789 Finish", 0)
750 + _["789 Finish"] = max(_c_get("789 Finish", 0) - acc, 0);
751 + _["next row"] = _c_get("next row", 0) + acc * 1;
752 + return true
753 +
754 + if _["create 4 5 6 * row"] > 0:
755 +
756 + var acc = _c_get("create 4 5 6 * row", 0)
757 + _["create 4 5 6 * row"] = max(_c_get("create 4 5 6 * row", 0) - acc, 0);
758 + _["add button 4"] = _c_get("add button 4", 0) + acc * 1;
759 + _["add button 5"] = _c_get("add button 5", 0) + acc * 1;
760 + _["add button 6"] = _c_get("add button 6", 0) + acc * 1;
761 + _["add button *"] = _c_get("add button *", 0) + acc * 1;
762 + return true
763 +
764 + if _["add button 4"] > 0:
765 +
766 + var acc = _c_get("add button 4", 0)
767 + _["add button 4"] = max(_c_get("add button 4", 0) - acc, 0);
768 + _["add string 4"] = _c_get("add string 4", 0) + acc * 1;
769 + _["add string Press 4"] = _c_get("add string Press 4", 0) + acc * 1;
770 + _["create button"] = _c_get("create button", 0) + acc * 1;
771 + return true
772 +
773 + if _["add button 5"] > 0:
774 +
775 + var acc = _c_get("add button 5", 0)
776 + _["add button 5"] = max(_c_get("add button 5", 0) - acc, 0);
777 + _["add string 5"] = _c_get("add string 5", 0) + acc * 1;
778 + _["add string Press 5"] = _c_get("add string Press 5", 0) + acc * 1;
779 + _["create button"] = _c_get("create button", 0) + acc * 1;
780 + return true
781 +
782 + if _["add button 6"] > 0:
783 +
784 + var acc = _c_get("add button 6", 0)
785 + _["add button 6"] = max(_c_get("add button 6", 0) - acc, 0);
786 + _["add string 6"] = _c_get("add string 6", 0) + acc * 1;
787 + _["add string Press 6"] = _c_get("add string Press 6", 0) + acc * 1;
788 + _["create button"] = _c_get("create button", 0) + acc * 1;
789 + return true
790 +
791 + if _["add button *"] > 0:
792 +
793 + var acc = _c_get("add button *", 0)
794 + _["add button *"] = max(_c_get("add button *", 0) - acc, 0);
795 + _["add string *"] = _c_get("add string *", 0) + acc * 1;
796 + _["add string Press Multiply"] = _c_get("add string Press Multiply", 0) + acc * 1;
797 + _["create button"] = _c_get("create button", 0) + acc * 1;
798 + _["456 Finish"] = _c_get("456 Finish", 0) + acc * 1;
799 + return true
800 +
801 + if _["456 Finish"] > 0:
802 +
803 + var acc = _c_get("456 Finish", 0)
804 + _["456 Finish"] = max(_c_get("456 Finish", 0) - acc, 0);
805 + _["next row"] = _c_get("next row", 0) + acc * 1;
806 + return true
807 +
808 + if _["create 1 2 3 - row"] > 0:
809 +
810 + var acc = _c_get("create 1 2 3 - row", 0)
811 + _["create 1 2 3 - row"] = max(_c_get("create 1 2 3 - row", 0) - acc, 0);
812 + _["add button 1"] = _c_get("add button 1", 0) + acc * 1;
813 + _["add button 2"] = _c_get("add button 2", 0) + acc * 1;
814 + _["add button 3"] = _c_get("add button 3", 0) + acc * 1;
815 + _["add button -"] = _c_get("add button -", 0) + acc * 1;
816 + return true
817 +
818 + if _["add button 1"] > 0:
819 +
820 + var acc = _c_get("add button 1", 0)
821 + _["add button 1"] = max(_c_get("add button 1", 0) - acc, 0);
822 + _["add string 1"] = _c_get("add string 1", 0) + acc * 1;
823 + _["add string Press 1"] = _c_get("add string Press 1", 0) + acc * 1;
824 + _["create button"] = _c_get("create button", 0) + acc * 1;
825 + return true
826 +
827 + if _["add button 2"] > 0:
828 +
829 + var acc = _c_get("add button 2", 0)
830 + _["add button 2"] = max(_c_get("add button 2", 0) - acc, 0);
831 + _["add string 2"] = _c_get("add string 2", 0) + acc * 1;
832 + _["add string Press 2"] = _c_get("add string Press 2", 0) + acc * 1;
833 + _["create button"] = _c_get("create button", 0) + acc * 1;
834 + return true
835 +
836 + if _["add button 3"] > 0:
837 +
838 + var acc = _c_get("add button 3", 0)
839 + _["add button 3"] = max(_c_get("add button 3", 0) - acc, 0);
840 + _["add string 3"] = _c_get("add string 3", 0) + acc * 1;
841 + _["add string Press 3"] = _c_get("add string Press 3", 0) + acc * 1;
842 + _["create button"] = _c_get("create button", 0) + acc * 1;
843 + return true
844 +
845 + if _["add button -"] > 0:
846 +
847 + var acc = _c_get("add button -", 0)
848 + _["add button -"] = max(_c_get("add button -", 0) - acc, 0);
849 + _["add string -"] = _c_get("add string -", 0) + acc * 1;
850 + _["add string Press Subtract"] = _c_get("add string Press Subtract", 0) + acc * 1;
851 + _["create button"] = _c_get("create button", 0) + acc * 1;
852 + _["123 Finish"] = _c_get("123 Finish", 0) + acc * 1;
853 + return true
854 +
855 + if _["123 Finish"] > 0:
856 +
857 + var acc = _c_get("123 Finish", 0)
858 + _["123 Finish"] = max(_c_get("123 Finish", 0) - acc, 0);
859 + _["next row"] = _c_get("next row", 0) + acc * 1;
860 + return true
861 +
862 + if _["create 0 . = +"] > 0:
863 +
864 + var acc = _c_get("create 0 . = +", 0)
865 + _["create 0 . = +"] = max(_c_get("create 0 . = +", 0) - acc, 0);
866 + _["add button 0"] = _c_get("add button 0", 0) + acc * 1;
867 + _["add button ."] = _c_get("add button .", 0) + acc * 1;
868 + _["add button ="] = _c_get("add button =", 0) + acc * 1;
869 + _["add button +"] = _c_get("add button +", 0) + acc * 1;
870 + return true
871 +
872 + if _["add button 0"] > 0:
873 +
874 + var acc = _c_get("add button 0", 0)
875 + _["add button 0"] = max(_c_get("add button 0", 0) - acc, 0);
876 + _["add string 0"] = _c_get("add string 0", 0) + acc * 1;
877 + _["add string Press 0"] = _c_get("add string Press 0", 0) + acc * 1;
878 + _["create button"] = _c_get("create button", 0) + acc * 1;
879 + return true
880 +
881 + if _["add button ."] > 0:
882 +
883 + var acc = _c_get("add button .", 0)
884 + _["add button ."] = max(_c_get("add button .", 0) - acc, 0);
885 + _["add string ."] = _c_get("add string .", 0) + acc * 1;
886 + _["add string Press Dot"] = _c_get("add string Press Dot", 0) + acc * 1;
887 + _["create button"] = _c_get("create button", 0) + acc * 1;
888 + return true
889 +
890 + if _["add button ="] > 0:
891 +
892 + var acc = _c_get("add button =", 0)
893 + _["add button ="] = max(_c_get("add button =", 0) - acc, 0);
894 + _["add string ="] = _c_get("add string =", 0) + acc * 1;
895 + _["add string Press Equal"] = _c_get("add string Press Equal", 0) + acc * 1;
896 + _["create button"] = _c_get("create button", 0) + acc * 1;
897 + return true
898 +
899 + if _["add button +"] > 0:
900 +
901 + var acc = _c_get("add button +", 0)
902 + _["add button +"] = max(_c_get("add button +", 0) - acc, 0);
903 + _["add string +"] = _c_get("add string +", 0) + acc * 1;
904 + _["add string Press Add"] = _c_get("add string Press Add", 0) + acc * 1;
905 + _["create button"] = _c_get("create button", 0) + acc * 1;
906 + return true
907 +
908 + if _["mount to output"] > 0:
909 +
910 + var acc = _c_get("mount to output", 0)
911 + _["mount to output"] = max(_c_get("mount to output", 0) - acc, 0);
912 + _["add string calc-output"] = _c_get("add string calc-output", 0) + acc * 1;
913 + _["mount element by id"] = _c_get("mount element by id", 0) + acc * 1;
914 + return true
915 +
916 + if _["Clear"] > 0:
917 +
918 + var acc = _c_get("Clear", 0)
919 + _["Clear"] = max(_c_get("Clear", 0) - acc, 0);
920 + _["add string Clear"] = _c_get("add string Clear", 0) + acc * 1;
921 + _["on log"] = _c_get("on log", 0) + acc * 1;
922 + return true
923 +
924 + if _["on log"] > 0:
925 +
926 + var acc = _c_get("on log", 0)
927 + _["on log"] = max(_c_get("on log", 0) - acc, 0);
928 + _["@on log"] = _c_get("@on log", 0) + acc * 1;
929 + return true
930 +
931 + if _["add char"] > 0:
932 +
933 + var acc = _c_get("add char", 0)
934 + _["add char"] = max(_c_get("add char", 0) - acc, 0);
935 + _["string append"] = _c_get("string append", 0) + acc * 1;
936 + _["ac.1"] = _c_get("ac.1", 0) + acc * 1;
937 + _["display acc"] = _c_get("display acc", 0) + acc * 1;
938 + return true
939 +
940 + if _["ac.1"] > 0:
941 +
942 + var acc = _c_get("ac.1", 0)
943 + _["ac.1"] = max(_c_get("ac.1", 0) - acc, 0);
944 + _["set slot acc"] = _c_get("set slot acc", 0) + acc * 1;
945 + return true
946 +
947 + if _["display acc"] > 0:
948 +
949 + var acc = _c_get("display acc", 0)
950 + _["display acc"] = max(_c_get("display acc", 0) - acc, 0);
951 + _["dc.1"] = _c_get("dc.1", 0) + acc * 1;
952 + return true
953 +
954 + if _["dc.1"] > 0:
955 +
956 + var acc = _c_get("dc.1", 0)
957 + _["dc.1"] = max(_c_get("dc.1", 0) - acc, 0);
958 + _["dc.2"] = _c_get("dc.2", 0) + acc * 1;
959 + _["clear element content"] = _c_get("clear element content", 0) + acc * 1;
960 + return true
961 +
962 + if _["dc.2"] > 0:
963 +
964 + var acc = _c_get("dc.2", 0)
965 + _["dc.2"] = max(_c_get("dc.2", 0) - acc, 0);
966 + _["dc.3"] = _c_get("dc.3", 0) + acc * 1;
967 + _["fetch slot acc"] = _c_get("fetch slot acc", 0) + acc * 1;
968 + return true
969 +
970 + if _["dc.3"] > 0:
971 +
972 + var acc = _c_get("dc.3", 0)
973 + _["dc.3"] = max(_c_get("dc.3", 0) - acc, 0);
974 + _["@append string to element"] = _c_get("@append string to element", 0) + acc * 1;
975 + return true
976 +
977 + if _["Number Button Pressed"] > 0:
978 +
979 + var acc = _c_get("Number Button Pressed", 0)
980 + _["Number Button Pressed"] = max(_c_get("Number Button Pressed", 0) - acc, 0);
981 + _["mount to output"] = _c_get("mount to output", 0) + acc * 1;
982 + _["fetch slot acc"] = _c_get("fetch slot acc", 0) + acc * 1;
983 + _["get button char"] = _c_get("get button char", 0) + acc * 1;
984 + _["Finish Number Button Press"] = _c_get("Finish Number Button Press", 0) + acc * 1;
985 + return true
986 +
987 + if _["get button char"] > 0 and _["b0"] > 0:
988 +
989 + var acc = huge
990 + acc = min(acc, _c_get("get button char", 0)
991 + acc = min(acc, _c_get("b0", 0)
992 + _["get button char"] = max(_c_get("get button char", 0) - acc, 0);
993 + _["b0"] = max(_c_get("b0", 0) - acc, 0);
994 + _["add string 0"] = _c_get("add string 0", 0) + acc * 1;
995 + return true
996 +
997 + if _["get button char"] > 0 and _["b1"] > 0:
998 +
999 + var acc = huge
1000 + acc = min(acc, _c_get("get button char", 0)
1001 + acc = min(acc, _c_get("b1", 0)
1002 + _["get button char"] = max(_c_get("get button char", 0) - acc, 0);
1003 + _["b1"] = max(_c_get("b1", 0) - acc, 0);
1004 + _["add string 1"] = _c_get("add string 1", 0) + acc * 1;
1005 + return true
1006 +
1007 + if _["get button char"] > 0 and _["b2"] > 0:
1008 +
1009 + var acc = huge
1010 + acc = min(acc, _c_get("get button char", 0)
1011 + acc = min(acc, _c_get("b2", 0)
1012 + _["get button char"] = max(_c_get("get button char", 0) - acc, 0);
1013 + _["b2"] = max(_c_get("b2", 0) - acc, 0);
1014 + _["add string 2"] = _c_get("add string 2", 0) + acc * 1;
1015 + return true
1016 +
1017 + if _["get button char"] > 0 and _["b3"] > 0:
1018 +
1019 + var acc = huge
1020 + acc = min(acc, _c_get("get button char", 0)
1021 + acc = min(acc, _c_get("b3", 0)
1022 + _["get button char"] = max(_c_get("get button char", 0) - acc, 0);
1023 + _["b3"] = max(_c_get("b3", 0) - acc, 0);
1024 + _["add string 3"] = _c_get("add string 3", 0) + acc * 1;
1025 + return true
1026 +
1027 + if _["get button char"] > 0 and _["b4"] > 0:
1028 +
1029 + var acc = huge
1030 + acc = min(acc, _c_get("get button char", 0)
1031 + acc = min(acc, _c_get("b4", 0)
1032 + _["get button char"] = max(_c_get("get button char", 0) - acc, 0);
1033 + _["b4"] = max(_c_get("b4", 0) - acc, 0);
1034 + _["add string 4"] = _c_get("add string 4", 0) + acc * 1;
1035 + return true
1036 +
1037 + if _["get button char"] > 0 and _["b5"] > 0:
1038 +
1039 + var acc = huge
1040 + acc = min(acc, _c_get("get button char", 0)
1041 + acc = min(acc, _c_get("b5", 0)
1042 + _["get button char"] = max(_c_get("get button char", 0) - acc, 0);
1043 + _["b5"] = max(_c_get("b5", 0) - acc, 0);
1044 + _["add string 5"] = _c_get("add string 5", 0) + acc * 1;
1045 + return true
1046 +
1047 + if _["get button char"] > 0 and _["b6"] > 0:
1048 +
1049 + var acc = huge
1050 + acc = min(acc, _c_get("get button char", 0)
1051 + acc = min(acc, _c_get("b6", 0)
1052 + _["get button char"] = max(_c_get("get button char", 0) - acc, 0);
1053 + _["b6"] = max(_c_get("b6", 0) - acc, 0);
1054 + _["add string 6"] = _c_get("add string 6", 0) + acc * 1;
1055 + return true
1056 +
1057 + if _["get button char"] > 0 and _["b7"] > 0:
1058 +
1059 + var acc = huge
1060 + acc = min(acc, _c_get("get button char", 0)
1061 + acc = min(acc, _c_get("b7", 0)
1062 + _["get button char"] = max(_c_get("get button char", 0) - acc, 0);
1063 + _["b7"] = max(_c_get("b7", 0) - acc, 0);
1064 + _["add string 7"] = _c_get("add string 7", 0) + acc * 1;
1065 + return true
1066 +
1067 + if _["get button char"] > 0 and _["b8"] > 0:
1068 +
1069 + var acc = huge
1070 + acc = min(acc, _c_get("get button char", 0)
1071 + acc = min(acc, _c_get("b8", 0)
1072 + _["get button char"] = max(_c_get("get button char", 0) - acc, 0);
1073 + _["b8"] = max(_c_get("b8", 0) - acc, 0);
1074 + _["add string 8"] = _c_get("add string 8", 0) + acc * 1;
1075 + return true
1076 +
1077 + if _["get button char"] > 0 and _["b9"] > 0:
1078 +
1079 + var acc = huge
1080 + acc = min(acc, _c_get("get button char", 0)
1081 + acc = min(acc, _c_get("b9", 0)
1082 + _["get button char"] = max(_c_get("get button char", 0) - acc, 0);
1083 + _["b9"] = max(_c_get("b9", 0) - acc, 0);
1084 + _["add string 9"] = _c_get("add string 9", 0) + acc * 1;
1085 + return true
1086 +
1087 + if _["get button char"] > 0 and _["b."] > 0:
1088 +
1089 + var acc = huge
1090 + acc = min(acc, _c_get("get button char", 0)
1091 + acc = min(acc, _c_get("b.", 0)
1092 + _["get button char"] = max(_c_get("get button char", 0) - acc, 0);
1093 + _["b."] = max(_c_get("b.", 0) - acc, 0);
1094 + _["add string ."] = _c_get("add string .", 0) + acc * 1;
1095 + return true
1096 +
1097 + if _["Finish Number Button Press"] > 0:
1098 +
1099 + var acc = _c_get("Finish Number Button Press", 0)
1100 + _["Finish Number Button Press"] = max(_c_get("Finish Number Button Press", 0) - acc, 0);
1101 + _["add char"] = _c_get("add char", 0) + acc * 1;
1102 + return true
1103 +
1104 + if _["Press 0"] > 0:
1105 +
1106 + var acc = _c_get("Press 0", 0)
1107 + _["Press 0"] = max(_c_get("Press 0", 0) - acc, 0);
1108 + _["Number Button Pressed"] = _c_get("Number Button Pressed", 0) + acc * 1;
1109 + _["b0"] = _c_get("b0", 0) + acc * 1;
1110 + return true
1111 +
1112 + if _["Press 1"] > 0:
1113 +
1114 + var acc = _c_get("Press 1", 0)
1115 + _["Press 1"] = max(_c_get("Press 1", 0) - acc, 0);
1116 + _["Number Button Pressed"] = _c_get("Number Button Pressed", 0) + acc * 1;
1117 + _["b1"] = _c_get("b1", 0) + acc * 1;
1118 + return true
1119 +
1120 + if _["Press 2"] > 0:
1121 +
1122 + var acc = _c_get("Press 2", 0)
1123 + _["Press 2"] = max(_c_get("Press 2", 0) - acc, 0);
1124 + _["Number Button Pressed"] = _c_get("Number Button Pressed", 0) + acc * 1;
1125 + _["b2"] = _c_get("b2", 0) + acc * 1;
1126 + return true
1127 +
1128 + if _["Press 3"] > 0:
1129 +
1130 + var acc = _c_get("Press 3", 0)
1131 + _["Press 3"] = max(_c_get("Press 3", 0) - acc, 0);
1132 + _["Number Button Pressed"] = _c_get("Number Button Pressed", 0) + acc * 1;
1133 + _["b3"] = _c_get("b3", 0) + acc * 1;
1134 + return true
1135 +
1136 + if _["Press 4"] > 0:
1137 +
1138 + var acc = _c_get("Press 4", 0)
1139 + _["Press 4"] = max(_c_get("Press 4", 0) - acc, 0);
1140 + _["Number Button Pressed"] = _c_get("Number Button Pressed", 0) + acc * 1;
1141 + _["b4"] = _c_get("b4", 0) + acc * 1;
1142 + return true
1143 +
1144 + if _["Press 5"] > 0:
1145 +
1146 + var acc = _c_get("Press 5", 0)
1147 + _["Press 5"] = max(_c_get("Press 5", 0) - acc, 0);
1148 + _["Number Button Pressed"] = _c_get("Number Button Pressed", 0) + acc * 1;
1149 + _["b5"] = _c_get("b5", 0) + acc * 1;
1150 + return true
1151 +
1152 + if _["Press 6"] > 0:
1153 +
1154 + var acc = _c_get("Press 6", 0)
1155 + _["Press 6"] = max(_c_get("Press 6", 0) - acc, 0);
1156 + _["Number Button Pressed"] = _c_get("Number Button Pressed", 0) + acc * 1;
1157 + _["b6"] = _c_get("b6", 0) + acc * 1;
1158 + return true
1159 +
1160 + if _["Press 7"] > 0:
1161 +
1162 + var acc = _c_get("Press 7", 0)
1163 + _["Press 7"] = max(_c_get("Press 7", 0) - acc, 0);
1164 + _["Number Button Pressed"] = _c_get("Number Button Pressed", 0) + acc * 1;
1165 + _["b7"] = _c_get("b7", 0) + acc * 1;
1166 + return true
1167 +
1168 + if _["Press 8"] > 0:
1169 +
1170 + var acc = _c_get("Press 8", 0)
1171 + _["Press 8"] = max(_c_get("Press 8", 0) - acc, 0);
1172 + _["Number Button Pressed"] = _c_get("Number Button Pressed", 0) + acc * 1;
1173 + _["b8"] = _c_get("b8", 0) + acc * 1;
1174 + return true
1175 +
1176 + if _["Press 9"] > 0:
1177 +
1178 + var acc = _c_get("Press 9", 0)
1179 + _["Press 9"] = max(_c_get("Press 9", 0) - acc, 0);
1180 + _["Number Button Pressed"] = _c_get("Number Button Pressed", 0) + acc * 1;
1181 + _["b9"] = _c_get("b9", 0) + acc * 1;
1182 + return true
1183 +
1184 + if _["Press Dot"] > 0:
1185 +
1186 + var acc = _c_get("Press Dot", 0)
1187 + _["Press Dot"] = max(_c_get("Press Dot", 0) - acc, 0);
1188 + _["Number Button Pressed"] = _c_get("Number Button Pressed", 0) + acc * 1;
1189 + _["b."] = _c_get("b.", 0) + acc * 1;
1190 + return true
1191 +
1192 + return false
1193 + func run():
1194 + while match():
1195 + pass
1196 +
1197 + func log_state():
1198 + print(counters)

yumaikas's Avatar yumaikas ревизий этого фрагмента 1734334040. К ревизии

1 file changed, 1 insertion

html_calc.nv.min2.js(файл создан)

Разница (diff) обрезана, так как результат слишком большой для показа

yumaikas's Avatar yumaikas ревизий этого фрагмента 1734333855. К ревизии

1 file changed, 3 insertions

html_calc.nv.min.js(файл создан)

Разница (diff) обрезана, так как результат слишком большой для показа

yumaikas's Avatar yumaikas ревизий этого фрагмента 1734333673. К ревизии

2 files changed, 1183 insertions

html_calc.nv(файл создан)

@@ -0,0 +1,147 @@
1 + | # meta code status | Untested, uncompiled
2 + | #include, strings.nv, slots.nv, DOM.nv |
3 +
4 + | #strings, br, app, button, calc-output, div,
5 + AC, All Clear, C, Clear,
6 + 0,9,8,7,6,5,4,3,2,1,
7 + +,/,*,-,.,=,
8 + ,Press 7, Press 8, Press 9, Press Divide
9 + ,Press 4, Press 5, Press 6, Press Multiply
10 + ,Press 1, Press 2, Press 3, Press Subtract
11 + ,Press 0, Press Dot, Press Equal, Press Add
12 + |
13 +
14 + | #slots, DOM id, inner content, vera event, num A, num B, acc, mem |
15 +
16 + | #port, on log string, needs, @on log |
17 + | #port body, on log string, js | [=[
18 + let toLog = self.state.strings.shift();
19 + console.log(toLog);
20 + let logElem = document.querySelector("#log");
21 + logElem.append(toLog);
22 + logElem.append(document.createElement("br"));
23 + ]=]
24 +
25 + | #port, on clear log, needs, @clear log |
26 + | #port body, on clear log, js |
27 + document.querySelector("#log").innerHTML = "";
28 +
29 + | #port, on reset ui, needs, @reset ui |
30 + | #port body, on reset ui, js |
31 + if (self.state.appElem) {
32 + appElem.innerHTML = "";
33 + }
34 +
35 +
36 + || ui init
37 +
38 + | ui init |
39 + @reset ui,
40 + add string app, mount element by id,
41 + create display label,
42 + create buttons,
43 + mount to output,
44 +
45 + | create button |
46 + set slot inner content,
47 + set slot vera event,
48 + create button.2
49 +
50 + | create button.2 |
51 + add string button, create element
52 +
53 + | next row |
54 + add string br, create element
55 +
56 + | create element | @create element
57 + | mount element by id | @mount element by id
58 +
59 + | create display label |
60 + add string calc-output, set DOM id, create display label.2,
61 + | set DOM id | set slot DOM id
62 + | create display label.2 |
63 + add string div, create element, finish label row
64 +
65 + | finish label row | next row
66 +
67 + | create buttons |
68 + create AC C row,
69 + create 7 8 9 / row,
70 + create 4 5 6 * row,
71 + create 1 2 3 - row,
72 + create 0 . = +
73 +
74 + | create AC C row | create AC button, create C button
75 + | create AC button | add string AC, add string All Clear, create button
76 + | create C button | add string C, add string Clear, create button, ACC finish
77 + |ACC finish| next row
78 +
79 + | create 7 8 9 / row | add button 7, add button 8, add button 9, add button /
80 + | add button 7 | add string 7, add string Press 7, create button
81 + | add button 8 | add string 8, add string Press 8, create button
82 + | add button 9 | add string 9, add string Press 9, create button
83 + | add button / | add string /, add string Press Divide, create button, 789 Finish
84 + |789 Finish| next row
85 +
86 +
87 + | create 4 5 6 * row | add button 4, add button 5, add button 6, add button *
88 + | add button 4 | add string 4, add string Press 4, create button
89 + | add button 5 | add string 5, add string Press 5, create button
90 + | add button 6 | add string 6, add string Press 6, create button,
91 + | add button * | add string *, add string Press Multiply, create button, 456 Finish
92 + |456 Finish| next row
93 +
94 + | create 1 2 3 - row | add button 1, add button 2, add button 3, add button -
95 +
96 + | add button 1 | add string 1, add string Press 1, create button
97 + | add button 2 | add string 2, add string Press 2, create button
98 + | add button 3 | add string 3, add string Press 3, create button
99 + | add button - | add string -, add string Press Subtract, create button, 123 Finish
100 + |123 Finish| next row
101 +
102 +
103 + | create 0 . = + | add button 0, add button ., add button =, add button +
104 + | add button 0 | add string 0, add string Press 0, create button
105 + | add button . | add string ., add string Press Dot, create button
106 + | add button = | add string =, add string Press Equal, create button
107 + | add button + | add string +, add string Press Add, create button
108 +
109 + | mount to output | add string calc-output, mount element by id
110 +
111 + | Clear | add string Clear, on log
112 +
113 + | on log | @on log
114 +
115 + | add char | string append, ac.1, display acc
116 + | ac.1 | set slot acc
117 +
118 + | display acc | dc.1
119 + | dc.1 | dc.2, clear element content
120 + | dc.2 | dc.3, fetch slot acc
121 + | dc.3 | @append string to element
122 +
123 + | Number Button Pressed | mount to output, fetch slot acc, get button char, Finish Number Button Press
124 + | get button char, b0 | add string 0
125 + | get button char, b1 | add string 1
126 + | get button char, b2 | add string 2
127 + | get button char, b3 | add string 3
128 + | get button char, b4 | add string 4
129 + | get button char, b5 | add string 5
130 + | get button char, b6 | add string 6
131 + | get button char, b7 | add string 7
132 + | get button char, b8 | add string 8
133 + | get button char, b9 | add string 9
134 + | get button char, b. | add string .
135 + | Finish Number Button Press | add char
136 +
137 + | Press 0 | Number Button Pressed, b0
138 + | Press 1 | Number Button Pressed, b1
139 + | Press 2 | Number Button Pressed, b2
140 + | Press 3 | Number Button Pressed, b3
141 + | Press 4 | Number Button Pressed, b4
142 + | Press 5 | Number Button Pressed, b5
143 + | Press 6 | Number Button Pressed, b6
144 + | Press 7 | Number Button Pressed, b7
145 + | Press 8 | Number Button Pressed, b8
146 + | Press 9 | Number Button Pressed, b9
147 + | Press Dot | Number Button Pressed, b.

html_calc.nv.js(файл создан)

@@ -0,0 +1,1036 @@
1 + return function() {
2 + let min = Math.min; var max = Math.max; var huge = Number.MAX_SAFE_INTEGER;
3 + let self = { state: { strings: [], slots: {} } };
4 +
5 + self.string_constants = ["br", "app", "button", "calc-output", "div", "AC", "All Clear", "C", "Clear", "0", "9", "8", "7", "6", "5", "4", "3", "2", "1", "+", "/", "*", "-", ".", "=", "Press 7", "Press 8", "Press 9", "Press Divide", "Press 4", "Press 5", "Press 6", "Press Multiply", "Press 1", "Press 2", "Press 3", "Press Subtract", "Press 0", "Press Dot", "Press Equal", "Press Add", ];
6 +
7 +
8 + self.counters = {
9 + "ui init": 1,
10 + }
11 +
12 + self.on_log_string = function(counters) {
13 +
14 + let toLog = self.state.strings.shift();
15 + console.log(toLog);
16 + let logElem = document.querySelector("#log");
17 + logElem.append(toLog);
18 + logElem.append(document.createElement("br"));
19 +
20 + }
21 +
22 + self.on_clear_log = function(counters) {
23 + document.querySelector("#log").innerHTML = "";
24 + }
25 +
26 + self.on_reset_ui = function(counters) {
27 + if (self.state.appElem) { appElem.innerHTML = ""; }
28 + }
29 + self.set_slot_DOM_id = function() {
30 + self.state.slots["DOM id"] = self.state.strings.shift();
31 + }
32 +
33 + self.fetch_slot_DOM_id = function() {
34 + self.state.strings.push(self.state.slots["DOM id"]);
35 + }
36 +
37 + self.set_slot_inner_content = function() {
38 + self.state.slots["inner content"] = self.state.strings.shift();
39 + }
40 +
41 + self.fetch_slot_inner_content = function() {
42 + self.state.strings.push(self.state.slots["inner content"]);
43 + }
44 +
45 + self.set_slot_vera_event = function() {
46 + self.state.slots["vera event"] = self.state.strings.shift();
47 + }
48 +
49 + self.fetch_slot_vera_event = function() {
50 + self.state.strings.push(self.state.slots["vera event"]);
51 + }
52 +
53 + self.set_slot_num_A = function() {
54 + self.state.slots["num A"] = self.state.strings.shift();
55 + }
56 +
57 + self.fetch_slot_num_A = function() {
58 + self.state.strings.push(self.state.slots["num A"]);
59 + }
60 +
61 + self.set_slot_num_B = function() {
62 + self.state.slots["num B"] = self.state.strings.shift();
63 + }
64 +
65 + self.fetch_slot_num_B = function() {
66 + self.state.strings.push(self.state.slots["num B"]);
67 + }
68 +
69 + self.set_slot_acc = function() {
70 + self.state.slots["acc"] = self.state.strings.shift();
71 + }
72 +
73 + self.fetch_slot_acc = function() {
74 + self.state.strings.push(self.state.slots["acc"]);
75 + }
76 +
77 + self.set_slot_mem = function() {
78 + self.state.slots["mem"] = self.state.strings.shift();
79 + }
80 +
81 + self.fetch_slot_mem = function() {
82 + self.state.strings.push(self.state.slots["mem"]);
83 + }
84 +
85 +
86 + function match(self, counters) {
87 +
88 + console.log(Object.entries(counters).filter(([,v])=>v>0).map(([k,v]) => `${k} :: ${v}`).join('\n') );
89 + console.log(self.state.strings);
90 + console.log(self.state.slots);
91 + if (counters["push string"] > 0) {
92 + self.state.strings.push(self.string_constants[counters["push string"]-1]);
93 + counters["push string"] = 0;
94 + return true;
95 + }
96 +
97 + if /**/ (counters["set slot DOM id"] > 0 && counters["nostub"] > 0) {
98 + self.set_slot_DOM_id(counters);
99 +
100 + counters["set slot DOM id"] = 0,
101 + counters["nostub"] = 0
102 + return true;
103 + }
104 + if /**/ (counters["fetch slot DOM id"] > 0 && counters["nostub"] > 0) {
105 + self.fetch_slot_DOM_id(counters);
106 +
107 + counters["fetch slot DOM id"] = 0,
108 + counters["nostub"] = 0
109 + return true;
110 + }
111 + if /**/ (counters["set slot inner content"] > 0 && counters["nostub"] > 0) {
112 + self.set_slot_inner_content(counters);
113 +
114 + counters["set slot inner content"] = 0,
115 + counters["nostub"] = 0
116 + return true;
117 + }
118 + if /**/ (counters["fetch slot inner content"] > 0 && counters["nostub"] > 0) {
119 + self.fetch_slot_inner_content(counters);
120 +
121 + counters["fetch slot inner content"] = 0,
122 + counters["nostub"] = 0
123 + return true;
124 + }
125 + if /**/ (counters["set slot vera event"] > 0 && counters["nostub"] > 0) {
126 + self.set_slot_vera_event(counters);
127 +
128 + counters["set slot vera event"] = 0,
129 + counters["nostub"] = 0
130 + return true;
131 + }
132 + if /**/ (counters["fetch slot vera event"] > 0 && counters["nostub"] > 0) {
133 + self.fetch_slot_vera_event(counters);
134 +
135 + counters["fetch slot vera event"] = 0,
136 + counters["nostub"] = 0
137 + return true;
138 + }
139 + if /**/ (counters["set slot num A"] > 0 && counters["nostub"] > 0) {
140 + self.set_slot_num_A(counters);
141 +
142 + counters["set slot num A"] = 0,
143 + counters["nostub"] = 0
144 + return true;
145 + }
146 + if /**/ (counters["fetch slot num A"] > 0 && counters["nostub"] > 0) {
147 + self.fetch_slot_num_A(counters);
148 +
149 + counters["fetch slot num A"] = 0,
150 + counters["nostub"] = 0
151 + return true;
152 + }
153 + if /**/ (counters["set slot num B"] > 0 && counters["nostub"] > 0) {
154 + self.set_slot_num_B(counters);
155 +
156 + counters["set slot num B"] = 0,
157 + counters["nostub"] = 0
158 + return true;
159 + }
160 + if /**/ (counters["fetch slot num B"] > 0 && counters["nostub"] > 0) {
161 + self.fetch_slot_num_B(counters);
162 +
163 + counters["fetch slot num B"] = 0,
164 + counters["nostub"] = 0
165 + return true;
166 + }
167 + if /**/ (counters["set slot acc"] > 0 && counters["nostub"] > 0) {
168 + self.set_slot_acc(counters);
169 +
170 + counters["set slot acc"] = 0,
171 + counters["nostub"] = 0
172 + return true;
173 + }
174 + if /**/ (counters["fetch slot acc"] > 0 && counters["nostub"] > 0) {
175 + self.fetch_slot_acc(counters);
176 +
177 + counters["fetch slot acc"] = 0,
178 + counters["nostub"] = 0
179 + return true;
180 + }
181 + if /**/ (counters["set slot mem"] > 0 && counters["nostub"] > 0) {
182 + self.set_slot_mem(counters);
183 +
184 + counters["set slot mem"] = 0,
185 + counters["nostub"] = 0
186 + return true;
187 + }
188 + if /**/ (counters["fetch slot mem"] > 0 && counters["nostub"] > 0) {
189 + self.fetch_slot_mem(counters);
190 +
191 + counters["fetch slot mem"] = 0,
192 + counters["nostub"] = 0
193 + return true;
194 + }
195 + if /**/ (counters["@on log"] > 0) {
196 + self.on_log_string(counters);
197 +
198 + counters["@on log"] = 0
199 + return true;
200 + }
201 + if /**/ (counters["@clear log"] > 0) {
202 + self.on_clear_log(counters);
203 +
204 + counters["@clear log"] = 0
205 + return true;
206 + }
207 + if /**/ (counters["@reset ui"] > 0) {
208 + self.on_reset_ui(counters);
209 +
210 + counters["@reset ui"] = 0
211 + return true;
212 + }
213 + if (counters["# meta code status"] > 0) {
214 + let acc = counters["# meta code status"] || 0;
215 + counters["# meta code status"] = max((counters["# meta code status"] || 0) - acc, 0);
216 + counters["Untested"] = (counters["Untested"] || 0) + acc * 1;
217 + counters["uncompiled"] = (counters["uncompiled"] || 0) + acc * 1;
218 + return true;
219 + }
220 + if (counters["#include"] > 0 && counters["strings.nv"] > 0 && counters["slots.nv"] > 0 && counters["DOM.nv"] > 0) {
221 + let acc = huge;
222 + acc = min(acc, counters["#include"] || 0);
223 + acc = min(acc, counters["strings.nv"] || 0);
224 + acc = min(acc, counters["slots.nv"] || 0);
225 + acc = min(acc, counters["DOM.nv"] || 0);
226 + counters["#include"] = max((counters["#include"] || 0) - acc, 0);
227 + counters["strings.nv"] = max((counters["strings.nv"] || 0) - acc, 0);
228 + counters["slots.nv"] = max((counters["slots.nv"] || 0) - acc, 0);
229 + counters["DOM.nv"] = max((counters["DOM.nv"] || 0) - acc, 0);
230 + return true;
231 + }
232 + if (counters["add string br"] > 0) {
233 + let acc = counters["add string br"] || 0;
234 + counters["add string br"] = max((counters["add string br"] || 0) - acc, 0);
235 + counters["push string"] = (counters["push string"] || 0) + acc * 1;
236 + return true;
237 + }
238 + if (counters["add string app"] > 0) {
239 + let acc = counters["add string app"] || 0;
240 + counters["add string app"] = max((counters["add string app"] || 0) - acc, 0);
241 + counters["push string"] = (counters["push string"] || 0) + acc * 2;
242 + return true;
243 + }
244 + if (counters["add string button"] > 0) {
245 + let acc = counters["add string button"] || 0;
246 + counters["add string button"] = max((counters["add string button"] || 0) - acc, 0);
247 + counters["push string"] = (counters["push string"] || 0) + acc * 3;
248 + return true;
249 + }
250 + if (counters["add string calc-output"] > 0) {
251 + let acc = counters["add string calc-output"] || 0;
252 + counters["add string calc-output"] = max((counters["add string calc-output"] || 0) - acc, 0);
253 + counters["push string"] = (counters["push string"] || 0) + acc * 4;
254 + return true;
255 + }
256 + if (counters["add string div"] > 0) {
257 + let acc = counters["add string div"] || 0;
258 + counters["add string div"] = max((counters["add string div"] || 0) - acc, 0);
259 + counters["push string"] = (counters["push string"] || 0) + acc * 5;
260 + return true;
261 + }
262 + if (counters["add string AC"] > 0) {
263 + let acc = counters["add string AC"] || 0;
264 + counters["add string AC"] = max((counters["add string AC"] || 0) - acc, 0);
265 + counters["push string"] = (counters["push string"] || 0) + acc * 6;
266 + return true;
267 + }
268 + if (counters["add string All Clear"] > 0) {
269 + let acc = counters["add string All Clear"] || 0;
270 + counters["add string All Clear"] = max((counters["add string All Clear"] || 0) - acc, 0);
271 + counters["push string"] = (counters["push string"] || 0) + acc * 7;
272 + return true;
273 + }
274 + if (counters["add string C"] > 0) {
275 + let acc = counters["add string C"] || 0;
276 + counters["add string C"] = max((counters["add string C"] || 0) - acc, 0);
277 + counters["push string"] = (counters["push string"] || 0) + acc * 8;
278 + return true;
279 + }
280 + if (counters["add string Clear"] > 0) {
281 + let acc = counters["add string Clear"] || 0;
282 + counters["add string Clear"] = max((counters["add string Clear"] || 0) - acc, 0);
283 + counters["push string"] = (counters["push string"] || 0) + acc * 9;
284 + return true;
285 + }
286 + if (counters["add string 0"] > 0) {
287 + let acc = counters["add string 0"] || 0;
288 + counters["add string 0"] = max((counters["add string 0"] || 0) - acc, 0);
289 + counters["push string"] = (counters["push string"] || 0) + acc * 10;
290 + return true;
291 + }
292 + if (counters["add string 9"] > 0) {
293 + let acc = counters["add string 9"] || 0;
294 + counters["add string 9"] = max((counters["add string 9"] || 0) - acc, 0);
295 + counters["push string"] = (counters["push string"] || 0) + acc * 11;
296 + return true;
297 + }
298 + if (counters["add string 8"] > 0) {
299 + let acc = counters["add string 8"] || 0;
300 + counters["add string 8"] = max((counters["add string 8"] || 0) - acc, 0);
301 + counters["push string"] = (counters["push string"] || 0) + acc * 12;
302 + return true;
303 + }
304 + if (counters["add string 7"] > 0) {
305 + let acc = counters["add string 7"] || 0;
306 + counters["add string 7"] = max((counters["add string 7"] || 0) - acc, 0);
307 + counters["push string"] = (counters["push string"] || 0) + acc * 13;
308 + return true;
309 + }
310 + if (counters["add string 6"] > 0) {
311 + let acc = counters["add string 6"] || 0;
312 + counters["add string 6"] = max((counters["add string 6"] || 0) - acc, 0);
313 + counters["push string"] = (counters["push string"] || 0) + acc * 14;
314 + return true;
315 + }
316 + if (counters["add string 5"] > 0) {
317 + let acc = counters["add string 5"] || 0;
318 + counters["add string 5"] = max((counters["add string 5"] || 0) - acc, 0);
319 + counters["push string"] = (counters["push string"] || 0) + acc * 15;
320 + return true;
321 + }
322 + if (counters["add string 4"] > 0) {
323 + let acc = counters["add string 4"] || 0;
324 + counters["add string 4"] = max((counters["add string 4"] || 0) - acc, 0);
325 + counters["push string"] = (counters["push string"] || 0) + acc * 16;
326 + return true;
327 + }
328 + if (counters["add string 3"] > 0) {
329 + let acc = counters["add string 3"] || 0;
330 + counters["add string 3"] = max((counters["add string 3"] || 0) - acc, 0);
331 + counters["push string"] = (counters["push string"] || 0) + acc * 17;
332 + return true;
333 + }
334 + if (counters["add string 2"] > 0) {
335 + let acc = counters["add string 2"] || 0;
336 + counters["add string 2"] = max((counters["add string 2"] || 0) - acc, 0);
337 + counters["push string"] = (counters["push string"] || 0) + acc * 18;
338 + return true;
339 + }
340 + if (counters["add string 1"] > 0) {
341 + let acc = counters["add string 1"] || 0;
342 + counters["add string 1"] = max((counters["add string 1"] || 0) - acc, 0);
343 + counters["push string"] = (counters["push string"] || 0) + acc * 19;
344 + return true;
345 + }
346 + if (counters["add string +"] > 0) {
347 + let acc = counters["add string +"] || 0;
348 + counters["add string +"] = max((counters["add string +"] || 0) - acc, 0);
349 + counters["push string"] = (counters["push string"] || 0) + acc * 20;
350 + return true;
351 + }
352 + if (counters["add string /"] > 0) {
353 + let acc = counters["add string /"] || 0;
354 + counters["add string /"] = max((counters["add string /"] || 0) - acc, 0);
355 + counters["push string"] = (counters["push string"] || 0) + acc * 21;
356 + return true;
357 + }
358 + if (counters["add string *"] > 0) {
359 + let acc = counters["add string *"] || 0;
360 + counters["add string *"] = max((counters["add string *"] || 0) - acc, 0);
361 + counters["push string"] = (counters["push string"] || 0) + acc * 22;
362 + return true;
363 + }
364 + if (counters["add string -"] > 0) {
365 + let acc = counters["add string -"] || 0;
366 + counters["add string -"] = max((counters["add string -"] || 0) - acc, 0);
367 + counters["push string"] = (counters["push string"] || 0) + acc * 23;
368 + return true;
369 + }
370 + if (counters["add string ."] > 0) {
371 + let acc = counters["add string ."] || 0;
372 + counters["add string ."] = max((counters["add string ."] || 0) - acc, 0);
373 + counters["push string"] = (counters["push string"] || 0) + acc * 24;
374 + return true;
375 + }
376 + if (counters["add string ="] > 0) {
377 + let acc = counters["add string ="] || 0;
378 + counters["add string ="] = max((counters["add string ="] || 0) - acc, 0);
379 + counters["push string"] = (counters["push string"] || 0) + acc * 25;
380 + return true;
381 + }
382 + if (counters["add string Press 7"] > 0) {
383 + let acc = counters["add string Press 7"] || 0;
384 + counters["add string Press 7"] = max((counters["add string Press 7"] || 0) - acc, 0);
385 + counters["push string"] = (counters["push string"] || 0) + acc * 26;
386 + return true;
387 + }
388 + if (counters["add string Press 8"] > 0) {
389 + let acc = counters["add string Press 8"] || 0;
390 + counters["add string Press 8"] = max((counters["add string Press 8"] || 0) - acc, 0);
391 + counters["push string"] = (counters["push string"] || 0) + acc * 27;
392 + return true;
393 + }
394 + if (counters["add string Press 9"] > 0) {
395 + let acc = counters["add string Press 9"] || 0;
396 + counters["add string Press 9"] = max((counters["add string Press 9"] || 0) - acc, 0);
397 + counters["push string"] = (counters["push string"] || 0) + acc * 28;
398 + return true;
399 + }
400 + if (counters["add string Press Divide"] > 0) {
401 + let acc = counters["add string Press Divide"] || 0;
402 + counters["add string Press Divide"] = max((counters["add string Press Divide"] || 0) - acc, 0);
403 + counters["push string"] = (counters["push string"] || 0) + acc * 29;
404 + return true;
405 + }
406 + if (counters["add string Press 4"] > 0) {
407 + let acc = counters["add string Press 4"] || 0;
408 + counters["add string Press 4"] = max((counters["add string Press 4"] || 0) - acc, 0);
409 + counters["push string"] = (counters["push string"] || 0) + acc * 30;
410 + return true;
411 + }
412 + if (counters["add string Press 5"] > 0) {
413 + let acc = counters["add string Press 5"] || 0;
414 + counters["add string Press 5"] = max((counters["add string Press 5"] || 0) - acc, 0);
415 + counters["push string"] = (counters["push string"] || 0) + acc * 31;
416 + return true;
417 + }
418 + if (counters["add string Press 6"] > 0) {
419 + let acc = counters["add string Press 6"] || 0;
420 + counters["add string Press 6"] = max((counters["add string Press 6"] || 0) - acc, 0);
421 + counters["push string"] = (counters["push string"] || 0) + acc * 32;
422 + return true;
423 + }
424 + if (counters["add string Press Multiply"] > 0) {
425 + let acc = counters["add string Press Multiply"] || 0;
426 + counters["add string Press Multiply"] = max((counters["add string Press Multiply"] || 0) - acc, 0);
427 + counters["push string"] = (counters["push string"] || 0) + acc * 33;
428 + return true;
429 + }
430 + if (counters["add string Press 1"] > 0) {
431 + let acc = counters["add string Press 1"] || 0;
432 + counters["add string Press 1"] = max((counters["add string Press 1"] || 0) - acc, 0);
433 + counters["push string"] = (counters["push string"] || 0) + acc * 34;
434 + return true;
435 + }
436 + if (counters["add string Press 2"] > 0) {
437 + let acc = counters["add string Press 2"] || 0;
438 + counters["add string Press 2"] = max((counters["add string Press 2"] || 0) - acc, 0);
439 + counters["push string"] = (counters["push string"] || 0) + acc * 35;
440 + return true;
441 + }
442 + if (counters["add string Press 3"] > 0) {
443 + let acc = counters["add string Press 3"] || 0;
444 + counters["add string Press 3"] = max((counters["add string Press 3"] || 0) - acc, 0);
445 + counters["push string"] = (counters["push string"] || 0) + acc * 36;
446 + return true;
447 + }
448 + if (counters["add string Press Subtract"] > 0) {
449 + let acc = counters["add string Press Subtract"] || 0;
450 + counters["add string Press Subtract"] = max((counters["add string Press Subtract"] || 0) - acc, 0);
451 + counters["push string"] = (counters["push string"] || 0) + acc * 37;
452 + return true;
453 + }
454 + if (counters["add string Press 0"] > 0) {
455 + let acc = counters["add string Press 0"] || 0;
456 + counters["add string Press 0"] = max((counters["add string Press 0"] || 0) - acc, 0);
457 + counters["push string"] = (counters["push string"] || 0) + acc * 38;
458 + return true;
459 + }
460 + if (counters["add string Press Dot"] > 0) {
461 + let acc = counters["add string Press Dot"] || 0;
462 + counters["add string Press Dot"] = max((counters["add string Press Dot"] || 0) - acc, 0);
463 + counters["push string"] = (counters["push string"] || 0) + acc * 39;
464 + return true;
465 + }
466 + if (counters["add string Press Equal"] > 0) {
467 + let acc = counters["add string Press Equal"] || 0;
468 + counters["add string Press Equal"] = max((counters["add string Press Equal"] || 0) - acc, 0);
469 + counters["push string"] = (counters["push string"] || 0) + acc * 40;
470 + return true;
471 + }
472 + if (counters["add string Press Add"] > 0) {
473 + let acc = counters["add string Press Add"] || 0;
474 + counters["add string Press Add"] = max((counters["add string Press Add"] || 0) - acc, 0);
475 + counters["push string"] = (counters["push string"] || 0) + acc * 41;
476 + return true;
477 + }
478 + if (counters["ui init"] > 0) {
479 + let acc = counters["ui init"] || 0;
480 + counters["ui init"] = max((counters["ui init"] || 0) - acc, 0);
481 + counters["@reset ui"] = (counters["@reset ui"] || 0) + acc * 1;
482 + counters["add string app"] = (counters["add string app"] || 0) + acc * 1;
483 + counters["mount element by id"] = (counters["mount element by id"] || 0) + acc * 1;
484 + counters["create display label"] = (counters["create display label"] || 0) + acc * 1;
485 + counters["create buttons"] = (counters["create buttons"] || 0) + acc * 1;
486 + counters["mount to output"] = (counters["mount to output"] || 0) + acc * 1;
487 + return true;
488 + }
489 + if (counters["create button"] > 0) {
490 + let acc = counters["create button"] || 0;
491 + counters["create button"] = max((counters["create button"] || 0) - acc, 0);
492 + counters["set slot inner content"] = (counters["set slot inner content"] || 0) + acc * 1;
493 + counters["set slot vera event"] = (counters["set slot vera event"] || 0) + acc * 1;
494 + counters["create button.2"] = (counters["create button.2"] || 0) + acc * 1;
495 + return true;
496 + }
497 + if (counters["create button.2"] > 0) {
498 + let acc = counters["create button.2"] || 0;
499 + counters["create button.2"] = max((counters["create button.2"] || 0) - acc, 0);
500 + counters["add string button"] = (counters["add string button"] || 0) + acc * 1;
501 + counters["create element"] = (counters["create element"] || 0) + acc * 1;
502 + return true;
503 + }
504 + if (counters["next row"] > 0) {
505 + let acc = counters["next row"] || 0;
506 + counters["next row"] = max((counters["next row"] || 0) - acc, 0);
507 + counters["add string br"] = (counters["add string br"] || 0) + acc * 1;
508 + counters["create element"] = (counters["create element"] || 0) + acc * 1;
509 + return true;
510 + }
511 + if (counters["create element"] > 0) {
512 + let acc = counters["create element"] || 0;
513 + counters["create element"] = max((counters["create element"] || 0) - acc, 0);
514 + counters["@create element"] = (counters["@create element"] || 0) + acc * 1;
515 + return true;
516 + }
517 + if (counters["mount element by id"] > 0) {
518 + let acc = counters["mount element by id"] || 0;
519 + counters["mount element by id"] = max((counters["mount element by id"] || 0) - acc, 0);
520 + counters["@mount element by id"] = (counters["@mount element by id"] || 0) + acc * 1;
521 + return true;
522 + }
523 + if (counters["create display label"] > 0) {
524 + let acc = counters["create display label"] || 0;
525 + counters["create display label"] = max((counters["create display label"] || 0) - acc, 0);
526 + counters["add string calc-output"] = (counters["add string calc-output"] || 0) + acc * 1;
527 + counters["set DOM id"] = (counters["set DOM id"] || 0) + acc * 1;
528 + counters["create display label.2"] = (counters["create display label.2"] || 0) + acc * 1;
529 + return true;
530 + }
531 + if (counters["set DOM id"] > 0) {
532 + let acc = counters["set DOM id"] || 0;
533 + counters["set DOM id"] = max((counters["set DOM id"] || 0) - acc, 0);
534 + counters["set slot DOM id"] = (counters["set slot DOM id"] || 0) + acc * 1;
535 + return true;
536 + }
537 + if (counters["create display label.2"] > 0) {
538 + let acc = counters["create display label.2"] || 0;
539 + counters["create display label.2"] = max((counters["create display label.2"] || 0) - acc, 0);
540 + counters["add string div"] = (counters["add string div"] || 0) + acc * 1;
541 + counters["create element"] = (counters["create element"] || 0) + acc * 1;
542 + counters["finish label row"] = (counters["finish label row"] || 0) + acc * 1;
543 + return true;
544 + }
545 + if (counters["finish label row"] > 0) {
546 + let acc = counters["finish label row"] || 0;
547 + counters["finish label row"] = max((counters["finish label row"] || 0) - acc, 0);
548 + counters["next row"] = (counters["next row"] || 0) + acc * 1;
549 + return true;
550 + }
551 + if (counters["create buttons"] > 0) {
552 + let acc = counters["create buttons"] || 0;
553 + counters["create buttons"] = max((counters["create buttons"] || 0) - acc, 0);
554 + counters["create AC C row"] = (counters["create AC C row"] || 0) + acc * 1;
555 + counters["create 7 8 9 / row"] = (counters["create 7 8 9 / row"] || 0) + acc * 1;
556 + counters["create 4 5 6 * row"] = (counters["create 4 5 6 * row"] || 0) + acc * 1;
557 + counters["create 1 2 3 - row"] = (counters["create 1 2 3 - row"] || 0) + acc * 1;
558 + counters["create 0 . = +"] = (counters["create 0 . = +"] || 0) + acc * 1;
559 + return true;
560 + }
561 + if (counters["create AC C row"] > 0) {
562 + let acc = counters["create AC C row"] || 0;
563 + counters["create AC C row"] = max((counters["create AC C row"] || 0) - acc, 0);
564 + counters["create AC button"] = (counters["create AC button"] || 0) + acc * 1;
565 + counters["create C button"] = (counters["create C button"] || 0) + acc * 1;
566 + return true;
567 + }
568 + if (counters["create AC button"] > 0) {
569 + let acc = counters["create AC button"] || 0;
570 + counters["create AC button"] = max((counters["create AC button"] || 0) - acc, 0);
571 + counters["add string AC"] = (counters["add string AC"] || 0) + acc * 1;
572 + counters["add string All Clear"] = (counters["add string All Clear"] || 0) + acc * 1;
573 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
574 + return true;
575 + }
576 + if (counters["create C button"] > 0) {
577 + let acc = counters["create C button"] || 0;
578 + counters["create C button"] = max((counters["create C button"] || 0) - acc, 0);
579 + counters["add string C"] = (counters["add string C"] || 0) + acc * 1;
580 + counters["add string Clear"] = (counters["add string Clear"] || 0) + acc * 1;
581 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
582 + counters["ACC finish"] = (counters["ACC finish"] || 0) + acc * 1;
583 + return true;
584 + }
585 + if (counters["ACC finish"] > 0) {
586 + let acc = counters["ACC finish"] || 0;
587 + counters["ACC finish"] = max((counters["ACC finish"] || 0) - acc, 0);
588 + counters["next row"] = (counters["next row"] || 0) + acc * 1;
589 + return true;
590 + }
591 + if (counters["create 7 8 9 / row"] > 0) {
592 + let acc = counters["create 7 8 9 / row"] || 0;
593 + counters["create 7 8 9 / row"] = max((counters["create 7 8 9 / row"] || 0) - acc, 0);
594 + counters["add button 7"] = (counters["add button 7"] || 0) + acc * 1;
595 + counters["add button 8"] = (counters["add button 8"] || 0) + acc * 1;
596 + counters["add button 9"] = (counters["add button 9"] || 0) + acc * 1;
597 + counters["add button /"] = (counters["add button /"] || 0) + acc * 1;
598 + return true;
599 + }
600 + if (counters["add button 7"] > 0) {
601 + let acc = counters["add button 7"] || 0;
602 + counters["add button 7"] = max((counters["add button 7"] || 0) - acc, 0);
603 + counters["add string 7"] = (counters["add string 7"] || 0) + acc * 1;
604 + counters["add string Press 7"] = (counters["add string Press 7"] || 0) + acc * 1;
605 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
606 + return true;
607 + }
608 + if (counters["add button 8"] > 0) {
609 + let acc = counters["add button 8"] || 0;
610 + counters["add button 8"] = max((counters["add button 8"] || 0) - acc, 0);
611 + counters["add string 8"] = (counters["add string 8"] || 0) + acc * 1;
612 + counters["add string Press 8"] = (counters["add string Press 8"] || 0) + acc * 1;
613 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
614 + return true;
615 + }
616 + if (counters["add button 9"] > 0) {
617 + let acc = counters["add button 9"] || 0;
618 + counters["add button 9"] = max((counters["add button 9"] || 0) - acc, 0);
619 + counters["add string 9"] = (counters["add string 9"] || 0) + acc * 1;
620 + counters["add string Press 9"] = (counters["add string Press 9"] || 0) + acc * 1;
621 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
622 + return true;
623 + }
624 + if (counters["add button /"] > 0) {
625 + let acc = counters["add button /"] || 0;
626 + counters["add button /"] = max((counters["add button /"] || 0) - acc, 0);
627 + counters["add string /"] = (counters["add string /"] || 0) + acc * 1;
628 + counters["add string Press Divide"] = (counters["add string Press Divide"] || 0) + acc * 1;
629 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
630 + counters["789 Finish"] = (counters["789 Finish"] || 0) + acc * 1;
631 + return true;
632 + }
633 + if (counters["789 Finish"] > 0) {
634 + let acc = counters["789 Finish"] || 0;
635 + counters["789 Finish"] = max((counters["789 Finish"] || 0) - acc, 0);
636 + counters["next row"] = (counters["next row"] || 0) + acc * 1;
637 + return true;
638 + }
639 + if (counters["create 4 5 6 * row"] > 0) {
640 + let acc = counters["create 4 5 6 * row"] || 0;
641 + counters["create 4 5 6 * row"] = max((counters["create 4 5 6 * row"] || 0) - acc, 0);
642 + counters["add button 4"] = (counters["add button 4"] || 0) + acc * 1;
643 + counters["add button 5"] = (counters["add button 5"] || 0) + acc * 1;
644 + counters["add button 6"] = (counters["add button 6"] || 0) + acc * 1;
645 + counters["add button *"] = (counters["add button *"] || 0) + acc * 1;
646 + return true;
647 + }
648 + if (counters["add button 4"] > 0) {
649 + let acc = counters["add button 4"] || 0;
650 + counters["add button 4"] = max((counters["add button 4"] || 0) - acc, 0);
651 + counters["add string 4"] = (counters["add string 4"] || 0) + acc * 1;
652 + counters["add string Press 4"] = (counters["add string Press 4"] || 0) + acc * 1;
653 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
654 + return true;
655 + }
656 + if (counters["add button 5"] > 0) {
657 + let acc = counters["add button 5"] || 0;
658 + counters["add button 5"] = max((counters["add button 5"] || 0) - acc, 0);
659 + counters["add string 5"] = (counters["add string 5"] || 0) + acc * 1;
660 + counters["add string Press 5"] = (counters["add string Press 5"] || 0) + acc * 1;
661 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
662 + return true;
663 + }
664 + if (counters["add button 6"] > 0) {
665 + let acc = counters["add button 6"] || 0;
666 + counters["add button 6"] = max((counters["add button 6"] || 0) - acc, 0);
667 + counters["add string 6"] = (counters["add string 6"] || 0) + acc * 1;
668 + counters["add string Press 6"] = (counters["add string Press 6"] || 0) + acc * 1;
669 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
670 + return true;
671 + }
672 + if (counters["add button *"] > 0) {
673 + let acc = counters["add button *"] || 0;
674 + counters["add button *"] = max((counters["add button *"] || 0) - acc, 0);
675 + counters["add string *"] = (counters["add string *"] || 0) + acc * 1;
676 + counters["add string Press Multiply"] = (counters["add string Press Multiply"] || 0) + acc * 1;
677 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
678 + counters["456 Finish"] = (counters["456 Finish"] || 0) + acc * 1;
679 + return true;
680 + }
681 + if (counters["456 Finish"] > 0) {
682 + let acc = counters["456 Finish"] || 0;
683 + counters["456 Finish"] = max((counters["456 Finish"] || 0) - acc, 0);
684 + counters["next row"] = (counters["next row"] || 0) + acc * 1;
685 + return true;
686 + }
687 + if (counters["create 1 2 3 - row"] > 0) {
688 + let acc = counters["create 1 2 3 - row"] || 0;
689 + counters["create 1 2 3 - row"] = max((counters["create 1 2 3 - row"] || 0) - acc, 0);
690 + counters["add button 1"] = (counters["add button 1"] || 0) + acc * 1;
691 + counters["add button 2"] = (counters["add button 2"] || 0) + acc * 1;
692 + counters["add button 3"] = (counters["add button 3"] || 0) + acc * 1;
693 + counters["add button -"] = (counters["add button -"] || 0) + acc * 1;
694 + return true;
695 + }
696 + if (counters["add button 1"] > 0) {
697 + let acc = counters["add button 1"] || 0;
698 + counters["add button 1"] = max((counters["add button 1"] || 0) - acc, 0);
699 + counters["add string 1"] = (counters["add string 1"] || 0) + acc * 1;
700 + counters["add string Press 1"] = (counters["add string Press 1"] || 0) + acc * 1;
701 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
702 + return true;
703 + }
704 + if (counters["add button 2"] > 0) {
705 + let acc = counters["add button 2"] || 0;
706 + counters["add button 2"] = max((counters["add button 2"] || 0) - acc, 0);
707 + counters["add string 2"] = (counters["add string 2"] || 0) + acc * 1;
708 + counters["add string Press 2"] = (counters["add string Press 2"] || 0) + acc * 1;
709 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
710 + return true;
711 + }
712 + if (counters["add button 3"] > 0) {
713 + let acc = counters["add button 3"] || 0;
714 + counters["add button 3"] = max((counters["add button 3"] || 0) - acc, 0);
715 + counters["add string 3"] = (counters["add string 3"] || 0) + acc * 1;
716 + counters["add string Press 3"] = (counters["add string Press 3"] || 0) + acc * 1;
717 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
718 + return true;
719 + }
720 + if (counters["add button -"] > 0) {
721 + let acc = counters["add button -"] || 0;
722 + counters["add button -"] = max((counters["add button -"] || 0) - acc, 0);
723 + counters["add string -"] = (counters["add string -"] || 0) + acc * 1;
724 + counters["add string Press Subtract"] = (counters["add string Press Subtract"] || 0) + acc * 1;
725 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
726 + counters["123 Finish"] = (counters["123 Finish"] || 0) + acc * 1;
727 + return true;
728 + }
729 + if (counters["123 Finish"] > 0) {
730 + let acc = counters["123 Finish"] || 0;
731 + counters["123 Finish"] = max((counters["123 Finish"] || 0) - acc, 0);
732 + counters["next row"] = (counters["next row"] || 0) + acc * 1;
733 + return true;
734 + }
735 + if (counters["create 0 . = +"] > 0) {
736 + let acc = counters["create 0 . = +"] || 0;
737 + counters["create 0 . = +"] = max((counters["create 0 . = +"] || 0) - acc, 0);
738 + counters["add button 0"] = (counters["add button 0"] || 0) + acc * 1;
739 + counters["add button ."] = (counters["add button ."] || 0) + acc * 1;
740 + counters["add button ="] = (counters["add button ="] || 0) + acc * 1;
741 + counters["add button +"] = (counters["add button +"] || 0) + acc * 1;
742 + return true;
743 + }
744 + if (counters["add button 0"] > 0) {
745 + let acc = counters["add button 0"] || 0;
746 + counters["add button 0"] = max((counters["add button 0"] || 0) - acc, 0);
747 + counters["add string 0"] = (counters["add string 0"] || 0) + acc * 1;
748 + counters["add string Press 0"] = (counters["add string Press 0"] || 0) + acc * 1;
749 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
750 + return true;
751 + }
752 + if (counters["add button ."] > 0) {
753 + let acc = counters["add button ."] || 0;
754 + counters["add button ."] = max((counters["add button ."] || 0) - acc, 0);
755 + counters["add string ."] = (counters["add string ."] || 0) + acc * 1;
756 + counters["add string Press Dot"] = (counters["add string Press Dot"] || 0) + acc * 1;
757 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
758 + return true;
759 + }
760 + if (counters["add button ="] > 0) {
761 + let acc = counters["add button ="] || 0;
762 + counters["add button ="] = max((counters["add button ="] || 0) - acc, 0);
763 + counters["add string ="] = (counters["add string ="] || 0) + acc * 1;
764 + counters["add string Press Equal"] = (counters["add string Press Equal"] || 0) + acc * 1;
765 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
766 + return true;
767 + }
768 + if (counters["add button +"] > 0) {
769 + let acc = counters["add button +"] || 0;
770 + counters["add button +"] = max((counters["add button +"] || 0) - acc, 0);
771 + counters["add string +"] = (counters["add string +"] || 0) + acc * 1;
772 + counters["add string Press Add"] = (counters["add string Press Add"] || 0) + acc * 1;
773 + counters["create button"] = (counters["create button"] || 0) + acc * 1;
774 + return true;
775 + }
776 + if (counters["mount to output"] > 0) {
777 + let acc = counters["mount to output"] || 0;
778 + counters["mount to output"] = max((counters["mount to output"] || 0) - acc, 0);
779 + counters["add string calc-output"] = (counters["add string calc-output"] || 0) + acc * 1;
780 + counters["mount element by id"] = (counters["mount element by id"] || 0) + acc * 1;
781 + return true;
782 + }
783 + if (counters["Clear"] > 0) {
784 + let acc = counters["Clear"] || 0;
785 + counters["Clear"] = max((counters["Clear"] || 0) - acc, 0);
786 + counters["add string Clear"] = (counters["add string Clear"] || 0) + acc * 1;
787 + counters["on log"] = (counters["on log"] || 0) + acc * 1;
788 + return true;
789 + }
790 + if (counters["on log"] > 0) {
791 + let acc = counters["on log"] || 0;
792 + counters["on log"] = max((counters["on log"] || 0) - acc, 0);
793 + counters["@on log"] = (counters["@on log"] || 0) + acc * 1;
794 + return true;
795 + }
796 + if (counters["add char"] > 0) {
797 + let acc = counters["add char"] || 0;
798 + counters["add char"] = max((counters["add char"] || 0) - acc, 0);
799 + counters["string append"] = (counters["string append"] || 0) + acc * 1;
800 + counters["ac.1"] = (counters["ac.1"] || 0) + acc * 1;
801 + counters["display acc"] = (counters["display acc"] || 0) + acc * 1;
802 + return true;
803 + }
804 + if (counters["ac.1"] > 0) {
805 + let acc = counters["ac.1"] || 0;
806 + counters["ac.1"] = max((counters["ac.1"] || 0) - acc, 0);
807 + counters["set slot acc"] = (counters["set slot acc"] || 0) + acc * 1;
808 + return true;
809 + }
810 + if (counters["display acc"] > 0) {
811 + let acc = counters["display acc"] || 0;
812 + counters["display acc"] = max((counters["display acc"] || 0) - acc, 0);
813 + counters["dc.1"] = (counters["dc.1"] || 0) + acc * 1;
814 + return true;
815 + }
816 + if (counters["dc.1"] > 0) {
817 + let acc = counters["dc.1"] || 0;
818 + counters["dc.1"] = max((counters["dc.1"] || 0) - acc, 0);
819 + counters["dc.2"] = (counters["dc.2"] || 0) + acc * 1;
820 + counters["clear element content"] = (counters["clear element content"] || 0) + acc * 1;
821 + return true;
822 + }
823 + if (counters["dc.2"] > 0) {
824 + let acc = counters["dc.2"] || 0;
825 + counters["dc.2"] = max((counters["dc.2"] || 0) - acc, 0);
826 + counters["dc.3"] = (counters["dc.3"] || 0) + acc * 1;
827 + counters["fetch slot acc"] = (counters["fetch slot acc"] || 0) + acc * 1;
828 + return true;
829 + }
830 + if (counters["dc.3"] > 0) {
831 + let acc = counters["dc.3"] || 0;
832 + counters["dc.3"] = max((counters["dc.3"] || 0) - acc, 0);
833 + counters["@append string to element"] = (counters["@append string to element"] || 0) + acc * 1;
834 + return true;
835 + }
836 + if (counters["Number Button Pressed"] > 0) {
837 + let acc = counters["Number Button Pressed"] || 0;
838 + counters["Number Button Pressed"] = max((counters["Number Button Pressed"] || 0) - acc, 0);
839 + counters["mount to output"] = (counters["mount to output"] || 0) + acc * 1;
840 + counters["fetch slot acc"] = (counters["fetch slot acc"] || 0) + acc * 1;
841 + counters["get button char"] = (counters["get button char"] || 0) + acc * 1;
842 + counters["Finish Number Button Press"] = (counters["Finish Number Button Press"] || 0) + acc * 1;
843 + return true;
844 + }
845 + if (counters["get button char"] > 0 && counters["b0"] > 0) {
846 + let acc = huge;
847 + acc = min(acc, counters["get button char"] || 0);
848 + acc = min(acc, counters["b0"] || 0);
849 + counters["get button char"] = max((counters["get button char"] || 0) - acc, 0);
850 + counters["b0"] = max((counters["b0"] || 0) - acc, 0);
851 + counters["add string 0"] = (counters["add string 0"] || 0) + acc * 1;
852 + return true;
853 + }
854 + if (counters["get button char"] > 0 && counters["b1"] > 0) {
855 + let acc = huge;
856 + acc = min(acc, counters["get button char"] || 0);
857 + acc = min(acc, counters["b1"] || 0);
858 + counters["get button char"] = max((counters["get button char"] || 0) - acc, 0);
859 + counters["b1"] = max((counters["b1"] || 0) - acc, 0);
860 + counters["add string 1"] = (counters["add string 1"] || 0) + acc * 1;
861 + return true;
862 + }
863 + if (counters["get button char"] > 0 && counters["b2"] > 0) {
864 + let acc = huge;
865 + acc = min(acc, counters["get button char"] || 0);
866 + acc = min(acc, counters["b2"] || 0);
867 + counters["get button char"] = max((counters["get button char"] || 0) - acc, 0);
868 + counters["b2"] = max((counters["b2"] || 0) - acc, 0);
869 + counters["add string 2"] = (counters["add string 2"] || 0) + acc * 1;
870 + return true;
871 + }
872 + if (counters["get button char"] > 0 && counters["b3"] > 0) {
873 + let acc = huge;
874 + acc = min(acc, counters["get button char"] || 0);
875 + acc = min(acc, counters["b3"] || 0);
876 + counters["get button char"] = max((counters["get button char"] || 0) - acc, 0);
877 + counters["b3"] = max((counters["b3"] || 0) - acc, 0);
878 + counters["add string 3"] = (counters["add string 3"] || 0) + acc * 1;
879 + return true;
880 + }
881 + if (counters["get button char"] > 0 && counters["b4"] > 0) {
882 + let acc = huge;
883 + acc = min(acc, counters["get button char"] || 0);
884 + acc = min(acc, counters["b4"] || 0);
885 + counters["get button char"] = max((counters["get button char"] || 0) - acc, 0);
886 + counters["b4"] = max((counters["b4"] || 0) - acc, 0);
887 + counters["add string 4"] = (counters["add string 4"] || 0) + acc * 1;
888 + return true;
889 + }
890 + if (counters["get button char"] > 0 && counters["b5"] > 0) {
891 + let acc = huge;
892 + acc = min(acc, counters["get button char"] || 0);
893 + acc = min(acc, counters["b5"] || 0);
894 + counters["get button char"] = max((counters["get button char"] || 0) - acc, 0);
895 + counters["b5"] = max((counters["b5"] || 0) - acc, 0);
896 + counters["add string 5"] = (counters["add string 5"] || 0) + acc * 1;
897 + return true;
898 + }
899 + if (counters["get button char"] > 0 && counters["b6"] > 0) {
900 + let acc = huge;
901 + acc = min(acc, counters["get button char"] || 0);
902 + acc = min(acc, counters["b6"] || 0);
903 + counters["get button char"] = max((counters["get button char"] || 0) - acc, 0);
904 + counters["b6"] = max((counters["b6"] || 0) - acc, 0);
905 + counters["add string 6"] = (counters["add string 6"] || 0) + acc * 1;
906 + return true;
907 + }
908 + if (counters["get button char"] > 0 && counters["b7"] > 0) {
909 + let acc = huge;
910 + acc = min(acc, counters["get button char"] || 0);
911 + acc = min(acc, counters["b7"] || 0);
912 + counters["get button char"] = max((counters["get button char"] || 0) - acc, 0);
913 + counters["b7"] = max((counters["b7"] || 0) - acc, 0);
914 + counters["add string 7"] = (counters["add string 7"] || 0) + acc * 1;
915 + return true;
916 + }
917 + if (counters["get button char"] > 0 && counters["b8"] > 0) {
918 + let acc = huge;
919 + acc = min(acc, counters["get button char"] || 0);
920 + acc = min(acc, counters["b8"] || 0);
921 + counters["get button char"] = max((counters["get button char"] || 0) - acc, 0);
922 + counters["b8"] = max((counters["b8"] || 0) - acc, 0);
923 + counters["add string 8"] = (counters["add string 8"] || 0) + acc * 1;
924 + return true;
925 + }
926 + if (counters["get button char"] > 0 && counters["b9"] > 0) {
927 + let acc = huge;
928 + acc = min(acc, counters["get button char"] || 0);
929 + acc = min(acc, counters["b9"] || 0);
930 + counters["get button char"] = max((counters["get button char"] || 0) - acc, 0);
931 + counters["b9"] = max((counters["b9"] || 0) - acc, 0);
932 + counters["add string 9"] = (counters["add string 9"] || 0) + acc * 1;
933 + return true;
934 + }
935 + if (counters["get button char"] > 0 && counters["b."] > 0) {
936 + let acc = huge;
937 + acc = min(acc, counters["get button char"] || 0);
938 + acc = min(acc, counters["b."] || 0);
939 + counters["get button char"] = max((counters["get button char"] || 0) - acc, 0);
940 + counters["b."] = max((counters["b."] || 0) - acc, 0);
941 + counters["add string ."] = (counters["add string ."] || 0) + acc * 1;
942 + return true;
943 + }
944 + if (counters["Finish Number Button Press"] > 0) {
945 + let acc = counters["Finish Number Button Press"] || 0;
946 + counters["Finish Number Button Press"] = max((counters["Finish Number Button Press"] || 0) - acc, 0);
947 + counters["add char"] = (counters["add char"] || 0) + acc * 1;
948 + return true;
949 + }
950 + if (counters["Press 0"] > 0) {
951 + let acc = counters["Press 0"] || 0;
952 + counters["Press 0"] = max((counters["Press 0"] || 0) - acc, 0);
953 + counters["Number Button Pressed"] = (counters["Number Button Pressed"] || 0) + acc * 1;
954 + counters["b0"] = (counters["b0"] || 0) + acc * 1;
955 + return true;
956 + }
957 + if (counters["Press 1"] > 0) {
958 + let acc = counters["Press 1"] || 0;
959 + counters["Press 1"] = max((counters["Press 1"] || 0) - acc, 0);
960 + counters["Number Button Pressed"] = (counters["Number Button Pressed"] || 0) + acc * 1;
961 + counters["b1"] = (counters["b1"] || 0) + acc * 1;
962 + return true;
963 + }
964 + if (counters["Press 2"] > 0) {
965 + let acc = counters["Press 2"] || 0;
966 + counters["Press 2"] = max((counters["Press 2"] || 0) - acc, 0);
967 + counters["Number Button Pressed"] = (counters["Number Button Pressed"] || 0) + acc * 1;
968 + counters["b2"] = (counters["b2"] || 0) + acc * 1;
969 + return true;
970 + }
971 + if (counters["Press 3"] > 0) {
972 + let acc = counters["Press 3"] || 0;
973 + counters["Press 3"] = max((counters["Press 3"] || 0) - acc, 0);
974 + counters["Number Button Pressed"] = (counters["Number Button Pressed"] || 0) + acc * 1;
975 + counters["b3"] = (counters["b3"] || 0) + acc * 1;
976 + return true;
977 + }
978 + if (counters["Press 4"] > 0) {
979 + let acc = counters["Press 4"] || 0;
980 + counters["Press 4"] = max((counters["Press 4"] || 0) - acc, 0);
981 + counters["Number Button Pressed"] = (counters["Number Button Pressed"] || 0) + acc * 1;
982 + counters["b4"] = (counters["b4"] || 0) + acc * 1;
983 + return true;
984 + }
985 + if (counters["Press 5"] > 0) {
986 + let acc = counters["Press 5"] || 0;
987 + counters["Press 5"] = max((counters["Press 5"] || 0) - acc, 0);
988 + counters["Number Button Pressed"] = (counters["Number Button Pressed"] || 0) + acc * 1;
989 + counters["b5"] = (counters["b5"] || 0) + acc * 1;
990 + return true;
991 + }
992 + if (counters["Press 6"] > 0) {
993 + let acc = counters["Press 6"] || 0;
994 + counters["Press 6"] = max((counters["Press 6"] || 0) - acc, 0);
995 + counters["Number Button Pressed"] = (counters["Number Button Pressed"] || 0) + acc * 1;
996 + counters["b6"] = (counters["b6"] || 0) + acc * 1;
997 + return true;
998 + }
999 + if (counters["Press 7"] > 0) {
1000 + let acc = counters["Press 7"] || 0;
1001 + counters["Press 7"] = max((counters["Press 7"] || 0) - acc, 0);
1002 + counters["Number Button Pressed"] = (counters["Number Button Pressed"] || 0) + acc * 1;
1003 + counters["b7"] = (counters["b7"] || 0) + acc * 1;
1004 + return true;
1005 + }
1006 + if (counters["Press 8"] > 0) {
1007 + let acc = counters["Press 8"] || 0;
1008 + counters["Press 8"] = max((counters["Press 8"] || 0) - acc, 0);
1009 + counters["Number Button Pressed"] = (counters["Number Button Pressed"] || 0) + acc * 1;
1010 + counters["b8"] = (counters["b8"] || 0) + acc * 1;
1011 + return true;
1012 + }
1013 + if (counters["Press 9"] > 0) {
1014 + let acc = counters["Press 9"] || 0;
1015 + counters["Press 9"] = max((counters["Press 9"] || 0) - acc, 0);
1016 + counters["Number Button Pressed"] = (counters["Number Button Pressed"] || 0) + acc * 1;
1017 + counters["b9"] = (counters["b9"] || 0) + acc * 1;
1018 + return true;
1019 + }
1020 + if (counters["Press Dot"] > 0) {
1021 + let acc = counters["Press Dot"] || 0;
1022 + counters["Press Dot"] = max((counters["Press Dot"] || 0) - acc, 0);
1023 + counters["Number Button Pressed"] = (counters["Number Button Pressed"] || 0) + acc * 1;
1024 + counters["b."] = (counters["b."] || 0) + acc * 1;
1025 + return true;
1026 + }
1027 + return false;
1028 + }
1029 + self.run = function() {
1030 + let counters = self.counters;
1031 + while(match(self, counters)){};
1032 + };
1033 + self.log_state = function() {
1034 + return Object.entries(self.counters).map(([k, v]) => `${k} :: ${v}`).join('\n');
1035 + }; return self;
1036 + };
Новее Позже