trenni 3.11.0 → 3.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/tmp/x86_64-linux/lib/trenni/trenni.so +0 -0
- data/ext/tmp/{x86_64-darwin16 → x86_64-linux}/trenni/2.4.0/Makefile +24 -25
- data/ext/tmp/x86_64-linux/trenni/2.4.0/escape.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.4.0/markup.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.4.0/mkmf.log +108 -0
- data/ext/tmp/x86_64-linux/trenni/2.4.0/tag.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.4.0/template.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.4.0/trenni.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.4.0/trenni.so +0 -0
- data/ext/tmp/{x86_64-darwin18/trenni/2.6.2 → x86_64-linux/trenni/2.7.0}/Makefile +32 -32
- data/ext/tmp/x86_64-linux/trenni/2.7.0/escape.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.7.0/markup.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.7.0/mkmf.log +113 -0
- data/ext/tmp/x86_64-linux/trenni/2.7.0/query.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.7.0/tag.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.7.0/template.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.7.0/trenni.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.7.0/trenni.so +0 -0
- data/ext/tmp/{x86_64-darwin19 → x86_64-linux}/trenni/2.7.1/Makefile +27 -28
- data/ext/tmp/x86_64-linux/trenni/2.7.1/escape.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.7.1/markup.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.7.1/mkmf.log +113 -0
- data/ext/tmp/x86_64-linux/trenni/2.7.1/query.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.7.1/tag.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.7.1/template.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.7.1/trenni.o +0 -0
- data/ext/tmp/x86_64-linux/trenni/2.7.1/trenni.so +0 -0
- data/lib/trenni/builder.rb +46 -10
- data/lib/trenni/fallback/markup.rl.dot +278 -0
- data/lib/trenni/fallback/markup.rl.pdf +0 -0
- data/lib/trenni/fallback/query.rl.dot +54 -0
- data/lib/trenni/fallback/query.rl.pdf +0 -0
- data/lib/trenni/fallback/template.rl.dot +270 -0
- data/lib/trenni/fallback/template.rl.pdf +0 -0
- data/lib/trenni/template.rb +9 -18
- data/lib/trenni/trenni.so +0 -0
- data/lib/trenni/version.rb +1 -1
- data/spec/trenni/builder_spec.rb +1 -1
- data/spec/trenni/template_spec/builder.trenni +2 -2
- metadata +41 -51
- data/ext/.DS_Store +0 -0
- data/ext/tmp/.DS_Store +0 -0
- data/ext/tmp/x86_64-darwin16/lib/trenni/trenni.bundle +0 -0
- data/ext/tmp/x86_64-darwin16/trenni/2.4.0/escape.o +0 -0
- data/ext/tmp/x86_64-darwin16/trenni/2.4.0/markup.o +0 -0
- data/ext/tmp/x86_64-darwin16/trenni/2.4.0/mkmf.log +0 -105
- data/ext/tmp/x86_64-darwin16/trenni/2.4.0/tag.o +0 -0
- data/ext/tmp/x86_64-darwin16/trenni/2.4.0/template.o +0 -0
- data/ext/tmp/x86_64-darwin16/trenni/2.4.0/trenni.bundle +0 -0
- data/ext/tmp/x86_64-darwin16/trenni/2.4.0/trenni.o +0 -0
- data/ext/tmp/x86_64-darwin18/lib/trenni/trenni.bundle +0 -0
- data/ext/tmp/x86_64-darwin18/trenni/2.6.1/Makefile +0 -266
- data/ext/tmp/x86_64-darwin18/trenni/2.6.1/escape.o +0 -0
- data/ext/tmp/x86_64-darwin18/trenni/2.6.1/markup.o +0 -0
- data/ext/tmp/x86_64-darwin18/trenni/2.6.1/mkmf.log +0 -109
- data/ext/tmp/x86_64-darwin18/trenni/2.6.1/tag.o +0 -0
- data/ext/tmp/x86_64-darwin18/trenni/2.6.1/template.o +0 -0
- data/ext/tmp/x86_64-darwin18/trenni/2.6.1/trenni.bundle +0 -0
- data/ext/tmp/x86_64-darwin18/trenni/2.6.1/trenni.o +0 -0
- data/ext/tmp/x86_64-darwin18/trenni/2.6.2/escape.o +0 -0
- data/ext/tmp/x86_64-darwin18/trenni/2.6.2/markup.o +0 -0
- data/ext/tmp/x86_64-darwin18/trenni/2.6.2/mkmf.log +0 -109
- data/ext/tmp/x86_64-darwin18/trenni/2.6.2/tag.o +0 -0
- data/ext/tmp/x86_64-darwin18/trenni/2.6.2/template.o +0 -0
- data/ext/tmp/x86_64-darwin18/trenni/2.6.2/trenni.bundle +0 -0
- data/ext/tmp/x86_64-darwin18/trenni/2.6.2/trenni.o +0 -0
- data/ext/tmp/x86_64-darwin19/lib/trenni/trenni.bundle +0 -0
- data/ext/tmp/x86_64-darwin19/trenni/2.7.1/escape.o +0 -0
- data/ext/tmp/x86_64-darwin19/trenni/2.7.1/markup.o +0 -0
- data/ext/tmp/x86_64-darwin19/trenni/2.7.1/mkmf.log +0 -109
- data/ext/tmp/x86_64-darwin19/trenni/2.7.1/query.o +0 -0
- data/ext/tmp/x86_64-darwin19/trenni/2.7.1/tag.o +0 -0
- data/ext/tmp/x86_64-darwin19/trenni/2.7.1/template.o +0 -0
- data/ext/tmp/x86_64-darwin19/trenni/2.7.1/trenni.bundle +0 -0
- data/ext/tmp/x86_64-darwin19/trenni/2.7.1/trenni.o +0 -0
- data/ext/trenni/.DS_Store +0 -0
- data/lib/.DS_Store +0 -0
- data/lib/trenni/.DS_Store +0 -0
- data/parsers/.DS_Store +0 -0
- data/spec/.DS_Store +0 -0
- data/spec/trenni/template_spec/.DS_Store +0 -0
Binary file
|
@@ -0,0 +1,54 @@
|
|
1
|
+
digraph query {
|
2
|
+
rankdir=LR;
|
3
|
+
node [ shape = point ];
|
4
|
+
ENTRY;
|
5
|
+
en_6;
|
6
|
+
eof_7;
|
7
|
+
eof_8;
|
8
|
+
eof_9;
|
9
|
+
eof_10;
|
10
|
+
eof_11;
|
11
|
+
node [ shape = circle, height = 0.2 ];
|
12
|
+
node [ fixedsize = true, height = 0.65, shape = doublecircle ];
|
13
|
+
6;
|
14
|
+
7;
|
15
|
+
8;
|
16
|
+
9;
|
17
|
+
10;
|
18
|
+
11;
|
19
|
+
node [ shape = circle ];
|
20
|
+
1 -> 7 [ label = "-128..'%', '''..'/', ':'..'<', '>'..'Z', '\\', '^'..127 / string_begin" ];
|
21
|
+
1 -> 2 [ label = "'0'..'9' / string_begin, integer_begin" ];
|
22
|
+
2 -> 7 [ label = "-128..'%', '''..'/', ':'..'<', '>'..'Z', '\\', '^'..127" ];
|
23
|
+
2 -> 2 [ label = "'0'..'9'" ];
|
24
|
+
3 -> 4 [ label = "-128..'%', '''..'/', ':'..'<', '>'..'Z', '\\', '^'..127 / string_begin" ];
|
25
|
+
3 -> 5 [ label = "'0'..'9' / integer_begin, string_begin" ];
|
26
|
+
3 -> 11 [ label = "']'" ];
|
27
|
+
4 -> 4 [ label = "-128..'%', '''..'<', '>'..'Z', '\\', '^'..127" ];
|
28
|
+
4 -> 10 [ label = "']' / string_end" ];
|
29
|
+
5 -> 4 [ label = "-128..'%', '''..'/', ':'..'<', '>'..'Z', '\\', '^'..127" ];
|
30
|
+
5 -> 5 [ label = "'0'..'9'" ];
|
31
|
+
5 -> 10 [ label = "']' / integer_end" ];
|
32
|
+
6 -> 7 [ label = "-128..'%', '''..'/', ':'..'<', '>'..'Z', '\\', '^'..127 / string_begin" ];
|
33
|
+
6 -> 2 [ label = "'0'..'9' / string_begin, integer_begin" ];
|
34
|
+
7 -> 7 [ label = "-128..'%', '''..'<', '>'..'Z', '\\', '^'..127" ];
|
35
|
+
7 -> 1 [ label = "'&' / string_end, pair" ];
|
36
|
+
7 -> 8 [ label = "'=' / string_end" ];
|
37
|
+
7 -> 3 [ label = "'[' / string_end" ];
|
38
|
+
8 -> 9 [ label = "-128..'%', '''..'<', '>'..'Z', '\\', '^'..127 / value_begin" ];
|
39
|
+
8 -> 1 [ label = "'&' / value_begin, value_end, pair" ];
|
40
|
+
9 -> 9 [ label = "-128..'%', '''..'<', '>'..'Z', '\\', '^'..127" ];
|
41
|
+
9 -> 1 [ label = "'&' / value_end, pair" ];
|
42
|
+
10 -> 1 [ label = "'&' / pair" ];
|
43
|
+
10 -> 8 [ label = "'='" ];
|
44
|
+
10 -> 3 [ label = "'['" ];
|
45
|
+
11 -> 1 [ label = "'&' / append, pair" ];
|
46
|
+
11 -> 8 [ label = "'=' / append" ];
|
47
|
+
ENTRY -> 6 [ label = "IN" ];
|
48
|
+
en_6 -> 6 [ label = "main" ];
|
49
|
+
7 -> eof_7 [ label = "EOF / string_end, pair" ];
|
50
|
+
8 -> eof_8 [ label = "EOF / value_begin, value_end, pair" ];
|
51
|
+
9 -> eof_9 [ label = "EOF / value_end, pair" ];
|
52
|
+
10 -> eof_10 [ label = "EOF / pair" ];
|
53
|
+
11 -> eof_11 [ label = "EOF / append, pair" ];
|
54
|
+
}
|
Binary file
|
@@ -0,0 +1,270 @@
|
|
1
|
+
digraph template {
|
2
|
+
rankdir=LR;
|
3
|
+
node [ shape = point ];
|
4
|
+
ENTRY;
|
5
|
+
en_21;
|
6
|
+
en_32;
|
7
|
+
en_43;
|
8
|
+
eof_1;
|
9
|
+
eof_2;
|
10
|
+
eof_3;
|
11
|
+
eof_4;
|
12
|
+
eof_5;
|
13
|
+
eof_6;
|
14
|
+
eof_7;
|
15
|
+
eof_8;
|
16
|
+
eof_9;
|
17
|
+
eof_10;
|
18
|
+
eof_11;
|
19
|
+
eof_14;
|
20
|
+
eof_15;
|
21
|
+
eof_16;
|
22
|
+
eof_17;
|
23
|
+
eof_18;
|
24
|
+
eof_19;
|
25
|
+
eof_20;
|
26
|
+
eof_32;
|
27
|
+
eof_33;
|
28
|
+
eof_34;
|
29
|
+
eof_35;
|
30
|
+
eof_36;
|
31
|
+
eof_37;
|
32
|
+
eof_38;
|
33
|
+
eof_39;
|
34
|
+
eof_40;
|
35
|
+
eof_41;
|
36
|
+
eof_42;
|
37
|
+
eof_44;
|
38
|
+
eof_45;
|
39
|
+
eof_46;
|
40
|
+
eof_47;
|
41
|
+
eof_48;
|
42
|
+
node [ shape = circle, height = 0.2 ];
|
43
|
+
err_14 [ label=""];
|
44
|
+
err_15 [ label=""];
|
45
|
+
err_18 [ label=""];
|
46
|
+
node [ fixedsize = true, height = 0.65, shape = doublecircle ];
|
47
|
+
43;
|
48
|
+
44;
|
49
|
+
45;
|
50
|
+
46;
|
51
|
+
47;
|
52
|
+
48;
|
53
|
+
49;
|
54
|
+
50;
|
55
|
+
51;
|
56
|
+
52;
|
57
|
+
53;
|
58
|
+
54;
|
59
|
+
55;
|
60
|
+
56;
|
61
|
+
node [ shape = circle ];
|
62
|
+
1 -> 45 [ label = "'\\n' / te" ];
|
63
|
+
1 -> 2 [ label = "'#'" ];
|
64
|
+
1 -> 3 [ label = "'<'" ];
|
65
|
+
1 -> 1 [ label = "DEF" ];
|
66
|
+
2 -> 43 [ label = "'{' / lag2, initts" ];
|
67
|
+
2 -> 1 [ label = "DEF" ];
|
68
|
+
3 -> 43 [ label = "'?' / lag2, initts" ];
|
69
|
+
3 -> 1 [ label = "DEF" ];
|
70
|
+
4 -> 43 [ label = "'{' / lag6, initts" ];
|
71
|
+
4 -> 44 [ label = "DEF / te" ];
|
72
|
+
5 -> 43 [ label = "'?' / lag6, initts" ];
|
73
|
+
5 -> 44 [ label = "DEF / te" ];
|
74
|
+
6 -> 7 [ label = "'?'" ];
|
75
|
+
6 -> 44 [ label = "DEF / te" ];
|
76
|
+
7 -> 8 [ label = "'r'" ];
|
77
|
+
7 -> 43 [ label = "DEF / lag6, initts" ];
|
78
|
+
8 -> 9 [ label = "'\\t'..'\\r', SP / instruction_begin" ];
|
79
|
+
8 -> 43 [ label = "DEF / lag6, initts" ];
|
80
|
+
9 -> 10 [ label = "'?' / instruction_end" ];
|
81
|
+
9 -> 9 [ label = "DEF" ];
|
82
|
+
10 -> 11 [ label = "'>'" ];
|
83
|
+
10 -> 9 [ label = "DEF" ];
|
84
|
+
11 -> 11 [ label = "'\\t', '\\v'..'\\r', SP" ];
|
85
|
+
11 -> 43 [ label = "'\\n' / last1, initts" ];
|
86
|
+
11 -> 43 [ label = "DEF / switch, initts" ];
|
87
|
+
12 -> 47 [ label = "'{'" ];
|
88
|
+
12 -> 44 [ label = "DEF / te" ];
|
89
|
+
13 -> 14 [ label = "'?'" ];
|
90
|
+
13 -> 44 [ label = "DEF / te" ];
|
91
|
+
14 -> err_14 [ label = "0..',', '/', ';'..'@', '['..'^', '`', '{'..127 / instruction_error" ];
|
92
|
+
14 -> 18 [ label = "'r'" ];
|
93
|
+
14 -> 15 [ label = "DEF" ];
|
94
|
+
15 -> err_15 [ label = "0..'\\b', 14..31, '!'..',', '/', ';'..'@', '['..'^', '`', '{'..127 / instruction_error" ];
|
95
|
+
15 -> 16 [ label = "'\\t'..'\\r', SP" ];
|
96
|
+
15 -> 15 [ label = "DEF" ];
|
97
|
+
16 -> 17 [ label = "'?'" ];
|
98
|
+
16 -> 16 [ label = "DEF" ];
|
99
|
+
17 -> 43 [ label = "'>' / last5, initts" ];
|
100
|
+
17 -> 16 [ label = "DEF" ];
|
101
|
+
18 -> err_18 [ label = "0..'\\b', 14..31, '!'..',', '/', ';'..'@', '['..'^', '`', '{'..127 / instruction_error" ];
|
102
|
+
18 -> 19 [ label = "'\\t'..'\\r', SP / instruction_begin" ];
|
103
|
+
18 -> 15 [ label = "DEF" ];
|
104
|
+
19 -> 20 [ label = "'?' / instruction_end" ];
|
105
|
+
19 -> 19 [ label = "DEF" ];
|
106
|
+
20 -> 48 [ label = "'>' / te, store3" ];
|
107
|
+
20 -> 19 [ label = "DEF" ];
|
108
|
+
21 -> 22 [ label = "'\"' / initts" ];
|
109
|
+
21 -> 30 [ label = "'''" ];
|
110
|
+
21 -> 21 [ label = "'{' / 17:27, initts" ];
|
111
|
+
21 -> 52 [ label = "'}' / 20:51" ];
|
112
|
+
21 -> 21 [ label = "DEF / initts" ];
|
113
|
+
22 -> 23 [ label = "'\"' / initts" ];
|
114
|
+
22 -> 29 [ label = "'#'" ];
|
115
|
+
22 -> 22 [ label = "DEF / initts" ];
|
116
|
+
23 -> 24 [ label = "'#'" ];
|
117
|
+
23 -> 25 [ label = "''' / initts" ];
|
118
|
+
23 -> 23 [ label = "'{' / 17:27, initts" ];
|
119
|
+
23 -> 50 [ label = "'}' / 20:51" ];
|
120
|
+
23 -> 23 [ label = "DEF / initts" ];
|
121
|
+
24 -> 24 [ label = "'#'" ];
|
122
|
+
24 -> 25 [ label = "''' / initts" ];
|
123
|
+
24 -> 23 [ label = "'{' / 13:33, 17:27, initts" ];
|
124
|
+
24 -> 50 [ label = "'}' / 20:51" ];
|
125
|
+
24 -> 23 [ label = "DEF / initts" ];
|
126
|
+
25 -> 26 [ label = "'\"', ''' / initts" ];
|
127
|
+
25 -> 28 [ label = "'#'" ];
|
128
|
+
25 -> 25 [ label = "DEF / initts" ];
|
129
|
+
26 -> 27 [ label = "'#'" ];
|
130
|
+
26 -> 26 [ label = "'{' / 17:27, initts" ];
|
131
|
+
26 -> 49 [ label = "'}' / 20:51" ];
|
132
|
+
26 -> 26 [ label = "DEF / initts" ];
|
133
|
+
27 -> 27 [ label = "'#'" ];
|
134
|
+
27 -> 26 [ label = "'{' / 13:33, 17:27, initts" ];
|
135
|
+
27 -> 49 [ label = "'}' / 20:51" ];
|
136
|
+
27 -> 26 [ label = "DEF / initts" ];
|
137
|
+
28 -> 26 [ label = "'\"', ''' / initts" ];
|
138
|
+
28 -> 28 [ label = "'#'" ];
|
139
|
+
28 -> 25 [ label = "'{' / 13:33, initts" ];
|
140
|
+
28 -> 25 [ label = "DEF / initts" ];
|
141
|
+
29 -> 23 [ label = "'\"' / initts" ];
|
142
|
+
29 -> 29 [ label = "'#'" ];
|
143
|
+
29 -> 22 [ label = "'{' / 13:33, initts" ];
|
144
|
+
29 -> 22 [ label = "DEF / initts" ];
|
145
|
+
30 -> 31 [ label = "''' / initts" ];
|
146
|
+
30 -> 30 [ label = "DEF" ];
|
147
|
+
31 -> 25 [ label = "'\"' / initts" ];
|
148
|
+
31 -> 31 [ label = "'{' / 17:27, initts" ];
|
149
|
+
31 -> 51 [ label = "'}' / 20:51" ];
|
150
|
+
31 -> 31 [ label = "DEF / initts" ];
|
151
|
+
32 -> 33 [ label = "'\"' / initts" ];
|
152
|
+
32 -> 41 [ label = "'''" ];
|
153
|
+
32 -> 32 [ label = "'{' / 17:27, initts" ];
|
154
|
+
32 -> 56 [ label = "'}' / expression_end, emit_expression, 21:102" ];
|
155
|
+
32 -> 32 [ label = "DEF / initts" ];
|
156
|
+
33 -> 34 [ label = "'\"' / initts" ];
|
157
|
+
33 -> 40 [ label = "'#'" ];
|
158
|
+
33 -> 33 [ label = "DEF / initts" ];
|
159
|
+
34 -> 35 [ label = "'#'" ];
|
160
|
+
34 -> 36 [ label = "''' / initts" ];
|
161
|
+
34 -> 34 [ label = "'{' / 17:27, initts" ];
|
162
|
+
34 -> 54 [ label = "'}' / expression_end, emit_expression, 21:102" ];
|
163
|
+
34 -> 34 [ label = "DEF / initts" ];
|
164
|
+
35 -> 35 [ label = "'#'" ];
|
165
|
+
35 -> 36 [ label = "''' / initts" ];
|
166
|
+
35 -> 34 [ label = "'{' / 13:33, 17:27, initts" ];
|
167
|
+
35 -> 54 [ label = "'}' / expression_end, emit_expression, 21:102" ];
|
168
|
+
35 -> 34 [ label = "DEF / initts" ];
|
169
|
+
36 -> 37 [ label = "'\"', ''' / initts" ];
|
170
|
+
36 -> 39 [ label = "'#'" ];
|
171
|
+
36 -> 36 [ label = "DEF / initts" ];
|
172
|
+
37 -> 38 [ label = "'#'" ];
|
173
|
+
37 -> 37 [ label = "'{' / 17:27, initts" ];
|
174
|
+
37 -> 53 [ label = "'}' / expression_end, emit_expression, 21:102" ];
|
175
|
+
37 -> 37 [ label = "DEF / initts" ];
|
176
|
+
38 -> 38 [ label = "'#'" ];
|
177
|
+
38 -> 37 [ label = "'{' / 13:33, 17:27, initts" ];
|
178
|
+
38 -> 53 [ label = "'}' / expression_end, emit_expression, 21:102" ];
|
179
|
+
38 -> 37 [ label = "DEF / initts" ];
|
180
|
+
39 -> 37 [ label = "'\"', ''' / initts" ];
|
181
|
+
39 -> 39 [ label = "'#'" ];
|
182
|
+
39 -> 36 [ label = "'{' / 13:33, initts" ];
|
183
|
+
39 -> 36 [ label = "DEF / initts" ];
|
184
|
+
40 -> 34 [ label = "'\"' / initts" ];
|
185
|
+
40 -> 40 [ label = "'#'" ];
|
186
|
+
40 -> 33 [ label = "'{' / 13:33, initts" ];
|
187
|
+
40 -> 33 [ label = "DEF / initts" ];
|
188
|
+
41 -> 42 [ label = "''' / initts" ];
|
189
|
+
41 -> 41 [ label = "DEF" ];
|
190
|
+
42 -> 36 [ label = "'\"' / initts" ];
|
191
|
+
42 -> 42 [ label = "'{' / 17:27, initts" ];
|
192
|
+
42 -> 55 [ label = "'}' / expression_end, emit_expression, 21:102" ];
|
193
|
+
42 -> 42 [ label = "DEF / initts" ];
|
194
|
+
43 -> 46 [ label = "'\\t', '\\v'..'\\r', SP / ts, te, store6" ];
|
195
|
+
43 -> 45 [ label = "'\\n' / ts, te" ];
|
196
|
+
43 -> 12 [ label = "'#' / ts" ];
|
197
|
+
43 -> 13 [ label = "'<' / ts" ];
|
198
|
+
43 -> 44 [ label = "DEF / ts, te" ];
|
199
|
+
44 -> 45 [ label = "'\\n' / te" ];
|
200
|
+
44 -> 4 [ label = "'#'" ];
|
201
|
+
44 -> 5 [ label = "'<'" ];
|
202
|
+
44 -> 44 [ label = "DEF / te" ];
|
203
|
+
45 -> 45 [ label = "'\\n' / te" ];
|
204
|
+
45 -> 2 [ label = "'#'" ];
|
205
|
+
45 -> 3 [ label = "'<'" ];
|
206
|
+
45 -> 1 [ label = "DEF" ];
|
207
|
+
46 -> 46 [ label = "'\\t', '\\v'..'\\r', SP / te, store6" ];
|
208
|
+
46 -> 45 [ label = "'\\n' / te" ];
|
209
|
+
46 -> 4 [ label = "'#'" ];
|
210
|
+
46 -> 6 [ label = "'<'" ];
|
211
|
+
46 -> 44 [ label = "DEF / te" ];
|
212
|
+
47 -> 43 [ label = "DEF / expression_begin, next4, initts" ];
|
213
|
+
48 -> 11 [ label = "'\\t', '\\v'..'\\r', SP" ];
|
214
|
+
48 -> 43 [ label = "'\\n' / last1, initts" ];
|
215
|
+
48 -> 43 [ label = "DEF / next3, initts" ];
|
216
|
+
49 -> 26 [ label = "'\"', ''' / initts" ];
|
217
|
+
49 -> 28 [ label = "'#'" ];
|
218
|
+
49 -> 25 [ label = "DEF / initts" ];
|
219
|
+
50 -> 23 [ label = "'\"' / initts" ];
|
220
|
+
50 -> 29 [ label = "'#'" ];
|
221
|
+
50 -> 22 [ label = "DEF / initts" ];
|
222
|
+
51 -> 31 [ label = "''' / initts" ];
|
223
|
+
51 -> 30 [ label = "DEF" ];
|
224
|
+
53 -> 37 [ label = "'\"', ''' / initts" ];
|
225
|
+
53 -> 39 [ label = "'#'" ];
|
226
|
+
53 -> 36 [ label = "DEF / initts" ];
|
227
|
+
54 -> 34 [ label = "'\"' / initts" ];
|
228
|
+
54 -> 40 [ label = "'#'" ];
|
229
|
+
54 -> 33 [ label = "DEF / initts" ];
|
230
|
+
55 -> 42 [ label = "''' / initts" ];
|
231
|
+
55 -> 41 [ label = "DEF" ];
|
232
|
+
ENTRY -> 43 [ label = "IN" ];
|
233
|
+
en_21 -> 21 [ label = "parse_nested_expression" ];
|
234
|
+
en_32 -> 32 [ label = "parse_expression" ];
|
235
|
+
en_43 -> 43 [ label = "main" ];
|
236
|
+
1 -> eof_1 [ label = "EOF / lag2" ];
|
237
|
+
2 -> eof_2 [ label = "EOF / lag2" ];
|
238
|
+
3 -> eof_3 [ label = "EOF / lag2" ];
|
239
|
+
4 -> eof_4 [ label = "EOF / lag6" ];
|
240
|
+
5 -> eof_5 [ label = "EOF / lag6" ];
|
241
|
+
6 -> eof_6 [ label = "EOF / lag6" ];
|
242
|
+
7 -> eof_7 [ label = "EOF / lag6" ];
|
243
|
+
8 -> eof_8 [ label = "EOF / instruction_error, lag6" ];
|
244
|
+
9 -> eof_9 [ label = "EOF / instruction_error, lag6" ];
|
245
|
+
10 -> eof_10 [ label = "EOF / instruction_error, lag6" ];
|
246
|
+
11 -> eof_11 [ label = "EOF / switch" ];
|
247
|
+
14 -> eof_14 [ label = "EOF / instruction_error" ];
|
248
|
+
15 -> eof_15 [ label = "EOF / instruction_error" ];
|
249
|
+
16 -> eof_16 [ label = "EOF / instruction_error" ];
|
250
|
+
17 -> eof_17 [ label = "EOF / instruction_error" ];
|
251
|
+
18 -> eof_18 [ label = "EOF / instruction_error" ];
|
252
|
+
19 -> eof_19 [ label = "EOF / instruction_error" ];
|
253
|
+
20 -> eof_20 [ label = "EOF / instruction_error" ];
|
254
|
+
32 -> eof_32 [ label = "EOF / expression_error" ];
|
255
|
+
33 -> eof_33 [ label = "EOF / expression_error" ];
|
256
|
+
34 -> eof_34 [ label = "EOF / expression_error" ];
|
257
|
+
35 -> eof_35 [ label = "EOF / expression_error" ];
|
258
|
+
36 -> eof_36 [ label = "EOF / expression_error" ];
|
259
|
+
37 -> eof_37 [ label = "EOF / expression_error" ];
|
260
|
+
38 -> eof_38 [ label = "EOF / expression_error" ];
|
261
|
+
39 -> eof_39 [ label = "EOF / expression_error" ];
|
262
|
+
40 -> eof_40 [ label = "EOF / expression_error" ];
|
263
|
+
41 -> eof_41 [ label = "EOF / expression_error" ];
|
264
|
+
42 -> eof_42 [ label = "EOF / expression_error" ];
|
265
|
+
44 -> eof_44 [ label = "EOF / next6" ];
|
266
|
+
45 -> eof_45 [ label = "EOF / next2" ];
|
267
|
+
46 -> eof_46 [ label = "EOF / next6" ];
|
268
|
+
47 -> eof_47 [ label = "EOF / expression_begin, next4" ];
|
269
|
+
48 -> eof_48 [ label = "EOF / next3" ];
|
270
|
+
}
|
Binary file
|
data/lib/trenni/template.rb
CHANGED
@@ -29,36 +29,27 @@ module Trenni
|
|
29
29
|
BINDING = binding
|
30
30
|
|
31
31
|
class Builder
|
32
|
-
def
|
33
|
-
|
34
|
-
Template.buffer(block.binding) << self
|
35
|
-
return nil
|
36
|
-
else
|
37
|
-
return self
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
def capture(*args, &block)
|
42
|
-
self.append Template.capture(*args, &block)
|
32
|
+
def capture(*arguments, &block)
|
33
|
+
Template.capture(*arguments, output: self, &block)
|
43
34
|
end
|
44
35
|
end
|
45
36
|
|
46
37
|
class Template
|
47
38
|
# Returns the output produced by calling the given block.
|
48
|
-
def self.capture(*
|
39
|
+
def self.capture(*arguments, output: nil, &block)
|
49
40
|
scope = block.binding
|
50
|
-
|
41
|
+
previous_output = scope.local_variable_get(OUT)
|
51
42
|
|
52
|
-
|
53
|
-
scope.local_variable_set(OUT,
|
43
|
+
output ||= previous_output.class.new(encoding: previous_output.encoding)
|
44
|
+
scope.local_variable_set(OUT, output)
|
54
45
|
|
55
46
|
begin
|
56
|
-
block.call(*
|
47
|
+
block.call(*arguments)
|
57
48
|
ensure
|
58
|
-
scope.local_variable_set(OUT,
|
49
|
+
scope.local_variable_set(OUT, previous_output)
|
59
50
|
end
|
60
51
|
|
61
|
-
return
|
52
|
+
return output
|
62
53
|
end
|
63
54
|
|
64
55
|
# Returns the buffer used for capturing output.
|
Binary file
|
data/lib/trenni/version.rb
CHANGED
data/spec/trenni/builder_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trenni
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|
@@ -94,8 +94,8 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '3.4'
|
97
|
-
description:
|
98
|
-
email:
|
97
|
+
description:
|
98
|
+
email:
|
99
99
|
executables: []
|
100
100
|
extensions:
|
101
101
|
- ext/Rakefile
|
@@ -103,46 +103,34 @@ extra_rdoc_files: []
|
|
103
103
|
files:
|
104
104
|
- bake/trenni/entities.rb
|
105
105
|
- bake/trenni/parsers.rb
|
106
|
-
- ext/.DS_Store
|
107
106
|
- ext/Rakefile
|
108
|
-
- ext/tmp
|
109
|
-
- ext/tmp/x86_64-
|
110
|
-
- ext/tmp/x86_64-
|
111
|
-
- ext/tmp/x86_64-
|
112
|
-
- ext/tmp/x86_64-
|
113
|
-
- ext/tmp/x86_64-
|
114
|
-
- ext/tmp/x86_64-
|
115
|
-
- ext/tmp/x86_64-
|
116
|
-
- ext/tmp/x86_64-
|
117
|
-
- ext/tmp/x86_64-
|
118
|
-
- ext/tmp/x86_64-
|
119
|
-
- ext/tmp/x86_64-
|
120
|
-
- ext/tmp/x86_64-
|
121
|
-
- ext/tmp/x86_64-
|
122
|
-
- ext/tmp/x86_64-
|
123
|
-
- ext/tmp/x86_64-
|
124
|
-
- ext/tmp/x86_64-
|
125
|
-
- ext/tmp/x86_64-
|
126
|
-
- ext/tmp/x86_64-
|
127
|
-
- ext/tmp/x86_64-
|
128
|
-
- ext/tmp/x86_64-
|
129
|
-
- ext/tmp/x86_64-
|
130
|
-
- ext/tmp/x86_64-
|
131
|
-
- ext/tmp/x86_64-
|
132
|
-
- ext/tmp/x86_64-
|
133
|
-
- ext/tmp/x86_64-
|
134
|
-
- ext/tmp/x86_64-
|
135
|
-
- ext/tmp/x86_64-darwin19/lib/trenni/trenni.bundle
|
136
|
-
- ext/tmp/x86_64-darwin19/trenni/2.7.1/Makefile
|
137
|
-
- ext/tmp/x86_64-darwin19/trenni/2.7.1/escape.o
|
138
|
-
- ext/tmp/x86_64-darwin19/trenni/2.7.1/markup.o
|
139
|
-
- ext/tmp/x86_64-darwin19/trenni/2.7.1/mkmf.log
|
140
|
-
- ext/tmp/x86_64-darwin19/trenni/2.7.1/query.o
|
141
|
-
- ext/tmp/x86_64-darwin19/trenni/2.7.1/tag.o
|
142
|
-
- ext/tmp/x86_64-darwin19/trenni/2.7.1/template.o
|
143
|
-
- ext/tmp/x86_64-darwin19/trenni/2.7.1/trenni.bundle
|
144
|
-
- ext/tmp/x86_64-darwin19/trenni/2.7.1/trenni.o
|
145
|
-
- ext/trenni/.DS_Store
|
107
|
+
- ext/tmp/x86_64-linux/lib/trenni/trenni.so
|
108
|
+
- ext/tmp/x86_64-linux/trenni/2.4.0/Makefile
|
109
|
+
- ext/tmp/x86_64-linux/trenni/2.4.0/escape.o
|
110
|
+
- ext/tmp/x86_64-linux/trenni/2.4.0/markup.o
|
111
|
+
- ext/tmp/x86_64-linux/trenni/2.4.0/mkmf.log
|
112
|
+
- ext/tmp/x86_64-linux/trenni/2.4.0/tag.o
|
113
|
+
- ext/tmp/x86_64-linux/trenni/2.4.0/template.o
|
114
|
+
- ext/tmp/x86_64-linux/trenni/2.4.0/trenni.o
|
115
|
+
- ext/tmp/x86_64-linux/trenni/2.4.0/trenni.so
|
116
|
+
- ext/tmp/x86_64-linux/trenni/2.7.0/Makefile
|
117
|
+
- ext/tmp/x86_64-linux/trenni/2.7.0/escape.o
|
118
|
+
- ext/tmp/x86_64-linux/trenni/2.7.0/markup.o
|
119
|
+
- ext/tmp/x86_64-linux/trenni/2.7.0/mkmf.log
|
120
|
+
- ext/tmp/x86_64-linux/trenni/2.7.0/query.o
|
121
|
+
- ext/tmp/x86_64-linux/trenni/2.7.0/tag.o
|
122
|
+
- ext/tmp/x86_64-linux/trenni/2.7.0/template.o
|
123
|
+
- ext/tmp/x86_64-linux/trenni/2.7.0/trenni.o
|
124
|
+
- ext/tmp/x86_64-linux/trenni/2.7.0/trenni.so
|
125
|
+
- ext/tmp/x86_64-linux/trenni/2.7.1/Makefile
|
126
|
+
- ext/tmp/x86_64-linux/trenni/2.7.1/escape.o
|
127
|
+
- ext/tmp/x86_64-linux/trenni/2.7.1/markup.o
|
128
|
+
- ext/tmp/x86_64-linux/trenni/2.7.1/mkmf.log
|
129
|
+
- ext/tmp/x86_64-linux/trenni/2.7.1/query.o
|
130
|
+
- ext/tmp/x86_64-linux/trenni/2.7.1/tag.o
|
131
|
+
- ext/tmp/x86_64-linux/trenni/2.7.1/template.o
|
132
|
+
- ext/tmp/x86_64-linux/trenni/2.7.1/trenni.o
|
133
|
+
- ext/tmp/x86_64-linux/trenni/2.7.1/trenni.so
|
146
134
|
- ext/trenni/escape.c
|
147
135
|
- ext/trenni/escape.h
|
148
136
|
- ext/trenni/extconf.rb
|
@@ -159,9 +147,7 @@ files:
|
|
159
147
|
- ext/trenni/template.rl
|
160
148
|
- ext/trenni/trenni.c
|
161
149
|
- ext/trenni/trenni.h
|
162
|
-
- lib/.DS_Store
|
163
150
|
- lib/trenni.rb
|
164
|
-
- lib/trenni/.DS_Store
|
165
151
|
- lib/trenni/buffer.rb
|
166
152
|
- lib/trenni/builder.rb
|
167
153
|
- lib/trenni/entities.rb
|
@@ -169,10 +155,16 @@ files:
|
|
169
155
|
- lib/trenni/error.rb
|
170
156
|
- lib/trenni/fallback/markup.rb
|
171
157
|
- lib/trenni/fallback/markup.rl
|
158
|
+
- lib/trenni/fallback/markup.rl.dot
|
159
|
+
- lib/trenni/fallback/markup.rl.pdf
|
172
160
|
- lib/trenni/fallback/query.rb
|
173
161
|
- lib/trenni/fallback/query.rl
|
162
|
+
- lib/trenni/fallback/query.rl.dot
|
163
|
+
- lib/trenni/fallback/query.rl.pdf
|
174
164
|
- lib/trenni/fallback/template.rb
|
175
165
|
- lib/trenni/fallback/template.rl
|
166
|
+
- lib/trenni/fallback/template.rl.dot
|
167
|
+
- lib/trenni/fallback/template.rl.pdf
|
176
168
|
- lib/trenni/markup.rb
|
177
169
|
- lib/trenni/native.rb
|
178
170
|
- lib/trenni/parse_delegate.rb
|
@@ -182,14 +174,13 @@ files:
|
|
182
174
|
- lib/trenni/strings.rb
|
183
175
|
- lib/trenni/tag.rb
|
184
176
|
- lib/trenni/template.rb
|
177
|
+
- lib/trenni/trenni.so
|
185
178
|
- lib/trenni/uri.rb
|
186
179
|
- lib/trenni/version.rb
|
187
|
-
- parsers/.DS_Store
|
188
180
|
- parsers/trenni/entities.rl
|
189
181
|
- parsers/trenni/markup.rl
|
190
182
|
- parsers/trenni/query.rl
|
191
183
|
- parsers/trenni/template.rl
|
192
|
-
- spec/.DS_Store
|
193
184
|
- spec/spec_helper.rb
|
194
185
|
- spec/trenni/builder_spec.rb
|
195
186
|
- spec/trenni/corpus/large.rb
|
@@ -205,7 +196,6 @@ files:
|
|
205
196
|
- spec/trenni/template_error_spec.rb
|
206
197
|
- spec/trenni/template_performance_spec.rb
|
207
198
|
- spec/trenni/template_spec.rb
|
208
|
-
- spec/trenni/template_spec/.DS_Store
|
209
199
|
- spec/trenni/template_spec/basic.trenni
|
210
200
|
- spec/trenni/template_spec/buffer.trenni
|
211
201
|
- spec/trenni/template_spec/builder.trenni
|
@@ -223,7 +213,7 @@ licenses:
|
|
223
213
|
- MIT
|
224
214
|
metadata:
|
225
215
|
funding_uri: https://github.com/sponsors/ioquatix
|
226
|
-
post_install_message:
|
216
|
+
post_install_message:
|
227
217
|
rdoc_options: []
|
228
218
|
require_paths:
|
229
219
|
- lib
|
@@ -239,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
229
|
version: '0'
|
240
230
|
requirements: []
|
241
231
|
rubygems_version: 3.1.2
|
242
|
-
signing_key:
|
232
|
+
signing_key:
|
243
233
|
specification_version: 4
|
244
234
|
summary: A fast native templating system that compiles directly to Ruby code.
|
245
235
|
test_files: []
|