hotcell 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/Rakefile +2 -2
- data/ext/lexerc/extconf.rb +1 -1
- data/ext/lexerc/lexerc.c +771 -348
- data/ext/lexerc/lexerc.h +4 -1
- data/ext/lexerc/lexerc.rl +35 -1
- data/lib/hotcell.rb +1 -1
- data/lib/hotcell/commands/for.rb +1 -1
- data/lib/hotcell/context.rb +4 -4
- data/lib/hotcell/extensions.rb +13 -13
- data/lib/hotcell/lexer.rb +21 -2
- data/lib/hotcell/lexer.rl +27 -8
- data/lib/hotcell/lexerr.rb +579 -262
- data/lib/hotcell/lexerr.rl +33 -1
- data/lib/hotcell/node/expression.rb +21 -19
- data/lib/hotcell/node/summoner.rb +1 -1
- data/lib/hotcell/parser.rb +562 -458
- data/lib/hotcell/parser.y +26 -12
- data/lib/hotcell/tong.rb +54 -0
- data/lib/hotcell/version.rb +1 -1
- data/spec/data/{sstrings → strings} +0 -0
- data/spec/lib/hotcell/commands/include_spec.rb +1 -1
- data/spec/lib/hotcell/context_spec.rb +9 -9
- data/spec/lib/hotcell/lexer_spec.rb +57 -18
- data/spec/lib/hotcell/parser_spec.rb +48 -0
- data/spec/lib/hotcell/template_spec.rb +2 -2
- data/spec/lib/hotcell/tong_spec.rb +83 -0
- metadata +8 -8
- data/lib/hotcell/manipulator.rb +0 -49
- data/spec/lib/hotcell/manipulator_spec.rb +0 -69
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 627e6358e79beed36bea1cabf8b3dd5876e8bb39
|
4
|
+
data.tar.gz: 7cb9469540c1d9af0826bf6420a32f66b90f8d83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad625dfa7fcd9096d5d971414a89b17a940d57fcb865ddd3fcb2d284cabf3c777c67f139ea6dd3520b21549fc172739f1f57454eb89e9eb5949b1a623cc57f2b
|
7
|
+
data.tar.gz: 1b4f73d262a17033e35b5619f247b3d14900a24d21d7a448d7457a4ba472058fd6238bbe7a4ca6de29e18816a0fefc035824fd2675b9e47179b8e261badfc79f
|
data/README.md
CHANGED
@@ -135,11 +135,12 @@ Hotcell has several basic types:
|
|
135
135
|
Last two have the same meaning, use whatever you like.
|
136
136
|
|
137
137
|
All the basic types are objects and support method calls on themselfs.
|
138
|
+
Hotcell supports ruby-like string interpolation: `{{ "hello, #{name}" }}`
|
138
139
|
|
139
140
|
### Variables
|
140
141
|
|
141
142
|
Variable is a value reference (`{{ name }}`). Variable name is better
|
142
|
-
to describe with regexp
|
143
|
+
to describe with regexp
|
143
144
|
|
144
145
|
```ruby
|
145
146
|
/\[_a-z\]\[_a-z0-9\]*[?!]?/i
|
@@ -169,6 +170,8 @@ Operators between values form an expression: `{{ forty_two = 6 * 7 }}` or
|
|
169
170
|
method arguments passing: `{{ hello(who, where) }}`
|
170
171
|
* `[]` is used for array or hash elements access (`{{ some_array[2] }}`
|
171
172
|
or `{{ [1, 2, 3][2] }}` or `{{ { foo: 'bar' }['foo'] }}`)
|
173
|
+
* `?:` - ternary conditional operator: `{{ cond ? branch1 : branch2 }}`.
|
174
|
+
Similar behavior as ruby's, right-associative.
|
172
175
|
|
173
176
|
Method call args are similar to ruby ones. You can call function like
|
174
177
|
this: `{{ foo(42, 'string', opt1: 3, opt2: /regexp/) }}`, and the last
|
data/Rakefile
CHANGED
@@ -28,8 +28,8 @@ namespace :project do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
task :dot do
|
31
|
-
`ragel -Vp lib/hotcell/lexerr.rl > lexerr.dot`
|
32
|
-
`ragel -Vp lib/hotcell/lexerc.rl > lexerc.dot`
|
31
|
+
`ragel -Vp -I lib/hotcell lib/hotcell/lexerr.rl > lexerr.dot`
|
32
|
+
`ragel -Vp -I lib/hotcell ext/lexerc/lexerc.rl > lexerc.dot`
|
33
33
|
end
|
34
34
|
|
35
35
|
desc 'Build parser'
|
data/ext/lexerc/extconf.rb
CHANGED
data/ext/lexerc/lexerc.c
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
#line 1 "ext/lexerc/lexerc.rl"
|
3
3
|
|
4
|
-
#line
|
4
|
+
#line 39 "ext/lexerc/lexerc.rl"
|
5
5
|
|
6
6
|
|
7
7
|
|
@@ -13,22 +13,26 @@ static VALUE cHotcellLexer;
|
|
13
13
|
|
14
14
|
|
15
15
|
#line 16 "ext/lexerc/lexerc.c"
|
16
|
-
static const int
|
17
|
-
static const int
|
18
|
-
static const int
|
16
|
+
static const int hotcell_lexer_start = 19;
|
17
|
+
static const int hotcell_lexer_first_final = 19;
|
18
|
+
static const int hotcell_lexer_error = 0;
|
19
19
|
|
20
|
-
static const int
|
21
|
-
static const int
|
22
|
-
static const int
|
20
|
+
static const int hotcell_lexer_en_dstring = 23;
|
21
|
+
static const int hotcell_lexer_en_interpolation = 26;
|
22
|
+
static const int hotcell_lexer_en_expression = 37;
|
23
|
+
static const int hotcell_lexer_en_template_comment = 50;
|
24
|
+
static const int hotcell_lexer_en_main = 19;
|
23
25
|
|
24
26
|
|
25
|
-
#line
|
27
|
+
#line 49 "ext/lexerc/lexerc.rl"
|
26
28
|
|
27
29
|
static char *p;
|
28
30
|
static char *ts;
|
29
31
|
static char *te;
|
30
32
|
static char *data;
|
31
33
|
static VALUE encoding;
|
34
|
+
static int braces_count;
|
35
|
+
static long dstring_start;
|
32
36
|
|
33
37
|
static VALUE tokenize(VALUE self) {
|
34
38
|
VALUE source = rb_iv_get(self, "@source");
|
@@ -47,18 +51,18 @@ static VALUE tokenize(VALUE self) {
|
|
47
51
|
char *eof = pe;
|
48
52
|
|
49
53
|
|
50
|
-
#line
|
54
|
+
#line 55 "ext/lexerc/lexerc.c"
|
51
55
|
{
|
52
|
-
cs =
|
56
|
+
cs = hotcell_lexer_start;
|
53
57
|
top = 0;
|
54
58
|
ts = 0;
|
55
59
|
te = 0;
|
56
60
|
act = 0;
|
57
61
|
}
|
58
62
|
|
59
|
-
#line
|
63
|
+
#line 75 "ext/lexerc/lexerc.rl"
|
60
64
|
|
61
|
-
#line
|
65
|
+
#line 66 "ext/lexerc/lexerc.c"
|
62
66
|
{
|
63
67
|
if ( p == pe )
|
64
68
|
goto _test_eof;
|
@@ -66,38 +70,59 @@ static VALUE tokenize(VALUE self) {
|
|
66
70
|
|
67
71
|
_again:
|
68
72
|
switch ( cs ) {
|
69
|
-
case 13: goto st13;
|
70
|
-
case 14: goto st14;
|
71
|
-
case 15: goto st15;
|
72
|
-
case 16: goto st16;
|
73
|
-
case 1: goto st1;
|
74
|
-
case 17: goto st17;
|
75
|
-
case 0: goto st0;
|
76
|
-
case 18: goto st18;
|
77
|
-
case 2: goto st2;
|
78
|
-
case 3: goto st3;
|
79
73
|
case 19: goto st19;
|
80
|
-
case 4: goto st4;
|
81
|
-
case 5: goto st5;
|
82
|
-
case 6: goto st6;
|
83
|
-
case 7: goto st7;
|
84
74
|
case 20: goto st20;
|
85
75
|
case 21: goto st21;
|
86
|
-
case 8: goto st8;
|
87
76
|
case 22: goto st22;
|
77
|
+
case 1: goto st1;
|
88
78
|
case 23: goto st23;
|
89
79
|
case 24: goto st24;
|
80
|
+
case 2: goto st2;
|
90
81
|
case 25: goto st25;
|
91
|
-
case 9: goto st9;
|
92
82
|
case 26: goto st26;
|
93
|
-
case
|
83
|
+
case 0: goto st0;
|
94
84
|
case 27: goto st27;
|
95
|
-
case 11: goto st11;
|
96
85
|
case 28: goto st28;
|
86
|
+
case 3: goto st3;
|
87
|
+
case 4: goto st4;
|
88
|
+
case 5: goto st5;
|
97
89
|
case 29: goto st29;
|
98
90
|
case 30: goto st30;
|
91
|
+
case 6: goto st6;
|
99
92
|
case 31: goto st31;
|
93
|
+
case 32: goto st32;
|
94
|
+
case 33: goto st33;
|
95
|
+
case 34: goto st34;
|
96
|
+
case 7: goto st7;
|
97
|
+
case 35: goto st35;
|
98
|
+
case 8: goto st8;
|
99
|
+
case 36: goto st36;
|
100
|
+
case 9: goto st9;
|
101
|
+
case 37: goto st37;
|
102
|
+
case 38: goto st38;
|
103
|
+
case 39: goto st39;
|
104
|
+
case 40: goto st40;
|
105
|
+
case 10: goto st10;
|
106
|
+
case 11: goto st11;
|
100
107
|
case 12: goto st12;
|
108
|
+
case 13: goto st13;
|
109
|
+
case 41: goto st41;
|
110
|
+
case 42: goto st42;
|
111
|
+
case 14: goto st14;
|
112
|
+
case 43: goto st43;
|
113
|
+
case 44: goto st44;
|
114
|
+
case 45: goto st45;
|
115
|
+
case 46: goto st46;
|
116
|
+
case 15: goto st15;
|
117
|
+
case 47: goto st47;
|
118
|
+
case 16: goto st16;
|
119
|
+
case 48: goto st48;
|
120
|
+
case 17: goto st17;
|
121
|
+
case 49: goto st49;
|
122
|
+
case 50: goto st50;
|
123
|
+
case 51: goto st51;
|
124
|
+
case 52: goto st52;
|
125
|
+
case 18: goto st18;
|
101
126
|
default: break;
|
102
127
|
}
|
103
128
|
|
@@ -107,69 +132,69 @@ _resume:
|
|
107
132
|
switch ( cs )
|
108
133
|
{
|
109
134
|
tr0:
|
110
|
-
#line
|
111
|
-
{{p = ((te))-1;}{ emit_tag; {stack[top++] =
|
112
|
-
goto
|
135
|
+
#line 110 "lib/hotcell/lexer.rl"
|
136
|
+
{{p = ((te))-1;}{ emit_tag; {stack[top++] = 19; goto st37;} }}
|
137
|
+
goto st19;
|
113
138
|
tr1:
|
114
|
-
#line
|
115
|
-
{te = p+1;{ emit_tag; {stack[top++] =
|
116
|
-
goto
|
117
|
-
|
118
|
-
#line
|
139
|
+
#line 110 "lib/hotcell/lexer.rl"
|
140
|
+
{te = p+1;{ emit_tag; {stack[top++] = 19; goto st37;} }}
|
141
|
+
goto st19;
|
142
|
+
tr31:
|
143
|
+
#line 112 "lib/hotcell/lexer.rl"
|
119
144
|
{te = p;p--;{ emit_template; }}
|
120
|
-
goto
|
121
|
-
|
122
|
-
#line
|
123
|
-
{te = p;p--;{ emit_tag; {stack[top++] =
|
124
|
-
goto
|
125
|
-
|
126
|
-
#line
|
127
|
-
{te = p+1;{ emit_comment; {stack[top++] =
|
128
|
-
goto
|
129
|
-
|
145
|
+
goto st19;
|
146
|
+
tr33:
|
147
|
+
#line 110 "lib/hotcell/lexer.rl"
|
148
|
+
{te = p;p--;{ emit_tag; {stack[top++] = 19; goto st37;} }}
|
149
|
+
goto st19;
|
150
|
+
tr34:
|
151
|
+
#line 111 "lib/hotcell/lexer.rl"
|
152
|
+
{te = p+1;{ emit_comment; {stack[top++] = 19; goto st50;} }}
|
153
|
+
goto st19;
|
154
|
+
st19:
|
130
155
|
#line 1 "NONE"
|
131
156
|
{ts = 0;}
|
132
157
|
if ( ++p == pe )
|
133
|
-
goto
|
134
|
-
case
|
158
|
+
goto _test_eof19;
|
159
|
+
case 19:
|
135
160
|
#line 1 "NONE"
|
136
161
|
{ts = p;}
|
137
|
-
#line
|
162
|
+
#line 163 "ext/lexerc/lexerc.c"
|
138
163
|
if ( (*p) == 123 )
|
139
|
-
goto
|
140
|
-
goto
|
141
|
-
|
164
|
+
goto st21;
|
165
|
+
goto st20;
|
166
|
+
st20:
|
142
167
|
if ( ++p == pe )
|
143
|
-
goto
|
144
|
-
case
|
168
|
+
goto _test_eof20;
|
169
|
+
case 20:
|
145
170
|
if ( (*p) == 123 )
|
146
|
-
goto
|
147
|
-
goto
|
148
|
-
|
171
|
+
goto tr31;
|
172
|
+
goto st20;
|
173
|
+
st21:
|
149
174
|
if ( ++p == pe )
|
150
|
-
goto
|
151
|
-
case
|
175
|
+
goto _test_eof21;
|
176
|
+
case 21:
|
152
177
|
if ( (*p) == 123 )
|
153
|
-
goto
|
154
|
-
goto
|
155
|
-
|
178
|
+
goto tr32;
|
179
|
+
goto tr31;
|
180
|
+
tr32:
|
156
181
|
#line 1 "NONE"
|
157
182
|
{te = p+1;}
|
158
|
-
goto
|
159
|
-
|
183
|
+
goto st22;
|
184
|
+
st22:
|
160
185
|
if ( ++p == pe )
|
161
|
-
goto
|
162
|
-
case
|
163
|
-
#line
|
186
|
+
goto _test_eof22;
|
187
|
+
case 22:
|
188
|
+
#line 189 "ext/lexerc/lexerc.c"
|
164
189
|
switch( (*p) ) {
|
165
190
|
case 33: goto tr1;
|
166
|
-
case 35: goto
|
191
|
+
case 35: goto tr34;
|
167
192
|
case 94: goto tr1;
|
168
193
|
case 101: goto st1;
|
169
194
|
case 114: goto st1;
|
170
195
|
case 126: goto tr1;
|
171
196
|
}
|
172
|
-
goto
|
197
|
+
goto tr33;
|
173
198
|
st1:
|
174
199
|
if ( ++p == pe )
|
175
200
|
goto _test_eof1;
|
@@ -177,447 +202,840 @@ case 1:
|
|
177
202
|
if ( (*p) == 32 )
|
178
203
|
goto tr1;
|
179
204
|
goto tr0;
|
205
|
+
tr2:
|
206
|
+
#line 1 "NONE"
|
207
|
+
{ switch( act ) {
|
208
|
+
case 0:
|
209
|
+
{{goto st0;}}
|
210
|
+
break;
|
211
|
+
case 3:
|
212
|
+
{{p = ((te))-1;} emit_dstring; }
|
213
|
+
break;
|
214
|
+
}
|
215
|
+
}
|
216
|
+
goto st23;
|
217
|
+
tr36:
|
218
|
+
#line 73 "lib/hotcell/lexer.rl"
|
219
|
+
{te = p+1;{ emit_dstring_close; {cs = stack[--top];goto _again;} }}
|
220
|
+
goto st23;
|
221
|
+
tr39:
|
222
|
+
#line 75 "lib/hotcell/lexer.rl"
|
223
|
+
{te = p;p--;{ emit_dstring; }}
|
224
|
+
goto st23;
|
225
|
+
tr40:
|
226
|
+
#line 11 "ext/lexerc/lexerc.rl"
|
227
|
+
{te = p+1;{
|
228
|
+
braces_count = 0;
|
229
|
+
emit_interpolation;
|
230
|
+
{stack[top++] = 23; goto st26;}
|
231
|
+
}}
|
232
|
+
goto st23;
|
233
|
+
st23:
|
234
|
+
#line 1 "NONE"
|
235
|
+
{ts = 0;}
|
236
|
+
#line 1 "NONE"
|
237
|
+
{act = 0;}
|
238
|
+
if ( ++p == pe )
|
239
|
+
goto _test_eof23;
|
240
|
+
case 23:
|
241
|
+
#line 1 "NONE"
|
242
|
+
{ts = p;}
|
243
|
+
#line 244 "ext/lexerc/lexerc.c"
|
244
|
+
switch( (*p) ) {
|
245
|
+
case 34: goto tr36;
|
246
|
+
case 35: goto st25;
|
247
|
+
case 92: goto st2;
|
248
|
+
}
|
249
|
+
goto tr3;
|
180
250
|
tr3:
|
181
|
-
#line
|
182
|
-
{te = p+1;
|
183
|
-
goto st17;
|
184
|
-
tr5:
|
185
|
-
#line 81 "lib/hotcell/lexer.rl"
|
186
|
-
{{p = ((te))-1;}{ emit_comment; }}
|
187
|
-
goto st17;
|
188
|
-
tr7:
|
251
|
+
#line 1 "NONE"
|
252
|
+
{te = p+1;}
|
189
253
|
#line 75 "lib/hotcell/lexer.rl"
|
254
|
+
{act = 3;}
|
255
|
+
goto st24;
|
256
|
+
st24:
|
257
|
+
if ( ++p == pe )
|
258
|
+
goto _test_eof24;
|
259
|
+
case 24:
|
260
|
+
#line 261 "ext/lexerc/lexerc.c"
|
261
|
+
if ( (*p) == 92 )
|
262
|
+
goto st2;
|
263
|
+
if ( 34 <= (*p) && (*p) <= 35 )
|
264
|
+
goto tr39;
|
265
|
+
goto tr3;
|
266
|
+
st2:
|
267
|
+
if ( ++p == pe )
|
268
|
+
goto _test_eof2;
|
269
|
+
case 2:
|
270
|
+
goto tr3;
|
271
|
+
st25:
|
272
|
+
if ( ++p == pe )
|
273
|
+
goto _test_eof25;
|
274
|
+
case 25:
|
275
|
+
if ( (*p) == 123 )
|
276
|
+
goto tr40;
|
277
|
+
goto tr39;
|
278
|
+
tr4:
|
279
|
+
#line 81 "lib/hotcell/lexer.rl"
|
190
280
|
{te = p+1;{ emit_operator; }}
|
191
|
-
goto
|
192
|
-
|
193
|
-
#line
|
194
|
-
{te = p+1;{
|
195
|
-
goto
|
196
|
-
|
281
|
+
goto st26;
|
282
|
+
tr7:
|
283
|
+
#line 87 "lib/hotcell/lexer.rl"
|
284
|
+
{te = p+1;{ emit_string; }}
|
285
|
+
goto st26;
|
286
|
+
tr9:
|
197
287
|
#line 1 "NONE"
|
198
288
|
{ switch( act ) {
|
199
|
-
case
|
289
|
+
case 4:
|
200
290
|
{{p = ((te))-1;} emit_operator; }
|
201
291
|
break;
|
202
|
-
case
|
292
|
+
case 8:
|
203
293
|
{{p = ((te))-1;} emit_numeric; }
|
204
294
|
break;
|
205
295
|
}
|
206
296
|
}
|
207
|
-
goto
|
208
|
-
|
209
|
-
#line
|
297
|
+
goto st26;
|
298
|
+
tr11:
|
299
|
+
#line 81 "lib/hotcell/lexer.rl"
|
210
300
|
{{p = ((te))-1;}{ emit_operator; }}
|
211
|
-
goto
|
212
|
-
|
213
|
-
#line
|
301
|
+
goto st26;
|
302
|
+
tr41:
|
303
|
+
#line 89 "lib/hotcell/lexer.rl"
|
214
304
|
{te = p+1;}
|
215
|
-
goto
|
216
|
-
|
217
|
-
#line
|
218
|
-
{te = p;
|
219
|
-
|
220
|
-
|
305
|
+
goto st26;
|
306
|
+
tr51:
|
307
|
+
#line 17 "ext/lexerc/lexerc.rl"
|
308
|
+
{te = p+1;{
|
309
|
+
emit_operator;
|
310
|
+
braces_count++;
|
311
|
+
}}
|
312
|
+
goto st26;
|
313
|
+
tr53:
|
314
|
+
#line 22 "ext/lexerc/lexerc.rl"
|
315
|
+
{te = p+1;{
|
316
|
+
if (braces_count < 1) {
|
317
|
+
emit_interpolation;
|
318
|
+
{cs = stack[--top];goto _again;}
|
319
|
+
} else {
|
320
|
+
emit_operator;
|
321
|
+
braces_count--;
|
322
|
+
}
|
323
|
+
}}
|
324
|
+
goto st26;
|
325
|
+
tr54:
|
221
326
|
#line 81 "lib/hotcell/lexer.rl"
|
222
|
-
{te = p;p--;{
|
223
|
-
goto
|
224
|
-
|
225
|
-
#line
|
327
|
+
{te = p;p--;{ emit_operator; }}
|
328
|
+
goto st26;
|
329
|
+
tr55:
|
330
|
+
#line 32 "ext/lexerc/lexerc.rl"
|
331
|
+
{te = p;p--;{
|
332
|
+
dstring_start = ts - data;
|
333
|
+
emit_dstring_open;
|
334
|
+
{stack[top++] = 26; goto st23;}
|
335
|
+
}}
|
336
|
+
goto st26;
|
337
|
+
tr57:
|
338
|
+
#line 85 "lib/hotcell/lexer.rl"
|
226
339
|
{te = p;p--;{ emit_numeric; }}
|
227
|
-
goto
|
228
|
-
|
229
|
-
#line
|
340
|
+
goto st26;
|
341
|
+
tr59:
|
342
|
+
#line 88 "lib/hotcell/lexer.rl"
|
230
343
|
{te = p;p--;{ emit_regexp; }}
|
231
|
-
goto
|
232
|
-
|
233
|
-
#line
|
344
|
+
goto st26;
|
345
|
+
tr60:
|
346
|
+
#line 86 "lib/hotcell/lexer.rl"
|
234
347
|
{te = p;p--;{ emit_identifer; }}
|
235
|
-
goto
|
236
|
-
|
237
|
-
#line
|
348
|
+
goto st26;
|
349
|
+
tr61:
|
350
|
+
#line 86 "lib/hotcell/lexer.rl"
|
238
351
|
{te = p+1;{ emit_identifer; }}
|
239
|
-
goto
|
240
|
-
|
241
|
-
#line 74 "lib/hotcell/lexer.rl"
|
242
|
-
{te = p+1;{ emit_tag; {cs = stack[--top];goto _again;} }}
|
243
|
-
goto st17;
|
244
|
-
st17:
|
352
|
+
goto st26;
|
353
|
+
st26:
|
245
354
|
#line 1 "NONE"
|
246
355
|
{ts = 0;}
|
247
356
|
if ( ++p == pe )
|
248
|
-
goto
|
249
|
-
case
|
357
|
+
goto _test_eof26;
|
358
|
+
case 26:
|
250
359
|
#line 1 "NONE"
|
251
360
|
{ts = p;}
|
252
|
-
#line
|
361
|
+
#line 362 "ext/lexerc/lexerc.c"
|
253
362
|
switch( (*p) ) {
|
254
|
-
case 10: goto
|
255
|
-
case 32: goto
|
256
|
-
case 33: goto
|
257
|
-
case 34: goto
|
258
|
-
case
|
259
|
-
case
|
260
|
-
case
|
261
|
-
case
|
262
|
-
case
|
263
|
-
case
|
264
|
-
case
|
265
|
-
case
|
266
|
-
case
|
267
|
-
case
|
268
|
-
case
|
269
|
-
case
|
270
|
-
case
|
271
|
-
case 125: goto st28;
|
363
|
+
case 10: goto tr4;
|
364
|
+
case 32: goto tr41;
|
365
|
+
case 33: goto st27;
|
366
|
+
case 34: goto st28;
|
367
|
+
case 38: goto st3;
|
368
|
+
case 39: goto st4;
|
369
|
+
case 42: goto st29;
|
370
|
+
case 45: goto tr46;
|
371
|
+
case 46: goto st32;
|
372
|
+
case 47: goto tr48;
|
373
|
+
case 63: goto tr4;
|
374
|
+
case 91: goto tr4;
|
375
|
+
case 93: goto tr4;
|
376
|
+
case 95: goto st36;
|
377
|
+
case 123: goto tr51;
|
378
|
+
case 124: goto st9;
|
379
|
+
case 125: goto tr53;
|
272
380
|
}
|
273
381
|
if ( (*p) < 58 ) {
|
274
382
|
if ( (*p) < 37 ) {
|
275
383
|
if ( 9 <= (*p) && (*p) <= 13 )
|
276
|
-
goto
|
384
|
+
goto tr41;
|
277
385
|
} else if ( (*p) > 44 ) {
|
278
386
|
if ( 48 <= (*p) && (*p) <= 57 )
|
279
|
-
goto
|
387
|
+
goto tr49;
|
280
388
|
} else
|
281
|
-
goto
|
389
|
+
goto tr4;
|
282
390
|
} else if ( (*p) > 59 ) {
|
283
391
|
if ( (*p) < 65 ) {
|
284
392
|
if ( 60 <= (*p) && (*p) <= 62 )
|
285
|
-
goto
|
393
|
+
goto st27;
|
286
394
|
} else if ( (*p) > 90 ) {
|
287
395
|
if ( 97 <= (*p) && (*p) <= 122 )
|
288
|
-
goto
|
396
|
+
goto st36;
|
289
397
|
} else
|
290
|
-
goto
|
398
|
+
goto st36;
|
291
399
|
} else
|
292
|
-
goto
|
400
|
+
goto tr4;
|
293
401
|
goto st0;
|
294
402
|
st0:
|
295
403
|
cs = 0;
|
296
404
|
goto _out;
|
297
|
-
|
405
|
+
st27:
|
298
406
|
if ( ++p == pe )
|
299
|
-
goto
|
300
|
-
case
|
407
|
+
goto _test_eof27;
|
408
|
+
case 27:
|
301
409
|
if ( (*p) == 61 )
|
302
|
-
goto
|
303
|
-
goto
|
304
|
-
|
410
|
+
goto tr4;
|
411
|
+
goto tr54;
|
412
|
+
st28:
|
305
413
|
if ( ++p == pe )
|
306
|
-
goto
|
307
|
-
case
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
}
|
312
|
-
goto st2;
|
414
|
+
goto _test_eof28;
|
415
|
+
case 28:
|
416
|
+
if ( (*p) == 34 )
|
417
|
+
goto tr7;
|
418
|
+
goto tr55;
|
313
419
|
st3:
|
314
420
|
if ( ++p == pe )
|
315
421
|
goto _test_eof3;
|
316
422
|
case 3:
|
317
|
-
|
318
|
-
|
319
|
-
|
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;
|
423
|
+
if ( (*p) == 38 )
|
424
|
+
goto tr4;
|
425
|
+
goto st0;
|
332
426
|
st4:
|
333
427
|
if ( ++p == pe )
|
334
428
|
goto _test_eof4;
|
335
429
|
case 4:
|
336
|
-
|
337
|
-
goto
|
338
|
-
|
430
|
+
switch( (*p) ) {
|
431
|
+
case 39: goto tr7;
|
432
|
+
case 92: goto st5;
|
433
|
+
}
|
434
|
+
goto st4;
|
339
435
|
st5:
|
340
436
|
if ( ++p == pe )
|
341
437
|
goto _test_eof5;
|
342
438
|
case 5:
|
343
|
-
|
344
|
-
|
345
|
-
|
439
|
+
goto st4;
|
440
|
+
st29:
|
441
|
+
if ( ++p == pe )
|
442
|
+
goto _test_eof29;
|
443
|
+
case 29:
|
444
|
+
if ( (*p) == 42 )
|
445
|
+
goto tr4;
|
446
|
+
goto tr54;
|
447
|
+
tr46:
|
448
|
+
#line 1 "NONE"
|
449
|
+
{te = p+1;}
|
450
|
+
#line 81 "lib/hotcell/lexer.rl"
|
451
|
+
{act = 4;}
|
452
|
+
goto st30;
|
453
|
+
tr49:
|
454
|
+
#line 1 "NONE"
|
455
|
+
{te = p+1;}
|
456
|
+
#line 85 "lib/hotcell/lexer.rl"
|
457
|
+
{act = 8;}
|
458
|
+
goto st30;
|
459
|
+
st30:
|
460
|
+
if ( ++p == pe )
|
461
|
+
goto _test_eof30;
|
462
|
+
case 30:
|
463
|
+
#line 464 "ext/lexerc/lexerc.c"
|
464
|
+
if ( (*p) == 46 )
|
465
|
+
goto st6;
|
466
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
467
|
+
goto tr49;
|
468
|
+
goto tr9;
|
346
469
|
st6:
|
347
470
|
if ( ++p == pe )
|
348
471
|
goto _test_eof6;
|
349
472
|
case 6:
|
473
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
474
|
+
goto st31;
|
475
|
+
goto tr9;
|
476
|
+
st31:
|
477
|
+
if ( ++p == pe )
|
478
|
+
goto _test_eof31;
|
479
|
+
case 31:
|
480
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
481
|
+
goto st31;
|
482
|
+
goto tr57;
|
483
|
+
st32:
|
484
|
+
if ( ++p == pe )
|
485
|
+
goto _test_eof32;
|
486
|
+
case 32:
|
487
|
+
if ( (*p) == 46 )
|
488
|
+
goto st33;
|
489
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
490
|
+
goto st31;
|
491
|
+
goto tr54;
|
492
|
+
st33:
|
493
|
+
if ( ++p == pe )
|
494
|
+
goto _test_eof33;
|
495
|
+
case 33:
|
496
|
+
if ( (*p) == 46 )
|
497
|
+
goto tr4;
|
498
|
+
goto tr54;
|
499
|
+
tr48:
|
500
|
+
#line 1 "NONE"
|
501
|
+
{te = p+1;}
|
502
|
+
#line 4 "ext/lexerc/lexerc.rl"
|
503
|
+
{
|
504
|
+
if (regexp_possible == Qfalse) {
|
505
|
+
emit_operator;
|
506
|
+
{goto st37;}
|
507
|
+
}
|
508
|
+
}
|
509
|
+
goto st34;
|
510
|
+
st34:
|
511
|
+
if ( ++p == pe )
|
512
|
+
goto _test_eof34;
|
513
|
+
case 34:
|
514
|
+
#line 515 "ext/lexerc/lexerc.c"
|
350
515
|
switch( (*p) ) {
|
351
|
-
case
|
352
|
-
case 92: goto
|
516
|
+
case 47: goto st35;
|
517
|
+
case 92: goto st8;
|
353
518
|
}
|
354
|
-
goto
|
519
|
+
goto st7;
|
355
520
|
st7:
|
356
521
|
if ( ++p == pe )
|
357
522
|
goto _test_eof7;
|
358
523
|
case 7:
|
359
|
-
|
360
|
-
|
524
|
+
switch( (*p) ) {
|
525
|
+
case 47: goto st35;
|
526
|
+
case 92: goto st8;
|
527
|
+
}
|
528
|
+
goto st7;
|
529
|
+
st35:
|
361
530
|
if ( ++p == pe )
|
362
|
-
goto
|
363
|
-
case
|
531
|
+
goto _test_eof35;
|
532
|
+
case 35:
|
533
|
+
if ( (*p) > 90 ) {
|
534
|
+
if ( 97 <= (*p) && (*p) <= 122 )
|
535
|
+
goto st35;
|
536
|
+
} else if ( (*p) >= 65 )
|
537
|
+
goto st35;
|
538
|
+
goto tr59;
|
539
|
+
st8:
|
540
|
+
if ( ++p == pe )
|
541
|
+
goto _test_eof8;
|
542
|
+
case 8:
|
543
|
+
goto st7;
|
544
|
+
st36:
|
545
|
+
if ( ++p == pe )
|
546
|
+
goto _test_eof36;
|
547
|
+
case 36:
|
548
|
+
switch( (*p) ) {
|
549
|
+
case 33: goto tr61;
|
550
|
+
case 63: goto tr61;
|
551
|
+
case 95: goto st36;
|
552
|
+
}
|
553
|
+
if ( (*p) < 65 ) {
|
554
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
555
|
+
goto st36;
|
556
|
+
} else if ( (*p) > 90 ) {
|
557
|
+
if ( 97 <= (*p) && (*p) <= 122 )
|
558
|
+
goto st36;
|
559
|
+
} else
|
560
|
+
goto st36;
|
561
|
+
goto tr60;
|
562
|
+
st9:
|
563
|
+
if ( ++p == pe )
|
564
|
+
goto _test_eof9;
|
565
|
+
case 9:
|
566
|
+
if ( (*p) == 124 )
|
567
|
+
goto tr4;
|
568
|
+
goto st0;
|
569
|
+
tr15:
|
570
|
+
#line 100 "lib/hotcell/lexer.rl"
|
571
|
+
{{p = ((te))-1;}{ emit_comment; }}
|
572
|
+
goto st37;
|
573
|
+
tr17:
|
574
|
+
#line 95 "lib/hotcell/lexer.rl"
|
575
|
+
{te = p+1;{ emit_operator; }}
|
576
|
+
goto st37;
|
577
|
+
tr19:
|
578
|
+
#line 98 "lib/hotcell/lexer.rl"
|
579
|
+
{te = p+1;{ emit_string; }}
|
580
|
+
goto st37;
|
581
|
+
tr21:
|
582
|
+
#line 1 "NONE"
|
583
|
+
{ switch( act ) {
|
584
|
+
case 15:
|
585
|
+
{{p = ((te))-1;} emit_operator; }
|
586
|
+
break;
|
587
|
+
case 16:
|
588
|
+
{{p = ((te))-1;} emit_numeric; }
|
589
|
+
break;
|
590
|
+
}
|
591
|
+
}
|
592
|
+
goto st37;
|
593
|
+
tr23:
|
594
|
+
#line 95 "lib/hotcell/lexer.rl"
|
595
|
+
{{p = ((te))-1;}{ emit_operator; }}
|
596
|
+
goto st37;
|
597
|
+
tr62:
|
598
|
+
#line 101 "lib/hotcell/lexer.rl"
|
599
|
+
{te = p+1;}
|
600
|
+
goto st37;
|
601
|
+
tr74:
|
602
|
+
#line 95 "lib/hotcell/lexer.rl"
|
603
|
+
{te = p;p--;{ emit_operator; }}
|
604
|
+
goto st37;
|
605
|
+
tr75:
|
606
|
+
#line 32 "ext/lexerc/lexerc.rl"
|
607
|
+
{te = p;p--;{
|
608
|
+
dstring_start = ts - data;
|
609
|
+
emit_dstring_open;
|
610
|
+
{stack[top++] = 37; goto st23;}
|
611
|
+
}}
|
612
|
+
goto st37;
|
613
|
+
tr76:
|
614
|
+
#line 100 "lib/hotcell/lexer.rl"
|
615
|
+
{te = p;p--;{ emit_comment; }}
|
616
|
+
goto st37;
|
617
|
+
tr79:
|
618
|
+
#line 96 "lib/hotcell/lexer.rl"
|
619
|
+
{te = p;p--;{ emit_numeric; }}
|
620
|
+
goto st37;
|
621
|
+
tr81:
|
622
|
+
#line 99 "lib/hotcell/lexer.rl"
|
623
|
+
{te = p;p--;{ emit_regexp; }}
|
624
|
+
goto st37;
|
625
|
+
tr82:
|
626
|
+
#line 97 "lib/hotcell/lexer.rl"
|
627
|
+
{te = p;p--;{ emit_identifer; }}
|
628
|
+
goto st37;
|
629
|
+
tr83:
|
630
|
+
#line 97 "lib/hotcell/lexer.rl"
|
631
|
+
{te = p+1;{ emit_identifer; }}
|
632
|
+
goto st37;
|
633
|
+
tr84:
|
634
|
+
#line 93 "lib/hotcell/lexer.rl"
|
635
|
+
{te = p+1;{ emit_tag; {cs = stack[--top];goto _again;} }}
|
636
|
+
goto st37;
|
637
|
+
st37:
|
638
|
+
#line 1 "NONE"
|
639
|
+
{ts = 0;}
|
640
|
+
if ( ++p == pe )
|
641
|
+
goto _test_eof37;
|
642
|
+
case 37:
|
643
|
+
#line 1 "NONE"
|
644
|
+
{ts = p;}
|
645
|
+
#line 646 "ext/lexerc/lexerc.c"
|
646
|
+
switch( (*p) ) {
|
647
|
+
case 10: goto tr17;
|
648
|
+
case 32: goto tr62;
|
649
|
+
case 33: goto st38;
|
650
|
+
case 34: goto st39;
|
651
|
+
case 35: goto tr16;
|
652
|
+
case 38: goto st11;
|
653
|
+
case 39: goto st12;
|
654
|
+
case 42: goto st41;
|
655
|
+
case 45: goto tr67;
|
656
|
+
case 46: goto st44;
|
657
|
+
case 47: goto tr69;
|
658
|
+
case 63: goto tr17;
|
659
|
+
case 91: goto tr17;
|
660
|
+
case 93: goto tr17;
|
661
|
+
case 95: goto st48;
|
662
|
+
case 123: goto tr17;
|
663
|
+
case 124: goto st17;
|
664
|
+
case 125: goto st49;
|
665
|
+
}
|
666
|
+
if ( (*p) < 58 ) {
|
667
|
+
if ( (*p) < 37 ) {
|
668
|
+
if ( 9 <= (*p) && (*p) <= 13 )
|
669
|
+
goto tr62;
|
670
|
+
} else if ( (*p) > 44 ) {
|
671
|
+
if ( 48 <= (*p) && (*p) <= 57 )
|
672
|
+
goto tr70;
|
673
|
+
} else
|
674
|
+
goto tr17;
|
675
|
+
} else if ( (*p) > 59 ) {
|
676
|
+
if ( (*p) < 65 ) {
|
677
|
+
if ( 60 <= (*p) && (*p) <= 62 )
|
678
|
+
goto st38;
|
679
|
+
} else if ( (*p) > 90 ) {
|
680
|
+
if ( 97 <= (*p) && (*p) <= 122 )
|
681
|
+
goto st48;
|
682
|
+
} else
|
683
|
+
goto st48;
|
684
|
+
} else
|
685
|
+
goto tr17;
|
686
|
+
goto st0;
|
687
|
+
st38:
|
688
|
+
if ( ++p == pe )
|
689
|
+
goto _test_eof38;
|
690
|
+
case 38:
|
691
|
+
if ( (*p) == 61 )
|
692
|
+
goto tr17;
|
693
|
+
goto tr74;
|
694
|
+
st39:
|
695
|
+
if ( ++p == pe )
|
696
|
+
goto _test_eof39;
|
697
|
+
case 39:
|
698
|
+
if ( (*p) == 34 )
|
699
|
+
goto tr19;
|
700
|
+
goto tr75;
|
701
|
+
tr16:
|
702
|
+
#line 1 "NONE"
|
703
|
+
{te = p+1;}
|
704
|
+
goto st40;
|
705
|
+
st40:
|
706
|
+
if ( ++p == pe )
|
707
|
+
goto _test_eof40;
|
708
|
+
case 40:
|
709
|
+
#line 710 "ext/lexerc/lexerc.c"
|
710
|
+
switch( (*p) ) {
|
711
|
+
case 10: goto tr76;
|
712
|
+
case 125: goto st10;
|
713
|
+
}
|
714
|
+
goto tr16;
|
715
|
+
st10:
|
716
|
+
if ( ++p == pe )
|
717
|
+
goto _test_eof10;
|
718
|
+
case 10:
|
719
|
+
if ( (*p) == 125 )
|
720
|
+
goto tr15;
|
721
|
+
goto tr16;
|
722
|
+
st11:
|
723
|
+
if ( ++p == pe )
|
724
|
+
goto _test_eof11;
|
725
|
+
case 11:
|
726
|
+
if ( (*p) == 38 )
|
727
|
+
goto tr17;
|
728
|
+
goto st0;
|
729
|
+
st12:
|
730
|
+
if ( ++p == pe )
|
731
|
+
goto _test_eof12;
|
732
|
+
case 12:
|
733
|
+
switch( (*p) ) {
|
734
|
+
case 39: goto tr19;
|
735
|
+
case 92: goto st13;
|
736
|
+
}
|
737
|
+
goto st12;
|
738
|
+
st13:
|
739
|
+
if ( ++p == pe )
|
740
|
+
goto _test_eof13;
|
741
|
+
case 13:
|
742
|
+
goto st12;
|
743
|
+
st41:
|
744
|
+
if ( ++p == pe )
|
745
|
+
goto _test_eof41;
|
746
|
+
case 41:
|
364
747
|
if ( (*p) == 42 )
|
365
|
-
goto
|
366
|
-
goto
|
367
|
-
|
748
|
+
goto tr17;
|
749
|
+
goto tr74;
|
750
|
+
tr67:
|
368
751
|
#line 1 "NONE"
|
369
752
|
{te = p+1;}
|
370
|
-
#line
|
371
|
-
{act =
|
372
|
-
goto
|
373
|
-
|
753
|
+
#line 95 "lib/hotcell/lexer.rl"
|
754
|
+
{act = 15;}
|
755
|
+
goto st42;
|
756
|
+
tr70:
|
374
757
|
#line 1 "NONE"
|
375
758
|
{te = p+1;}
|
376
|
-
#line
|
377
|
-
{act =
|
378
|
-
goto
|
379
|
-
|
759
|
+
#line 96 "lib/hotcell/lexer.rl"
|
760
|
+
{act = 16;}
|
761
|
+
goto st42;
|
762
|
+
st42:
|
380
763
|
if ( ++p == pe )
|
381
|
-
goto
|
382
|
-
case
|
383
|
-
#line
|
764
|
+
goto _test_eof42;
|
765
|
+
case 42:
|
766
|
+
#line 767 "ext/lexerc/lexerc.c"
|
384
767
|
if ( (*p) == 46 )
|
385
|
-
goto
|
768
|
+
goto st14;
|
386
769
|
if ( 48 <= (*p) && (*p) <= 57 )
|
387
|
-
goto
|
388
|
-
goto
|
389
|
-
|
770
|
+
goto tr70;
|
771
|
+
goto tr21;
|
772
|
+
st14:
|
390
773
|
if ( ++p == pe )
|
391
|
-
goto
|
392
|
-
case
|
774
|
+
goto _test_eof14;
|
775
|
+
case 14:
|
393
776
|
if ( 48 <= (*p) && (*p) <= 57 )
|
394
|
-
goto
|
395
|
-
goto
|
396
|
-
|
777
|
+
goto st43;
|
778
|
+
goto tr21;
|
779
|
+
st43:
|
397
780
|
if ( ++p == pe )
|
398
|
-
goto
|
399
|
-
case
|
781
|
+
goto _test_eof43;
|
782
|
+
case 43:
|
400
783
|
if ( 48 <= (*p) && (*p) <= 57 )
|
401
|
-
goto
|
402
|
-
goto
|
403
|
-
|
784
|
+
goto st43;
|
785
|
+
goto tr79;
|
786
|
+
st44:
|
404
787
|
if ( ++p == pe )
|
405
|
-
goto
|
406
|
-
case
|
788
|
+
goto _test_eof44;
|
789
|
+
case 44:
|
407
790
|
if ( (*p) == 46 )
|
408
|
-
goto
|
791
|
+
goto st45;
|
409
792
|
if ( 48 <= (*p) && (*p) <= 57 )
|
410
|
-
goto
|
411
|
-
goto
|
412
|
-
|
793
|
+
goto st43;
|
794
|
+
goto tr74;
|
795
|
+
st45:
|
413
796
|
if ( ++p == pe )
|
414
|
-
goto
|
415
|
-
case
|
797
|
+
goto _test_eof45;
|
798
|
+
case 45:
|
416
799
|
if ( (*p) == 46 )
|
417
|
-
goto
|
418
|
-
goto
|
419
|
-
|
800
|
+
goto tr17;
|
801
|
+
goto tr74;
|
802
|
+
tr69:
|
420
803
|
#line 1 "NONE"
|
421
804
|
{te = p+1;}
|
422
805
|
#line 4 "ext/lexerc/lexerc.rl"
|
423
806
|
{
|
424
807
|
if (regexp_possible == Qfalse) {
|
425
808
|
emit_operator;
|
426
|
-
{goto
|
809
|
+
{goto st37;}
|
427
810
|
}
|
428
811
|
}
|
429
|
-
goto
|
430
|
-
|
812
|
+
goto st46;
|
813
|
+
st46:
|
431
814
|
if ( ++p == pe )
|
432
|
-
goto
|
433
|
-
case
|
434
|
-
#line
|
815
|
+
goto _test_eof46;
|
816
|
+
case 46:
|
817
|
+
#line 818 "ext/lexerc/lexerc.c"
|
435
818
|
switch( (*p) ) {
|
436
|
-
case 47: goto
|
437
|
-
case 92: goto
|
819
|
+
case 47: goto st47;
|
820
|
+
case 92: goto st16;
|
438
821
|
}
|
439
|
-
goto
|
440
|
-
|
822
|
+
goto st15;
|
823
|
+
st15:
|
441
824
|
if ( ++p == pe )
|
442
|
-
goto
|
443
|
-
case
|
825
|
+
goto _test_eof15;
|
826
|
+
case 15:
|
444
827
|
switch( (*p) ) {
|
445
|
-
case 47: goto
|
446
|
-
case 92: goto
|
828
|
+
case 47: goto st47;
|
829
|
+
case 92: goto st16;
|
447
830
|
}
|
448
|
-
goto
|
449
|
-
|
831
|
+
goto st15;
|
832
|
+
st47:
|
450
833
|
if ( ++p == pe )
|
451
|
-
goto
|
452
|
-
case
|
834
|
+
goto _test_eof47;
|
835
|
+
case 47:
|
453
836
|
if ( (*p) > 90 ) {
|
454
837
|
if ( 97 <= (*p) && (*p) <= 122 )
|
455
|
-
goto
|
838
|
+
goto st47;
|
456
839
|
} else if ( (*p) >= 65 )
|
457
|
-
goto
|
458
|
-
goto
|
459
|
-
|
840
|
+
goto st47;
|
841
|
+
goto tr81;
|
842
|
+
st16:
|
460
843
|
if ( ++p == pe )
|
461
|
-
goto
|
462
|
-
case
|
463
|
-
goto
|
464
|
-
|
844
|
+
goto _test_eof16;
|
845
|
+
case 16:
|
846
|
+
goto st15;
|
847
|
+
st48:
|
465
848
|
if ( ++p == pe )
|
466
|
-
goto
|
467
|
-
case
|
849
|
+
goto _test_eof48;
|
850
|
+
case 48:
|
468
851
|
switch( (*p) ) {
|
469
|
-
case 33: goto
|
470
|
-
case 63: goto
|
471
|
-
case 95: goto
|
852
|
+
case 33: goto tr83;
|
853
|
+
case 63: goto tr83;
|
854
|
+
case 95: goto st48;
|
472
855
|
}
|
473
856
|
if ( (*p) < 65 ) {
|
474
857
|
if ( 48 <= (*p) && (*p) <= 57 )
|
475
|
-
goto
|
858
|
+
goto st48;
|
476
859
|
} else if ( (*p) > 90 ) {
|
477
860
|
if ( 97 <= (*p) && (*p) <= 122 )
|
478
|
-
goto
|
861
|
+
goto st48;
|
479
862
|
} else
|
480
|
-
goto
|
481
|
-
goto
|
482
|
-
|
863
|
+
goto st48;
|
864
|
+
goto tr82;
|
865
|
+
st17:
|
483
866
|
if ( ++p == pe )
|
484
|
-
goto
|
485
|
-
case
|
867
|
+
goto _test_eof17;
|
868
|
+
case 17:
|
486
869
|
if ( (*p) == 124 )
|
487
|
-
goto
|
870
|
+
goto tr17;
|
488
871
|
goto st0;
|
489
|
-
|
872
|
+
st49:
|
490
873
|
if ( ++p == pe )
|
491
|
-
goto
|
492
|
-
case
|
874
|
+
goto _test_eof49;
|
875
|
+
case 49:
|
493
876
|
if ( (*p) == 125 )
|
494
|
-
goto
|
495
|
-
goto
|
496
|
-
|
497
|
-
#line
|
877
|
+
goto tr84;
|
878
|
+
goto tr74;
|
879
|
+
tr27:
|
880
|
+
#line 106 "lib/hotcell/lexer.rl"
|
498
881
|
{{p = ((te))-1;}{ emit_comment; }}
|
499
|
-
goto
|
500
|
-
|
501
|
-
#line
|
882
|
+
goto st50;
|
883
|
+
tr28:
|
884
|
+
#line 105 "lib/hotcell/lexer.rl"
|
502
885
|
{te = p+1;{ emit_comment; {cs = stack[--top];goto _again;} }}
|
503
|
-
goto
|
504
|
-
|
505
|
-
#line
|
886
|
+
goto st50;
|
887
|
+
tr87:
|
888
|
+
#line 106 "lib/hotcell/lexer.rl"
|
506
889
|
{te = p;p--;{ emit_comment; }}
|
507
|
-
goto
|
508
|
-
|
890
|
+
goto st50;
|
891
|
+
st50:
|
509
892
|
#line 1 "NONE"
|
510
893
|
{ts = 0;}
|
511
894
|
if ( ++p == pe )
|
512
|
-
goto
|
513
|
-
case
|
895
|
+
goto _test_eof50;
|
896
|
+
case 50:
|
514
897
|
#line 1 "NONE"
|
515
898
|
{ts = p;}
|
516
|
-
#line
|
899
|
+
#line 900 "ext/lexerc/lexerc.c"
|
517
900
|
if ( (*p) == 35 )
|
518
|
-
goto
|
519
|
-
goto
|
520
|
-
|
901
|
+
goto tr86;
|
902
|
+
goto st51;
|
903
|
+
st51:
|
521
904
|
if ( ++p == pe )
|
522
|
-
goto
|
523
|
-
case
|
905
|
+
goto _test_eof51;
|
906
|
+
case 51:
|
524
907
|
if ( (*p) == 35 )
|
525
|
-
goto
|
526
|
-
goto
|
527
|
-
|
908
|
+
goto tr87;
|
909
|
+
goto st51;
|
910
|
+
tr86:
|
528
911
|
#line 1 "NONE"
|
529
912
|
{te = p+1;}
|
530
|
-
goto
|
531
|
-
|
913
|
+
goto st52;
|
914
|
+
st52:
|
532
915
|
if ( ++p == pe )
|
533
|
-
goto
|
534
|
-
case
|
535
|
-
#line
|
916
|
+
goto _test_eof52;
|
917
|
+
case 52:
|
918
|
+
#line 919 "ext/lexerc/lexerc.c"
|
536
919
|
if ( (*p) == 125 )
|
537
|
-
goto
|
538
|
-
goto
|
539
|
-
|
920
|
+
goto st18;
|
921
|
+
goto tr87;
|
922
|
+
st18:
|
540
923
|
if ( ++p == pe )
|
541
|
-
goto
|
542
|
-
case
|
924
|
+
goto _test_eof18;
|
925
|
+
case 18:
|
543
926
|
if ( (*p) == 125 )
|
544
|
-
goto
|
545
|
-
goto
|
927
|
+
goto tr28;
|
928
|
+
goto tr27;
|
546
929
|
}
|
547
|
-
_test_eof13: cs = 13; goto _test_eof;
|
548
|
-
_test_eof14: cs = 14; goto _test_eof;
|
549
|
-
_test_eof15: cs = 15; goto _test_eof;
|
550
|
-
_test_eof16: cs = 16; goto _test_eof;
|
551
|
-
_test_eof1: cs = 1; goto _test_eof;
|
552
|
-
_test_eof17: cs = 17; goto _test_eof;
|
553
|
-
_test_eof18: cs = 18; goto _test_eof;
|
554
|
-
_test_eof2: cs = 2; goto _test_eof;
|
555
|
-
_test_eof3: cs = 3; goto _test_eof;
|
556
930
|
_test_eof19: cs = 19; goto _test_eof;
|
557
|
-
_test_eof4: cs = 4; goto _test_eof;
|
558
|
-
_test_eof5: cs = 5; goto _test_eof;
|
559
|
-
_test_eof6: cs = 6; goto _test_eof;
|
560
|
-
_test_eof7: cs = 7; goto _test_eof;
|
561
931
|
_test_eof20: cs = 20; goto _test_eof;
|
562
932
|
_test_eof21: cs = 21; goto _test_eof;
|
563
|
-
_test_eof8: cs = 8; goto _test_eof;
|
564
933
|
_test_eof22: cs = 22; goto _test_eof;
|
934
|
+
_test_eof1: cs = 1; goto _test_eof;
|
565
935
|
_test_eof23: cs = 23; goto _test_eof;
|
566
936
|
_test_eof24: cs = 24; goto _test_eof;
|
937
|
+
_test_eof2: cs = 2; goto _test_eof;
|
567
938
|
_test_eof25: cs = 25; goto _test_eof;
|
568
|
-
_test_eof9: cs = 9; goto _test_eof;
|
569
939
|
_test_eof26: cs = 26; goto _test_eof;
|
570
|
-
_test_eof10: cs = 10; goto _test_eof;
|
571
940
|
_test_eof27: cs = 27; goto _test_eof;
|
572
|
-
_test_eof11: cs = 11; goto _test_eof;
|
573
941
|
_test_eof28: cs = 28; goto _test_eof;
|
942
|
+
_test_eof3: cs = 3; goto _test_eof;
|
943
|
+
_test_eof4: cs = 4; goto _test_eof;
|
944
|
+
_test_eof5: cs = 5; goto _test_eof;
|
574
945
|
_test_eof29: cs = 29; goto _test_eof;
|
575
946
|
_test_eof30: cs = 30; goto _test_eof;
|
947
|
+
_test_eof6: cs = 6; goto _test_eof;
|
576
948
|
_test_eof31: cs = 31; goto _test_eof;
|
949
|
+
_test_eof32: cs = 32; goto _test_eof;
|
950
|
+
_test_eof33: cs = 33; goto _test_eof;
|
951
|
+
_test_eof34: cs = 34; goto _test_eof;
|
952
|
+
_test_eof7: cs = 7; goto _test_eof;
|
953
|
+
_test_eof35: cs = 35; goto _test_eof;
|
954
|
+
_test_eof8: cs = 8; goto _test_eof;
|
955
|
+
_test_eof36: cs = 36; goto _test_eof;
|
956
|
+
_test_eof9: cs = 9; goto _test_eof;
|
957
|
+
_test_eof37: cs = 37; goto _test_eof;
|
958
|
+
_test_eof38: cs = 38; goto _test_eof;
|
959
|
+
_test_eof39: cs = 39; goto _test_eof;
|
960
|
+
_test_eof40: cs = 40; goto _test_eof;
|
961
|
+
_test_eof10: cs = 10; goto _test_eof;
|
962
|
+
_test_eof11: cs = 11; goto _test_eof;
|
577
963
|
_test_eof12: cs = 12; goto _test_eof;
|
964
|
+
_test_eof13: cs = 13; goto _test_eof;
|
965
|
+
_test_eof41: cs = 41; goto _test_eof;
|
966
|
+
_test_eof42: cs = 42; goto _test_eof;
|
967
|
+
_test_eof14: cs = 14; goto _test_eof;
|
968
|
+
_test_eof43: cs = 43; goto _test_eof;
|
969
|
+
_test_eof44: cs = 44; goto _test_eof;
|
970
|
+
_test_eof45: cs = 45; goto _test_eof;
|
971
|
+
_test_eof46: cs = 46; goto _test_eof;
|
972
|
+
_test_eof15: cs = 15; goto _test_eof;
|
973
|
+
_test_eof47: cs = 47; goto _test_eof;
|
974
|
+
_test_eof16: cs = 16; goto _test_eof;
|
975
|
+
_test_eof48: cs = 48; goto _test_eof;
|
976
|
+
_test_eof17: cs = 17; goto _test_eof;
|
977
|
+
_test_eof49: cs = 49; goto _test_eof;
|
978
|
+
_test_eof50: cs = 50; goto _test_eof;
|
979
|
+
_test_eof51: cs = 51; goto _test_eof;
|
980
|
+
_test_eof52: cs = 52; goto _test_eof;
|
981
|
+
_test_eof18: cs = 18; goto _test_eof;
|
578
982
|
|
579
983
|
_test_eof: {}
|
580
984
|
if ( p == eof )
|
581
985
|
{
|
582
986
|
switch ( cs ) {
|
583
|
-
case
|
584
|
-
case
|
585
|
-
case
|
987
|
+
case 20: goto tr31;
|
988
|
+
case 21: goto tr31;
|
989
|
+
case 22: goto tr33;
|
586
990
|
case 1: goto tr0;
|
587
|
-
case
|
588
|
-
case
|
589
|
-
case
|
590
|
-
case
|
591
|
-
case
|
592
|
-
case
|
593
|
-
case
|
594
|
-
case
|
595
|
-
case
|
596
|
-
case
|
597
|
-
case
|
598
|
-
case
|
599
|
-
case
|
600
|
-
case
|
601
|
-
case
|
602
|
-
case
|
603
|
-
case
|
604
|
-
case
|
605
|
-
case
|
991
|
+
case 24: goto tr39;
|
992
|
+
case 2: goto tr2;
|
993
|
+
case 25: goto tr39;
|
994
|
+
case 27: goto tr54;
|
995
|
+
case 28: goto tr55;
|
996
|
+
case 29: goto tr54;
|
997
|
+
case 30: goto tr9;
|
998
|
+
case 6: goto tr9;
|
999
|
+
case 31: goto tr57;
|
1000
|
+
case 32: goto tr54;
|
1001
|
+
case 33: goto tr54;
|
1002
|
+
case 34: goto tr54;
|
1003
|
+
case 7: goto tr11;
|
1004
|
+
case 35: goto tr59;
|
1005
|
+
case 8: goto tr11;
|
1006
|
+
case 36: goto tr60;
|
1007
|
+
case 38: goto tr74;
|
1008
|
+
case 39: goto tr75;
|
1009
|
+
case 40: goto tr76;
|
1010
|
+
case 10: goto tr15;
|
1011
|
+
case 41: goto tr74;
|
1012
|
+
case 42: goto tr21;
|
1013
|
+
case 14: goto tr21;
|
1014
|
+
case 43: goto tr79;
|
1015
|
+
case 44: goto tr74;
|
1016
|
+
case 45: goto tr74;
|
1017
|
+
case 46: goto tr74;
|
1018
|
+
case 15: goto tr23;
|
1019
|
+
case 47: goto tr81;
|
1020
|
+
case 16: goto tr23;
|
1021
|
+
case 48: goto tr82;
|
1022
|
+
case 49: goto tr74;
|
1023
|
+
case 51: goto tr87;
|
1024
|
+
case 52: goto tr87;
|
1025
|
+
case 18: goto tr27;
|
1026
|
+
case 4:
|
1027
|
+
case 12:
|
606
1028
|
#line 46 "lib/hotcell/lexer.rl"
|
607
1029
|
{ raise_unterminated_string; }
|
608
1030
|
break;
|
609
|
-
|
610
|
-
#line 50 "lib/hotcell/lexer.rl"
|
611
|
-
{ raise_unterminated_string; }
|
612
|
-
break;
|
613
|
-
#line 614 "ext/lexerc/lexerc.c"
|
1031
|
+
#line 1032 "ext/lexerc/lexerc.c"
|
614
1032
|
}
|
615
1033
|
}
|
616
1034
|
|
617
1035
|
_out: {}
|
618
1036
|
}
|
619
1037
|
|
620
|
-
#line
|
1038
|
+
#line 76 "ext/lexerc/lexerc.rl"
|
621
1039
|
|
622
1040
|
free(stack);
|
623
1041
|
|
@@ -625,6 +1043,11 @@ case 12:
|
|
625
1043
|
raise_unexpected_symbol;
|
626
1044
|
}
|
627
1045
|
|
1046
|
+
if (cs == hotcell_lexer_en_dstring) {
|
1047
|
+
ts = data + dstring_start;
|
1048
|
+
raise_unterminated_string;
|
1049
|
+
}
|
1050
|
+
|
628
1051
|
return rb_iv_get(self, "@token_array");
|
629
1052
|
}
|
630
1053
|
|