-
Notifications
You must be signed in to change notification settings - Fork 17
/
particleZoo.scroll
66 lines (64 loc) · 1.7 KB
/
particleZoo.scroll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Particle Zoo
An exploration of different kinds of particles.
code
keywordParsers
description A parser where each node type is determined by the presence of a keyword
prefixKeywordParsers
keyword 1 2 3 foo
postfixKeywordParsers
1 2 keyword
omnifixKeywordParsers
1 keyword 2
flatParsers
description A parser that has only 1 scope
example
singleScopeParsers
description A parser with multiple scopes
benefit Isomorphic to a single table
downsides
staticParsers
description A parser where the parser and atomTypes cannot be changed or defined at runtime
example
print hello world
dynamicParsers
description A parser where new parser and/or atomTypes can be defined at runtime
example
name score
string int
sandy 123
identifierParsers
description A parser where identifiers can be created
example
score = 10
increment score
anonymousParsers
description A parser without any identifiers or naming
example
10
increment
recursiveParsers
description A parserNode with a scope that eventually includes itself
example
sum
2 3
sum
4 6
dagParsers
description A non recursive parser
example
person
phone
mobile 123-1234
multiAnchorParsers
description A parser where root level nodes (for instance) can be parsed/compiled/executed completely independently
singleAnchorParsers
description A parser where parsing/compilation and/or execution must begin from the beginning of the sequence and process sequentially
orderIsImportantParsers
example
add 10
checkBalance()
orderIsNotImportantParsers
description When order is not important and rearranging nodes does not affect meaning.
example
name ali
score 100