hotcell 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +102 -84
- data/Rakefile +2 -2
- data/ext/lexerc/lexerc.c +350 -308
- data/ext/lexerc/lexerc.h +2 -7
- data/ext/lexerc/lexerc.rl +9 -90
- data/lib/hotcell/commands/for.rb +7 -2
- data/lib/hotcell/config.rb +2 -1
- data/lib/hotcell/extensions.rb +13 -1
- data/lib/hotcell/lexer.rb +5 -10
- data/lib/hotcell/lexer.rl +95 -0
- data/lib/hotcell/lexerr.rb +256 -215
- data/lib/hotcell/lexerr.rl +7 -91
- data/lib/hotcell/manipulator.rb +20 -2
- data/lib/hotcell/node/{calculator.rb → expression.rb} +4 -2
- data/lib/hotcell/node/tag.rb +5 -3
- data/lib/hotcell/node.rb +1 -1
- data/lib/hotcell/parser.rb +565 -514
- data/lib/hotcell/parser.y +46 -24
- data/lib/hotcell/template.rb +3 -2
- data/lib/hotcell/version.rb +1 -1
- data/lib/hotcell.rb +1 -1
- data/spec/lib/hotcell/commands/for_spec.rb +3 -0
- data/spec/lib/hotcell/config_spec.rb +6 -0
- data/spec/lib/hotcell/lexer_spec.rb +28 -17
- data/spec/lib/hotcell/manipulator_spec.rb +16 -11
- data/spec/lib/hotcell/node/block_spec.rb +2 -2
- data/spec/lib/hotcell/parser_spec.rb +113 -30
- data/spec/lib/hotcell/template_spec.rb +51 -1
- data/spec/lib/hotcell_spec.rb +1 -0
- metadata +4 -3
data/ext/lexerc/lexerc.c
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
|
2
2
|
#line 1 "ext/lexerc/lexerc.rl"
|
3
3
|
|
4
|
-
#line
|
4
|
+
#line 12 "ext/lexerc/lexerc.rl"
|
5
|
+
|
5
6
|
|
6
7
|
|
7
8
|
#include <ruby.h>
|
@@ -11,17 +12,17 @@ static VALUE mHotcell;
|
|
11
12
|
static VALUE cHotcellLexer;
|
12
13
|
|
13
14
|
|
14
|
-
#line
|
15
|
-
static const int puffer_lexer_start =
|
16
|
-
static const int puffer_lexer_first_final =
|
15
|
+
#line 16 "ext/lexerc/lexerc.c"
|
16
|
+
static const int puffer_lexer_start = 13;
|
17
|
+
static const int puffer_lexer_first_final = 13;
|
17
18
|
static const int puffer_lexer_error = 0;
|
18
19
|
|
19
|
-
static const int puffer_lexer_en_expression =
|
20
|
-
static const int puffer_lexer_en_template_comment =
|
21
|
-
static const int puffer_lexer_en_main =
|
20
|
+
static const int puffer_lexer_en_expression = 17;
|
21
|
+
static const int puffer_lexer_en_template_comment = 29;
|
22
|
+
static const int puffer_lexer_en_main = 13;
|
22
23
|
|
23
24
|
|
24
|
-
#line
|
25
|
+
#line 22 "ext/lexerc/lexerc.rl"
|
25
26
|
|
26
27
|
static char *p;
|
27
28
|
static char *ts;
|
@@ -46,7 +47,7 @@ static VALUE tokenize(VALUE self) {
|
|
46
47
|
char *eof = pe;
|
47
48
|
|
48
49
|
|
49
|
-
#line
|
50
|
+
#line 51 "ext/lexerc/lexerc.c"
|
50
51
|
{
|
51
52
|
cs = puffer_lexer_start;
|
52
53
|
top = 0;
|
@@ -55,9 +56,9 @@ static VALUE tokenize(VALUE self) {
|
|
55
56
|
act = 0;
|
56
57
|
}
|
57
58
|
|
58
|
-
#line
|
59
|
+
#line 46 "ext/lexerc/lexerc.rl"
|
59
60
|
|
60
|
-
#line
|
61
|
+
#line 62 "ext/lexerc/lexerc.c"
|
61
62
|
{
|
62
63
|
if ( p == pe )
|
63
64
|
goto _test_eof;
|
@@ -65,35 +66,38 @@ static VALUE tokenize(VALUE self) {
|
|
65
66
|
|
66
67
|
_again:
|
67
68
|
switch ( cs ) {
|
68
|
-
case 12: goto st12;
|
69
69
|
case 13: goto st13;
|
70
70
|
case 14: goto st14;
|
71
71
|
case 15: goto st15;
|
72
72
|
case 16: goto st16;
|
73
|
-
case 0: goto st0;
|
74
|
-
case 17: goto st17;
|
75
73
|
case 1: goto st1;
|
76
|
-
case
|
74
|
+
case 17: goto st17;
|
75
|
+
case 0: goto st0;
|
77
76
|
case 18: goto st18;
|
77
|
+
case 2: goto st2;
|
78
78
|
case 3: goto st3;
|
79
|
+
case 19: goto st19;
|
79
80
|
case 4: goto st4;
|
80
81
|
case 5: goto st5;
|
81
82
|
case 6: goto st6;
|
82
|
-
case 19: goto st19;
|
83
|
-
case 20: goto st20;
|
84
83
|
case 7: goto st7;
|
84
|
+
case 20: goto st20;
|
85
85
|
case 21: goto st21;
|
86
|
-
case 22: goto st22;
|
87
86
|
case 8: goto st8;
|
87
|
+
case 22: goto st22;
|
88
88
|
case 23: goto st23;
|
89
|
-
case 9: goto st9;
|
90
89
|
case 24: goto st24;
|
91
|
-
case 10: goto st10;
|
92
90
|
case 25: goto st25;
|
91
|
+
case 9: goto st9;
|
93
92
|
case 26: goto st26;
|
93
|
+
case 10: goto st10;
|
94
94
|
case 27: goto st27;
|
95
|
-
case 28: goto st28;
|
96
95
|
case 11: goto st11;
|
96
|
+
case 28: goto st28;
|
97
|
+
case 29: goto st29;
|
98
|
+
case 30: goto st30;
|
99
|
+
case 31: goto st31;
|
100
|
+
case 12: goto st12;
|
97
101
|
default: break;
|
98
102
|
}
|
99
103
|
|
@@ -102,74 +106,94 @@ _again:
|
|
102
106
|
_resume:
|
103
107
|
switch ( cs )
|
104
108
|
{
|
105
|
-
|
106
|
-
#line
|
107
|
-
{
|
108
|
-
goto
|
109
|
+
tr0:
|
110
|
+
#line 91 "lib/hotcell/lexer.rl"
|
111
|
+
{{p = ((te))-1;}{ emit_tag; {stack[top++] = 13; goto st17;} }}
|
112
|
+
goto st13;
|
113
|
+
tr1:
|
114
|
+
#line 91 "lib/hotcell/lexer.rl"
|
115
|
+
{te = p+1;{ emit_tag; {stack[top++] = 13; goto st17;} }}
|
116
|
+
goto st13;
|
109
117
|
tr22:
|
110
|
-
#line
|
111
|
-
{te = p;p--;{
|
112
|
-
goto
|
113
|
-
tr23:
|
114
|
-
#line 90 "ext/lexerc/lexerc.rl"
|
115
|
-
{te = p+1;{ emit_tag; {stack[top++] = 12; goto st16;} }}
|
116
|
-
goto st12;
|
118
|
+
#line 93 "lib/hotcell/lexer.rl"
|
119
|
+
{te = p;p--;{ emit_template; }}
|
120
|
+
goto st13;
|
117
121
|
tr24:
|
118
|
-
#line 91 "
|
119
|
-
{te = p
|
120
|
-
goto
|
121
|
-
|
122
|
-
#line
|
123
|
-
{
|
124
|
-
if ( ++p == pe )
|
125
|
-
goto _test_eof12;
|
126
|
-
case 12:
|
127
|
-
#line 1 "NONE"
|
128
|
-
{ts = p;}
|
129
|
-
#line 130 "ext/lexerc/lexerc.c"
|
130
|
-
if ( (*p) == 123 )
|
131
|
-
goto st14;
|
122
|
+
#line 91 "lib/hotcell/lexer.rl"
|
123
|
+
{te = p;p--;{ emit_tag; {stack[top++] = 13; goto st17;} }}
|
124
|
+
goto st13;
|
125
|
+
tr25:
|
126
|
+
#line 92 "lib/hotcell/lexer.rl"
|
127
|
+
{te = p+1;{ emit_comment; {stack[top++] = 13; goto st29;} }}
|
132
128
|
goto st13;
|
133
129
|
st13:
|
130
|
+
#line 1 "NONE"
|
131
|
+
{ts = 0;}
|
134
132
|
if ( ++p == pe )
|
135
133
|
goto _test_eof13;
|
136
134
|
case 13:
|
135
|
+
#line 1 "NONE"
|
136
|
+
{ts = p;}
|
137
|
+
#line 138 "ext/lexerc/lexerc.c"
|
137
138
|
if ( (*p) == 123 )
|
138
|
-
goto
|
139
|
-
goto
|
139
|
+
goto st15;
|
140
|
+
goto st14;
|
140
141
|
st14:
|
141
142
|
if ( ++p == pe )
|
142
143
|
goto _test_eof14;
|
143
144
|
case 14:
|
144
145
|
if ( (*p) == 123 )
|
145
|
-
goto
|
146
|
-
goto
|
146
|
+
goto tr22;
|
147
|
+
goto st14;
|
147
148
|
st15:
|
148
149
|
if ( ++p == pe )
|
149
150
|
goto _test_eof15;
|
150
151
|
case 15:
|
151
|
-
|
152
|
-
|
153
|
-
case 35: goto tr24;
|
154
|
-
}
|
152
|
+
if ( (*p) == 123 )
|
153
|
+
goto tr23;
|
155
154
|
goto tr22;
|
156
|
-
|
157
|
-
#line
|
158
|
-
{te = p+1;
|
155
|
+
tr23:
|
156
|
+
#line 1 "NONE"
|
157
|
+
{te = p+1;}
|
159
158
|
goto st16;
|
159
|
+
st16:
|
160
|
+
if ( ++p == pe )
|
161
|
+
goto _test_eof16;
|
162
|
+
case 16:
|
163
|
+
#line 164 "ext/lexerc/lexerc.c"
|
164
|
+
switch( (*p) ) {
|
165
|
+
case 33: goto tr1;
|
166
|
+
case 35: goto tr25;
|
167
|
+
case 94: goto tr1;
|
168
|
+
case 101: goto st1;
|
169
|
+
case 114: goto st1;
|
170
|
+
case 126: goto tr1;
|
171
|
+
}
|
172
|
+
goto tr24;
|
173
|
+
st1:
|
174
|
+
if ( ++p == pe )
|
175
|
+
goto _test_eof1;
|
176
|
+
case 1:
|
177
|
+
if ( (*p) == 32 )
|
178
|
+
goto tr1;
|
179
|
+
goto tr0;
|
160
180
|
tr3:
|
161
|
-
#line
|
162
|
-
{
|
163
|
-
goto
|
181
|
+
#line 79 "lib/hotcell/lexer.rl"
|
182
|
+
{te = p+1;{ emit_dstring; }}
|
183
|
+
goto st17;
|
164
184
|
tr5:
|
165
|
-
#line
|
185
|
+
#line 81 "lib/hotcell/lexer.rl"
|
186
|
+
{{p = ((te))-1;}{ emit_comment; }}
|
187
|
+
goto st17;
|
188
|
+
tr7:
|
189
|
+
#line 75 "lib/hotcell/lexer.rl"
|
166
190
|
{te = p+1;{ emit_operator; }}
|
167
|
-
goto
|
168
|
-
tr8:
|
169
|
-
#line 77 "ext/lexerc/lexerc.rl"
|
170
|
-
{te = p+1;{ emit_sstring; }}
|
171
|
-
goto st16;
|
191
|
+
goto st17;
|
172
192
|
tr10:
|
193
|
+
#line 78 "lib/hotcell/lexer.rl"
|
194
|
+
{te = p+1;{ emit_sstring; }}
|
195
|
+
goto st17;
|
196
|
+
tr12:
|
173
197
|
#line 1 "NONE"
|
174
198
|
{ switch( act ) {
|
175
199
|
case 2:
|
@@ -180,402 +204,420 @@ tr10:
|
|
180
204
|
break;
|
181
205
|
}
|
182
206
|
}
|
183
|
-
goto
|
184
|
-
|
185
|
-
#line
|
207
|
+
goto st17;
|
208
|
+
tr14:
|
209
|
+
#line 75 "lib/hotcell/lexer.rl"
|
186
210
|
{{p = ((te))-1;}{ emit_operator; }}
|
187
|
-
goto
|
188
|
-
|
189
|
-
#line
|
211
|
+
goto st17;
|
212
|
+
tr27:
|
213
|
+
#line 82 "lib/hotcell/lexer.rl"
|
190
214
|
{te = p+1;}
|
191
|
-
goto
|
192
|
-
|
193
|
-
#line
|
215
|
+
goto st17;
|
216
|
+
tr38:
|
217
|
+
#line 75 "lib/hotcell/lexer.rl"
|
194
218
|
{te = p;p--;{ emit_operator; }}
|
195
|
-
goto
|
196
|
-
|
197
|
-
#line
|
219
|
+
goto st17;
|
220
|
+
tr39:
|
221
|
+
#line 81 "lib/hotcell/lexer.rl"
|
198
222
|
{te = p;p--;{ emit_comment; }}
|
199
|
-
goto
|
200
|
-
|
201
|
-
#line
|
223
|
+
goto st17;
|
224
|
+
tr42:
|
225
|
+
#line 76 "lib/hotcell/lexer.rl"
|
226
|
+
{te = p;p--;{ emit_numeric; }}
|
227
|
+
goto st17;
|
228
|
+
tr44:
|
229
|
+
#line 80 "lib/hotcell/lexer.rl"
|
202
230
|
{te = p;p--;{ emit_regexp; }}
|
203
|
-
goto
|
204
|
-
|
205
|
-
#line
|
231
|
+
goto st17;
|
232
|
+
tr45:
|
233
|
+
#line 77 "lib/hotcell/lexer.rl"
|
206
234
|
{te = p;p--;{ emit_identifer; }}
|
207
|
-
goto
|
208
|
-
|
209
|
-
#line
|
235
|
+
goto st17;
|
236
|
+
tr46:
|
237
|
+
#line 77 "lib/hotcell/lexer.rl"
|
210
238
|
{te = p+1;{ emit_identifer; }}
|
211
|
-
goto
|
212
|
-
|
213
|
-
#line
|
239
|
+
goto st17;
|
240
|
+
tr47:
|
241
|
+
#line 74 "lib/hotcell/lexer.rl"
|
214
242
|
{te = p+1;{ emit_tag; {cs = stack[--top];goto _again;} }}
|
215
|
-
goto
|
216
|
-
|
243
|
+
goto st17;
|
244
|
+
st17:
|
217
245
|
#line 1 "NONE"
|
218
246
|
{ts = 0;}
|
219
247
|
if ( ++p == pe )
|
220
|
-
goto
|
221
|
-
case
|
248
|
+
goto _test_eof17;
|
249
|
+
case 17:
|
222
250
|
#line 1 "NONE"
|
223
251
|
{ts = p;}
|
224
|
-
#line
|
252
|
+
#line 253 "ext/lexerc/lexerc.c"
|
225
253
|
switch( (*p) ) {
|
226
|
-
case 10: goto
|
227
|
-
case 32: goto
|
228
|
-
case 33: goto
|
229
|
-
case 34: goto
|
230
|
-
case 35: goto
|
231
|
-
case 38: goto
|
232
|
-
case 39: goto
|
233
|
-
case 42: goto
|
234
|
-
case 45: goto
|
235
|
-
case 46: goto
|
236
|
-
case 47: goto
|
237
|
-
case 63: goto
|
238
|
-
case 91: goto
|
239
|
-
case 93: goto
|
240
|
-
case 95: goto
|
241
|
-
case 123: goto
|
242
|
-
case 124: goto
|
243
|
-
case 125: goto
|
254
|
+
case 10: goto tr7;
|
255
|
+
case 32: goto tr27;
|
256
|
+
case 33: goto st18;
|
257
|
+
case 34: goto st2;
|
258
|
+
case 35: goto tr6;
|
259
|
+
case 38: goto st5;
|
260
|
+
case 39: goto st6;
|
261
|
+
case 42: goto st20;
|
262
|
+
case 45: goto tr31;
|
263
|
+
case 46: goto st23;
|
264
|
+
case 47: goto tr33;
|
265
|
+
case 63: goto tr7;
|
266
|
+
case 91: goto tr7;
|
267
|
+
case 93: goto tr7;
|
268
|
+
case 95: goto st27;
|
269
|
+
case 123: goto tr7;
|
270
|
+
case 124: goto st11;
|
271
|
+
case 125: goto st28;
|
244
272
|
}
|
245
273
|
if ( (*p) < 58 ) {
|
246
274
|
if ( (*p) < 37 ) {
|
247
275
|
if ( 9 <= (*p) && (*p) <= 13 )
|
248
|
-
goto
|
276
|
+
goto tr27;
|
249
277
|
} else if ( (*p) > 44 ) {
|
250
278
|
if ( 48 <= (*p) && (*p) <= 57 )
|
251
|
-
goto
|
279
|
+
goto tr34;
|
252
280
|
} else
|
253
|
-
goto
|
281
|
+
goto tr7;
|
254
282
|
} else if ( (*p) > 59 ) {
|
255
283
|
if ( (*p) < 65 ) {
|
256
284
|
if ( 60 <= (*p) && (*p) <= 62 )
|
257
|
-
goto
|
285
|
+
goto st18;
|
258
286
|
} else if ( (*p) > 90 ) {
|
259
287
|
if ( 97 <= (*p) && (*p) <= 122 )
|
260
|
-
goto
|
288
|
+
goto st27;
|
261
289
|
} else
|
262
|
-
goto
|
290
|
+
goto st27;
|
263
291
|
} else
|
264
|
-
goto
|
292
|
+
goto tr7;
|
265
293
|
goto st0;
|
266
294
|
st0:
|
267
295
|
cs = 0;
|
268
296
|
goto _out;
|
269
|
-
|
297
|
+
st18:
|
270
298
|
if ( ++p == pe )
|
271
|
-
goto
|
272
|
-
case
|
299
|
+
goto _test_eof18;
|
300
|
+
case 18:
|
273
301
|
if ( (*p) == 61 )
|
274
|
-
goto
|
275
|
-
goto
|
276
|
-
st1:
|
277
|
-
if ( ++p == pe )
|
278
|
-
goto _test_eof1;
|
279
|
-
case 1:
|
280
|
-
switch( (*p) ) {
|
281
|
-
case 34: goto tr1;
|
282
|
-
case 92: goto st2;
|
283
|
-
}
|
284
|
-
goto st1;
|
302
|
+
goto tr7;
|
303
|
+
goto tr38;
|
285
304
|
st2:
|
286
305
|
if ( ++p == pe )
|
287
306
|
goto _test_eof2;
|
288
307
|
case 2:
|
289
|
-
goto st1;
|
290
|
-
tr4:
|
291
|
-
#line 1 "NONE"
|
292
|
-
{te = p+1;}
|
293
|
-
goto st18;
|
294
|
-
st18:
|
295
|
-
if ( ++p == pe )
|
296
|
-
goto _test_eof18;
|
297
|
-
case 18:
|
298
|
-
#line 299 "ext/lexerc/lexerc.c"
|
299
308
|
switch( (*p) ) {
|
300
|
-
case
|
301
|
-
case
|
309
|
+
case 34: goto tr3;
|
310
|
+
case 92: goto st3;
|
302
311
|
}
|
303
|
-
goto
|
312
|
+
goto st2;
|
304
313
|
st3:
|
305
314
|
if ( ++p == pe )
|
306
315
|
goto _test_eof3;
|
307
316
|
case 3:
|
308
|
-
|
309
|
-
|
310
|
-
|
317
|
+
goto st2;
|
318
|
+
tr6:
|
319
|
+
#line 1 "NONE"
|
320
|
+
{te = p+1;}
|
321
|
+
goto st19;
|
322
|
+
st19:
|
323
|
+
if ( ++p == pe )
|
324
|
+
goto _test_eof19;
|
325
|
+
case 19:
|
326
|
+
#line 327 "ext/lexerc/lexerc.c"
|
327
|
+
switch( (*p) ) {
|
328
|
+
case 10: goto tr39;
|
329
|
+
case 125: goto st4;
|
330
|
+
}
|
331
|
+
goto tr6;
|
311
332
|
st4:
|
312
333
|
if ( ++p == pe )
|
313
334
|
goto _test_eof4;
|
314
335
|
case 4:
|
315
|
-
if ( (*p) ==
|
336
|
+
if ( (*p) == 125 )
|
316
337
|
goto tr5;
|
317
|
-
goto
|
338
|
+
goto tr6;
|
318
339
|
st5:
|
319
340
|
if ( ++p == pe )
|
320
341
|
goto _test_eof5;
|
321
342
|
case 5:
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
}
|
326
|
-
goto st5;
|
343
|
+
if ( (*p) == 38 )
|
344
|
+
goto tr7;
|
345
|
+
goto st0;
|
327
346
|
st6:
|
328
347
|
if ( ++p == pe )
|
329
348
|
goto _test_eof6;
|
330
349
|
case 6:
|
331
|
-
|
332
|
-
|
350
|
+
switch( (*p) ) {
|
351
|
+
case 39: goto tr10;
|
352
|
+
case 92: goto st7;
|
353
|
+
}
|
354
|
+
goto st6;
|
355
|
+
st7:
|
333
356
|
if ( ++p == pe )
|
334
|
-
goto
|
335
|
-
case
|
336
|
-
|
337
|
-
goto tr5;
|
338
|
-
goto tr36;
|
339
|
-
tr32:
|
340
|
-
#line 1 "NONE"
|
341
|
-
{te = p+1;}
|
342
|
-
#line 75 "ext/lexerc/lexerc.rl"
|
343
|
-
{act = 3;}
|
344
|
-
goto st20;
|
345
|
-
tr29:
|
346
|
-
#line 1 "NONE"
|
347
|
-
{te = p+1;}
|
348
|
-
#line 74 "ext/lexerc/lexerc.rl"
|
349
|
-
{act = 2;}
|
350
|
-
goto st20;
|
357
|
+
goto _test_eof7;
|
358
|
+
case 7:
|
359
|
+
goto st6;
|
351
360
|
st20:
|
352
361
|
if ( ++p == pe )
|
353
362
|
goto _test_eof20;
|
354
363
|
case 20:
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
goto tr32;
|
360
|
-
goto tr10;
|
361
|
-
st7:
|
362
|
-
if ( ++p == pe )
|
363
|
-
goto _test_eof7;
|
364
|
-
case 7:
|
365
|
-
if ( 48 <= (*p) && (*p) <= 57 )
|
366
|
-
goto tr11;
|
367
|
-
goto tr10;
|
368
|
-
tr11:
|
364
|
+
if ( (*p) == 42 )
|
365
|
+
goto tr7;
|
366
|
+
goto tr38;
|
367
|
+
tr31:
|
369
368
|
#line 1 "NONE"
|
370
369
|
{te = p+1;}
|
371
|
-
#line 75 "
|
372
|
-
{act =
|
370
|
+
#line 75 "lib/hotcell/lexer.rl"
|
371
|
+
{act = 2;}
|
373
372
|
goto st21;
|
374
|
-
|
373
|
+
tr34:
|
375
374
|
#line 1 "NONE"
|
376
375
|
{te = p+1;}
|
377
|
-
#line
|
378
|
-
{act =
|
376
|
+
#line 76 "lib/hotcell/lexer.rl"
|
377
|
+
{act = 3;}
|
379
378
|
goto st21;
|
380
379
|
st21:
|
381
380
|
if ( ++p == pe )
|
382
381
|
goto _test_eof21;
|
383
382
|
case 21:
|
384
|
-
#line
|
383
|
+
#line 384 "ext/lexerc/lexerc.c"
|
384
|
+
if ( (*p) == 46 )
|
385
|
+
goto st8;
|
385
386
|
if ( 48 <= (*p) && (*p) <= 57 )
|
386
|
-
goto
|
387
|
-
goto
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
387
|
+
goto tr34;
|
388
|
+
goto tr12;
|
389
|
+
st8:
|
390
|
+
if ( ++p == pe )
|
391
|
+
goto _test_eof8;
|
392
|
+
case 8:
|
393
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
394
|
+
goto st22;
|
395
|
+
goto tr12;
|
394
396
|
st22:
|
395
397
|
if ( ++p == pe )
|
396
398
|
goto _test_eof22;
|
397
399
|
case 22:
|
398
|
-
|
400
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
401
|
+
goto st22;
|
402
|
+
goto tr42;
|
403
|
+
st23:
|
404
|
+
if ( ++p == pe )
|
405
|
+
goto _test_eof23;
|
406
|
+
case 23:
|
407
|
+
if ( (*p) == 46 )
|
408
|
+
goto st24;
|
409
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
410
|
+
goto st22;
|
411
|
+
goto tr38;
|
412
|
+
st24:
|
413
|
+
if ( ++p == pe )
|
414
|
+
goto _test_eof24;
|
415
|
+
case 24:
|
416
|
+
if ( (*p) == 46 )
|
417
|
+
goto tr7;
|
418
|
+
goto tr38;
|
419
|
+
tr33:
|
420
|
+
#line 1 "NONE"
|
421
|
+
{te = p+1;}
|
422
|
+
#line 4 "ext/lexerc/lexerc.rl"
|
423
|
+
{
|
424
|
+
if (regexp_possible == Qfalse) {
|
425
|
+
emit_operator;
|
426
|
+
{goto st17;}
|
427
|
+
}
|
428
|
+
}
|
429
|
+
goto st25;
|
430
|
+
st25:
|
431
|
+
if ( ++p == pe )
|
432
|
+
goto _test_eof25;
|
433
|
+
case 25:
|
434
|
+
#line 435 "ext/lexerc/lexerc.c"
|
399
435
|
switch( (*p) ) {
|
400
|
-
case 47: goto
|
401
|
-
case 92: goto
|
436
|
+
case 47: goto st26;
|
437
|
+
case 92: goto st10;
|
402
438
|
}
|
403
|
-
goto
|
404
|
-
|
439
|
+
goto st9;
|
440
|
+
st9:
|
405
441
|
if ( ++p == pe )
|
406
|
-
goto
|
407
|
-
case
|
442
|
+
goto _test_eof9;
|
443
|
+
case 9:
|
408
444
|
switch( (*p) ) {
|
409
|
-
case 47: goto
|
410
|
-
case 92: goto
|
445
|
+
case 47: goto st26;
|
446
|
+
case 92: goto st10;
|
411
447
|
}
|
412
|
-
goto
|
413
|
-
|
448
|
+
goto st9;
|
449
|
+
st26:
|
414
450
|
if ( ++p == pe )
|
415
|
-
goto
|
416
|
-
case
|
451
|
+
goto _test_eof26;
|
452
|
+
case 26:
|
417
453
|
if ( (*p) > 90 ) {
|
418
454
|
if ( 97 <= (*p) && (*p) <= 122 )
|
419
|
-
goto
|
455
|
+
goto st26;
|
420
456
|
} else if ( (*p) >= 65 )
|
421
|
-
goto
|
422
|
-
goto
|
423
|
-
|
457
|
+
goto st26;
|
458
|
+
goto tr44;
|
459
|
+
st10:
|
424
460
|
if ( ++p == pe )
|
425
|
-
goto
|
426
|
-
case
|
427
|
-
goto
|
428
|
-
|
461
|
+
goto _test_eof10;
|
462
|
+
case 10:
|
463
|
+
goto st9;
|
464
|
+
st27:
|
429
465
|
if ( ++p == pe )
|
430
|
-
goto
|
431
|
-
case
|
466
|
+
goto _test_eof27;
|
467
|
+
case 27:
|
432
468
|
switch( (*p) ) {
|
433
|
-
case 33: goto
|
434
|
-
case 63: goto
|
435
|
-
case 95: goto
|
469
|
+
case 33: goto tr46;
|
470
|
+
case 63: goto tr46;
|
471
|
+
case 95: goto st27;
|
436
472
|
}
|
437
473
|
if ( (*p) < 65 ) {
|
438
474
|
if ( 48 <= (*p) && (*p) <= 57 )
|
439
|
-
goto
|
475
|
+
goto st27;
|
440
476
|
} else if ( (*p) > 90 ) {
|
441
477
|
if ( 97 <= (*p) && (*p) <= 122 )
|
442
|
-
goto
|
478
|
+
goto st27;
|
443
479
|
} else
|
444
|
-
goto
|
445
|
-
goto
|
446
|
-
|
480
|
+
goto st27;
|
481
|
+
goto tr45;
|
482
|
+
st11:
|
447
483
|
if ( ++p == pe )
|
448
|
-
goto
|
449
|
-
case
|
484
|
+
goto _test_eof11;
|
485
|
+
case 11:
|
450
486
|
if ( (*p) == 124 )
|
451
|
-
goto
|
487
|
+
goto tr7;
|
452
488
|
goto st0;
|
453
|
-
|
489
|
+
st28:
|
454
490
|
if ( ++p == pe )
|
455
|
-
goto
|
456
|
-
case
|
491
|
+
goto _test_eof28;
|
492
|
+
case 28:
|
457
493
|
if ( (*p) == 125 )
|
458
|
-
goto
|
459
|
-
goto
|
460
|
-
|
461
|
-
#line
|
494
|
+
goto tr47;
|
495
|
+
goto tr38;
|
496
|
+
tr18:
|
497
|
+
#line 87 "lib/hotcell/lexer.rl"
|
462
498
|
{{p = ((te))-1;}{ emit_comment; }}
|
463
|
-
goto
|
464
|
-
|
465
|
-
#line
|
499
|
+
goto st29;
|
500
|
+
tr19:
|
501
|
+
#line 86 "lib/hotcell/lexer.rl"
|
466
502
|
{te = p+1;{ emit_comment; {cs = stack[--top];goto _again;} }}
|
467
|
-
goto
|
468
|
-
|
469
|
-
#line
|
503
|
+
goto st29;
|
504
|
+
tr50:
|
505
|
+
#line 87 "lib/hotcell/lexer.rl"
|
470
506
|
{te = p;p--;{ emit_comment; }}
|
471
|
-
goto
|
472
|
-
|
507
|
+
goto st29;
|
508
|
+
st29:
|
473
509
|
#line 1 "NONE"
|
474
510
|
{ts = 0;}
|
475
511
|
if ( ++p == pe )
|
476
|
-
goto
|
477
|
-
case
|
512
|
+
goto _test_eof29;
|
513
|
+
case 29:
|
478
514
|
#line 1 "NONE"
|
479
515
|
{ts = p;}
|
480
|
-
#line
|
516
|
+
#line 517 "ext/lexerc/lexerc.c"
|
481
517
|
if ( (*p) == 35 )
|
482
|
-
goto
|
483
|
-
goto
|
484
|
-
|
518
|
+
goto tr49;
|
519
|
+
goto st30;
|
520
|
+
st30:
|
485
521
|
if ( ++p == pe )
|
486
|
-
goto
|
487
|
-
case
|
522
|
+
goto _test_eof30;
|
523
|
+
case 30:
|
488
524
|
if ( (*p) == 35 )
|
489
|
-
goto
|
490
|
-
goto
|
491
|
-
|
525
|
+
goto tr50;
|
526
|
+
goto st30;
|
527
|
+
tr49:
|
492
528
|
#line 1 "NONE"
|
493
529
|
{te = p+1;}
|
494
|
-
goto
|
495
|
-
|
530
|
+
goto st31;
|
531
|
+
st31:
|
496
532
|
if ( ++p == pe )
|
497
|
-
goto
|
498
|
-
case
|
499
|
-
#line
|
533
|
+
goto _test_eof31;
|
534
|
+
case 31:
|
535
|
+
#line 536 "ext/lexerc/lexerc.c"
|
500
536
|
if ( (*p) == 125 )
|
501
|
-
goto
|
502
|
-
goto
|
503
|
-
|
537
|
+
goto st12;
|
538
|
+
goto tr50;
|
539
|
+
st12:
|
504
540
|
if ( ++p == pe )
|
505
|
-
goto
|
506
|
-
case
|
541
|
+
goto _test_eof12;
|
542
|
+
case 12:
|
507
543
|
if ( (*p) == 125 )
|
508
|
-
goto
|
509
|
-
goto
|
544
|
+
goto tr19;
|
545
|
+
goto tr18;
|
510
546
|
}
|
511
|
-
_test_eof12: cs = 12; goto _test_eof;
|
512
547
|
_test_eof13: cs = 13; goto _test_eof;
|
513
548
|
_test_eof14: cs = 14; goto _test_eof;
|
514
549
|
_test_eof15: cs = 15; goto _test_eof;
|
515
550
|
_test_eof16: cs = 16; goto _test_eof;
|
516
|
-
_test_eof17: cs = 17; goto _test_eof;
|
517
551
|
_test_eof1: cs = 1; goto _test_eof;
|
518
|
-
|
552
|
+
_test_eof17: cs = 17; goto _test_eof;
|
519
553
|
_test_eof18: cs = 18; goto _test_eof;
|
554
|
+
_test_eof2: cs = 2; goto _test_eof;
|
520
555
|
_test_eof3: cs = 3; goto _test_eof;
|
556
|
+
_test_eof19: cs = 19; goto _test_eof;
|
521
557
|
_test_eof4: cs = 4; goto _test_eof;
|
522
558
|
_test_eof5: cs = 5; goto _test_eof;
|
523
559
|
_test_eof6: cs = 6; goto _test_eof;
|
524
|
-
_test_eof19: cs = 19; goto _test_eof;
|
525
|
-
_test_eof20: cs = 20; goto _test_eof;
|
526
560
|
_test_eof7: cs = 7; goto _test_eof;
|
561
|
+
_test_eof20: cs = 20; goto _test_eof;
|
527
562
|
_test_eof21: cs = 21; goto _test_eof;
|
528
|
-
_test_eof22: cs = 22; goto _test_eof;
|
529
563
|
_test_eof8: cs = 8; goto _test_eof;
|
564
|
+
_test_eof22: cs = 22; goto _test_eof;
|
530
565
|
_test_eof23: cs = 23; goto _test_eof;
|
531
|
-
_test_eof9: cs = 9; goto _test_eof;
|
532
566
|
_test_eof24: cs = 24; goto _test_eof;
|
533
|
-
_test_eof10: cs = 10; goto _test_eof;
|
534
567
|
_test_eof25: cs = 25; goto _test_eof;
|
568
|
+
_test_eof9: cs = 9; goto _test_eof;
|
535
569
|
_test_eof26: cs = 26; goto _test_eof;
|
570
|
+
_test_eof10: cs = 10; goto _test_eof;
|
536
571
|
_test_eof27: cs = 27; goto _test_eof;
|
537
|
-
_test_eof28: cs = 28; goto _test_eof;
|
538
572
|
_test_eof11: cs = 11; goto _test_eof;
|
573
|
+
_test_eof28: cs = 28; goto _test_eof;
|
574
|
+
_test_eof29: cs = 29; goto _test_eof;
|
575
|
+
_test_eof30: cs = 30; goto _test_eof;
|
576
|
+
_test_eof31: cs = 31; goto _test_eof;
|
577
|
+
_test_eof12: cs = 12; goto _test_eof;
|
539
578
|
|
540
579
|
_test_eof: {}
|
541
580
|
if ( p == eof )
|
542
581
|
{
|
543
582
|
switch ( cs ) {
|
544
|
-
case
|
545
|
-
case 14: goto tr20;
|
583
|
+
case 14: goto tr22;
|
546
584
|
case 15: goto tr22;
|
547
|
-
case
|
548
|
-
case
|
549
|
-
case
|
550
|
-
case 19: goto
|
551
|
-
case
|
552
|
-
case
|
553
|
-
case 21: goto
|
554
|
-
case 22: goto tr36;
|
585
|
+
case 16: goto tr24;
|
586
|
+
case 1: goto tr0;
|
587
|
+
case 18: goto tr38;
|
588
|
+
case 19: goto tr39;
|
589
|
+
case 4: goto tr5;
|
590
|
+
case 20: goto tr38;
|
591
|
+
case 21: goto tr12;
|
555
592
|
case 8: goto tr12;
|
556
|
-
case
|
557
|
-
case
|
558
|
-
case 24: goto
|
559
|
-
case 25: goto
|
560
|
-
case
|
561
|
-
case
|
562
|
-
case
|
563
|
-
case
|
564
|
-
|
593
|
+
case 22: goto tr42;
|
594
|
+
case 23: goto tr38;
|
595
|
+
case 24: goto tr38;
|
596
|
+
case 25: goto tr38;
|
597
|
+
case 9: goto tr14;
|
598
|
+
case 26: goto tr44;
|
599
|
+
case 10: goto tr14;
|
600
|
+
case 27: goto tr45;
|
601
|
+
case 28: goto tr38;
|
602
|
+
case 30: goto tr50;
|
603
|
+
case 31: goto tr50;
|
604
|
+
case 12: goto tr18;
|
605
|
+
case 6:
|
606
|
+
#line 46 "lib/hotcell/lexer.rl"
|
565
607
|
{ raise_unterminated_string; }
|
566
608
|
break;
|
567
|
-
case
|
568
|
-
#line
|
609
|
+
case 2:
|
610
|
+
#line 50 "lib/hotcell/lexer.rl"
|
569
611
|
{ raise_unterminated_string; }
|
570
612
|
break;
|
571
|
-
#line
|
613
|
+
#line 614 "ext/lexerc/lexerc.c"
|
572
614
|
}
|
573
615
|
}
|
574
616
|
|
575
617
|
_out: {}
|
576
618
|
}
|
577
619
|
|
578
|
-
#line
|
620
|
+
#line 47 "ext/lexerc/lexerc.rl"
|
579
621
|
|
580
622
|
free(stack);
|
581
623
|
|