eleanor 1.0.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.
@@ -0,0 +1,1255 @@
1
+ # line 1 "src/ragel/parser.rl"
2
+ # Copyright (c) 2008 chiisaitsu <chiisaitsu@gmail.com>
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ # of this software and associated documentation files (the "Software"), to deal
6
+ # in the Software without restriction, including without limitation the rights
7
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ # copies of the Software, and to permit persons to whom the Software is
9
+ # furnished to do so, subject to the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be included in
12
+ # all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ # THE SOFTWARE.
21
+ #
22
+ # ---
23
+ #
24
+ # This is Eleanor's parser. Its job is to define the private Screenplay#parse_!
25
+ # method, which takes the name of a plain text screenplay file.
26
+ #
27
+ # This implementation uses Ragel[http://research.cs.queensu.ca/~thurston/ragel/],
28
+ # a state machine compiler. Run it through Ragel with:
29
+ #
30
+ # ragel -R -o lib/eleanor/parser.rb src/ragel/parser.rl
31
+
32
+ =begin
33
+ # This is commented out so rdoc doesn't barf. Ragel doesn't mind.
34
+
35
+
36
+ # line 37 "lib/eleanor/parser.rb"
37
+ class << self
38
+ attr_accessor :_parser_actions
39
+ private :_parser_actions, :_parser_actions=
40
+ end
41
+ self._parser_actions = [
42
+ 0, 1, 0, 1, 1, 1, 2, 1,
43
+ 4, 1, 5, 1, 6, 1, 7, 1,
44
+ 12, 1, 13, 1, 14, 1, 15, 1,
45
+ 20, 1, 21, 1, 22, 1, 23, 2,
46
+ 0, 8, 2, 0, 16, 2, 1, 9,
47
+ 2, 1, 17, 2, 3, 7, 2, 6,
48
+ 18, 2, 7, 19, 2, 14, 0, 2,
49
+ 14, 10, 2, 15, 1, 2, 15, 11,
50
+ 2, 20, 18, 2, 21, 19, 3, 0,
51
+ 16, 8, 3, 1, 17, 9, 3, 3,
52
+ 7, 19, 3, 5, 13, 7, 3, 14,
53
+ 0, 10, 3, 14, 0, 16, 3, 15,
54
+ 1, 11, 3, 15, 1, 17, 4, 1,
55
+ 17, 7, 19, 4, 5, 13, 7, 19,
56
+ 4, 14, 0, 16, 10, 4, 15, 1,
57
+ 17, 11, 4, 21, 19, 15, 11, 5,
58
+ 1, 17, 7, 19, 9, 5, 15, 5,
59
+ 13, 7, 11, 6, 15, 1, 17, 7,
60
+ 19, 11
61
+ ]
62
+
63
+ class << self
64
+ attr_accessor :_parser_key_offsets
65
+ private :_parser_key_offsets, :_parser_key_offsets=
66
+ end
67
+ self._parser_key_offsets = [
68
+ 0, 0, 4, 8, 11, 15, 19, 27,
69
+ 35, 39, 43, 50, 54, 58, 63, 64,
70
+ 66, 69, 76, 78, 83, 84, 85, 86,
71
+ 87, 95, 102, 106, 110, 111, 112, 116,
72
+ 117, 122, 123, 128, 133, 138, 143, 148,
73
+ 152, 156, 161, 166, 167, 172, 176, 180,
74
+ 188, 198, 204, 208, 209, 210, 219, 229,
75
+ 238, 244, 248, 249, 250, 251, 252, 253,
76
+ 254, 259, 264, 269, 274, 279, 284, 289,
77
+ 294, 299, 304, 309, 314, 319, 324, 333,
78
+ 339, 343, 344, 345, 355, 365, 375, 385,
79
+ 395, 405, 414, 418, 422, 423, 424, 430,
80
+ 434, 435, 436, 446, 456, 466, 476, 486,
81
+ 496, 506, 516, 526, 536, 546, 556, 566,
82
+ 576, 577, 578, 587, 594, 600, 604, 611,
83
+ 612, 613, 614, 615, 623, 627, 631, 637,
84
+ 645, 646, 655, 656, 663, 669, 673, 679,
85
+ 680, 681, 682, 690, 698, 708, 716
86
+ ]
87
+
88
+ class << self
89
+ attr_accessor :_parser_trans_keys
90
+ private :_parser_trans_keys, :_parser_trans_keys=
91
+ end
92
+ self._parser_trans_keys = [
93
+ 10, 13, 11, 12, 9, 10, 13, 32,
94
+ 32, 9, 13, 10, 13, 11, 12, 9,
95
+ 10, 13, 32, 9, 10, 13, 32, 11,
96
+ 12, 65, 90, 9, 10, 13, 32, 11,
97
+ 12, 65, 90, 10, 13, 11, 12, 9,
98
+ 10, 13, 32, 9, 10, 13, 32, 40,
99
+ 11, 12, 10, 13, 11, 12, 9, 10,
100
+ 13, 32, 9, 10, 13, 32, 40, 10,
101
+ 10, 13, 41, 10, 13, 9, 10, 13,
102
+ 32, 41, 11, 12, 9, 32, 9, 32,
103
+ 40, 10, 13, 10, 10, 10, 10, 9,
104
+ 10, 13, 32, 11, 12, 65, 90, 9,
105
+ 10, 13, 32, 40, 11, 12, 10, 13,
106
+ 11, 12, 9, 10, 13, 32, 10, 10,
107
+ 9, 10, 13, 32, 10, 10, 13, 79,
108
+ 11, 12, 10, 10, 13, 78, 11, 12,
109
+ 10, 13, 84, 11, 12, 10, 13, 65,
110
+ 11, 12, 10, 13, 71, 11, 12, 10,
111
+ 13, 69, 11, 12, 10, 13, 11, 12,
112
+ 9, 10, 13, 32, 32, 9, 13, 65,
113
+ 90, 10, 13, 41, 11, 12, 10, 10,
114
+ 13, 32, 11, 12, 10, 13, 11, 12,
115
+ 9, 10, 13, 32, 9, 10, 13, 32,
116
+ 11, 12, 65, 90, 9, 10, 13, 41,
117
+ 11, 12, 32, 96, 123, 126, 9, 10,
118
+ 13, 32, 11, 12, 9, 10, 13, 32,
119
+ 10, 10, 9, 10, 13, 11, 12, 32,
120
+ 96, 123, 126, 9, 10, 13, 32, 11,
121
+ 12, 33, 96, 123, 126, 9, 10, 13,
122
+ 11, 12, 32, 96, 123, 126, 9, 10,
123
+ 13, 32, 11, 12, 9, 10, 13, 32,
124
+ 10, 10, 10, 10, 10, 10, 10, 13,
125
+ 69, 11, 12, 10, 13, 82, 11, 12,
126
+ 10, 13, 73, 11, 12, 10, 13, 69,
127
+ 11, 12, 10, 13, 83, 11, 12, 10,
128
+ 13, 32, 11, 12, 10, 13, 79, 11,
129
+ 12, 10, 13, 70, 11, 12, 10, 13,
130
+ 32, 11, 12, 10, 13, 83, 11, 12,
131
+ 10, 13, 72, 11, 12, 10, 13, 79,
132
+ 11, 12, 10, 13, 84, 11, 12, 10,
133
+ 13, 83, 11, 12, 9, 10, 13, 11,
134
+ 12, 32, 96, 123, 126, 9, 10, 13,
135
+ 32, 11, 12, 9, 10, 13, 32, 10,
136
+ 10, 9, 10, 13, 79, 11, 12, 32,
137
+ 96, 123, 126, 9, 10, 13, 78, 11,
138
+ 12, 32, 96, 123, 126, 9, 10, 13,
139
+ 84, 11, 12, 32, 96, 123, 126, 9,
140
+ 10, 13, 65, 11, 12, 32, 96, 123,
141
+ 126, 9, 10, 13, 71, 11, 12, 32,
142
+ 96, 123, 126, 9, 10, 13, 69, 11,
143
+ 12, 32, 96, 123, 126, 9, 10, 13,
144
+ 11, 12, 32, 96, 123, 126, 10, 13,
145
+ 11, 12, 9, 10, 13, 32, 10, 10,
146
+ 9, 10, 13, 32, 11, 12, 9, 10,
147
+ 13, 32, 10, 10, 9, 10, 13, 69,
148
+ 11, 12, 32, 96, 123, 126, 9, 10,
149
+ 13, 82, 11, 12, 32, 96, 123, 126,
150
+ 9, 10, 13, 73, 11, 12, 32, 96,
151
+ 123, 126, 9, 10, 13, 69, 11, 12,
152
+ 32, 96, 123, 126, 9, 10, 13, 83,
153
+ 11, 12, 32, 96, 123, 126, 9, 10,
154
+ 13, 32, 11, 12, 33, 96, 123, 126,
155
+ 9, 10, 13, 79, 11, 12, 32, 96,
156
+ 123, 126, 9, 10, 13, 70, 11, 12,
157
+ 32, 96, 123, 126, 9, 10, 13, 32,
158
+ 11, 12, 33, 96, 123, 126, 9, 10,
159
+ 13, 83, 11, 12, 32, 96, 123, 126,
160
+ 9, 10, 13, 72, 11, 12, 32, 96,
161
+ 123, 126, 9, 10, 13, 79, 11, 12,
162
+ 32, 96, 123, 126, 9, 10, 13, 84,
163
+ 11, 12, 32, 96, 123, 126, 9, 10,
164
+ 13, 83, 11, 12, 32, 96, 123, 126,
165
+ 10, 10, 10, 13, 32, 46, 58, 11,
166
+ 12, 65, 90, 10, 13, 32, 11, 12,
167
+ 65, 90, 9, 10, 13, 32, 11, 12,
168
+ 9, 10, 13, 32, 9, 10, 13, 32,
169
+ 40, 11, 12, 10, 10, 10, 10, 9,
170
+ 10, 13, 32, 11, 12, 65, 90, 10,
171
+ 13, 11, 12, 9, 10, 13, 32, 9,
172
+ 10, 13, 32, 11, 12, 9, 10, 13,
173
+ 32, 11, 12, 65, 90, 10, 10, 13,
174
+ 32, 46, 58, 11, 12, 65, 90, 10,
175
+ 10, 13, 32, 11, 12, 65, 90, 9,
176
+ 10, 13, 32, 11, 12, 9, 10, 13,
177
+ 32, 9, 10, 13, 32, 11, 12, 10,
178
+ 10, 10, 9, 10, 13, 32, 77, 83,
179
+ 11, 12, 9, 10, 13, 32, 77, 83,
180
+ 11, 12, 9, 10, 13, 32, 77, 83,
181
+ 11, 12, 65, 90, 9, 10, 13, 32,
182
+ 77, 83, 11, 12, 9, 10, 13, 32,
183
+ 77, 83, 11, 12, 0
184
+ ]
185
+
186
+ class << self
187
+ attr_accessor :_parser_single_lengths
188
+ private :_parser_single_lengths, :_parser_single_lengths=
189
+ end
190
+ self._parser_single_lengths = [
191
+ 0, 2, 4, 1, 2, 4, 4, 4,
192
+ 2, 4, 5, 2, 4, 5, 1, 0,
193
+ 1, 5, 2, 3, 1, 1, 1, 1,
194
+ 4, 5, 2, 4, 1, 1, 4, 1,
195
+ 3, 1, 3, 3, 3, 3, 3, 2,
196
+ 4, 1, 3, 1, 3, 2, 4, 4,
197
+ 4, 4, 4, 1, 1, 3, 4, 3,
198
+ 4, 4, 1, 1, 1, 1, 1, 1,
199
+ 3, 3, 3, 3, 3, 3, 3, 3,
200
+ 3, 3, 3, 3, 3, 3, 3, 4,
201
+ 4, 1, 1, 4, 4, 4, 4, 4,
202
+ 4, 3, 2, 4, 1, 1, 4, 4,
203
+ 1, 1, 4, 4, 4, 4, 4, 4,
204
+ 4, 4, 4, 4, 4, 4, 4, 4,
205
+ 1, 1, 5, 3, 4, 4, 5, 1,
206
+ 1, 1, 1, 4, 2, 4, 4, 4,
207
+ 1, 5, 1, 3, 4, 4, 4, 1,
208
+ 1, 1, 6, 6, 6, 6, 6
209
+ ]
210
+
211
+ class << self
212
+ attr_accessor :_parser_range_lengths
213
+ private :_parser_range_lengths, :_parser_range_lengths=
214
+ end
215
+ self._parser_range_lengths = [
216
+ 0, 1, 0, 1, 1, 0, 2, 2,
217
+ 1, 0, 1, 1, 0, 0, 0, 1,
218
+ 1, 1, 0, 1, 0, 0, 0, 0,
219
+ 2, 1, 1, 0, 0, 0, 0, 0,
220
+ 1, 0, 1, 1, 1, 1, 1, 1,
221
+ 0, 2, 1, 0, 1, 1, 0, 2,
222
+ 3, 1, 0, 0, 0, 3, 3, 3,
223
+ 1, 0, 0, 0, 0, 0, 0, 0,
224
+ 1, 1, 1, 1, 1, 1, 1, 1,
225
+ 1, 1, 1, 1, 1, 1, 3, 1,
226
+ 0, 0, 0, 3, 3, 3, 3, 3,
227
+ 3, 3, 1, 0, 0, 0, 1, 0,
228
+ 0, 0, 3, 3, 3, 3, 3, 3,
229
+ 3, 3, 3, 3, 3, 3, 3, 3,
230
+ 0, 0, 2, 2, 1, 0, 1, 0,
231
+ 0, 0, 0, 2, 1, 0, 1, 2,
232
+ 0, 2, 0, 2, 1, 0, 1, 0,
233
+ 0, 0, 1, 1, 2, 1, 1
234
+ ]
235
+
236
+ class << self
237
+ attr_accessor :_parser_index_offsets
238
+ private :_parser_index_offsets, :_parser_index_offsets=
239
+ end
240
+ self._parser_index_offsets = [
241
+ 0, 0, 4, 9, 12, 16, 21, 28,
242
+ 35, 39, 44, 51, 55, 60, 66, 68,
243
+ 70, 73, 80, 83, 88, 90, 92, 94,
244
+ 96, 103, 110, 114, 119, 121, 123, 128,
245
+ 130, 135, 137, 142, 147, 152, 157, 162,
246
+ 166, 171, 175, 180, 182, 187, 191, 196,
247
+ 203, 211, 217, 222, 224, 226, 233, 241,
248
+ 248, 254, 259, 261, 263, 265, 267, 269,
249
+ 271, 276, 281, 286, 291, 296, 301, 306,
250
+ 311, 316, 321, 326, 331, 336, 341, 348,
251
+ 354, 359, 361, 363, 371, 379, 387, 395,
252
+ 403, 411, 418, 422, 427, 429, 431, 437,
253
+ 442, 444, 446, 454, 462, 470, 478, 486,
254
+ 494, 502, 510, 518, 526, 534, 542, 550,
255
+ 558, 560, 562, 570, 576, 582, 587, 594,
256
+ 596, 598, 600, 602, 609, 613, 618, 624,
257
+ 631, 633, 641, 643, 649, 655, 660, 666,
258
+ 668, 670, 672, 680, 688, 697, 705
259
+ ]
260
+
261
+ class << self
262
+ attr_accessor :_parser_indicies
263
+ private :_parser_indicies, :_parser_indicies=
264
+ end
265
+ self._parser_indicies = [
266
+ 1, 3, 2, 0, 1, 4, 5, 1,
267
+ 2, 7, 7, 6, 8, 9, 7, 6,
268
+ 8, 10, 11, 8, 7, 12, 13, 15,
269
+ 12, 14, 16, 6, 18, 13, 15, 18,
270
+ 19, 20, 17, 21, 23, 22, 17, 25,
271
+ 26, 27, 25, 24, 25, 26, 27, 25,
272
+ 29, 24, 28, 30, 32, 31, 28, 34,
273
+ 35, 36, 34, 33, 34, 35, 36, 34,
274
+ 29, 33, 35, 37, 33, 38, 39, 33,
275
+ 38, 39, 40, 41, 39, 39, 33, 38,
276
+ 42, 42, 31, 42, 42, 31, 31, 28,
277
+ 40, 33, 30, 31, 26, 43, 21, 22,
278
+ 18, 44, 46, 18, 45, 20, 17, 47,
279
+ 48, 49, 47, 29, 24, 28, 51, 53,
280
+ 52, 50, 51, 54, 55, 51, 52, 54,
281
+ 52, 51, 52, 56, 13, 15, 56, 37,
282
+ 13, 37, 1, 3, 58, 57, 0, 1,
283
+ 2, 1, 3, 59, 57, 0, 1, 3,
284
+ 60, 57, 0, 1, 3, 61, 57, 0,
285
+ 1, 3, 62, 57, 0, 1, 3, 63,
286
+ 57, 0, 64, 65, 57, 63, 64, 66,
287
+ 67, 64, 57, 68, 68, 69, 6, 8,
288
+ 9, 70, 68, 6, 8, 7, 8, 9,
289
+ 71, 68, 6, 72, 73, 68, 71, 72,
290
+ 74, 75, 72, 68, 12, 13, 15, 12,
291
+ 76, 77, 6, 78, 79, 81, 82, 80,
292
+ 16, 16, 6, 78, 79, 81, 78, 83,
293
+ 6, 79, 84, 85, 79, 83, 84, 83,
294
+ 79, 83, 78, 79, 81, 83, 16, 16,
295
+ 6, 78, 79, 81, 86, 80, 16, 16,
296
+ 6, 87, 88, 89, 80, 86, 86, 71,
297
+ 87, 88, 89, 87, 80, 71, 88, 90,
298
+ 91, 88, 80, 90, 80, 88, 80, 74,
299
+ 68, 72, 68, 66, 57, 64, 57, 1,
300
+ 3, 92, 57, 0, 1, 3, 93, 57,
301
+ 0, 1, 3, 94, 57, 0, 1, 3,
302
+ 95, 57, 0, 1, 3, 96, 57, 0,
303
+ 1, 3, 97, 57, 0, 1, 3, 98,
304
+ 57, 0, 1, 3, 99, 57, 0, 1,
305
+ 3, 100, 57, 0, 1, 3, 101, 57,
306
+ 0, 1, 3, 102, 57, 0, 1, 3,
307
+ 103, 57, 0, 1, 3, 104, 57, 0,
308
+ 1, 3, 63, 57, 0, 105, 106, 108,
309
+ 107, 109, 109, 50, 105, 106, 108, 105,
310
+ 107, 50, 106, 110, 111, 106, 107, 110,
311
+ 107, 106, 107, 105, 106, 108, 113, 112,
312
+ 109, 109, 50, 105, 106, 108, 114, 112,
313
+ 109, 109, 50, 105, 106, 108, 115, 112,
314
+ 109, 109, 50, 105, 106, 108, 116, 112,
315
+ 109, 109, 50, 105, 106, 108, 117, 112,
316
+ 109, 109, 50, 105, 106, 108, 118, 112,
317
+ 109, 109, 50, 120, 121, 122, 112, 118,
318
+ 118, 119, 123, 125, 124, 119, 123, 126,
319
+ 127, 123, 124, 126, 124, 123, 124, 120,
320
+ 121, 122, 120, 112, 119, 121, 128, 129,
321
+ 121, 112, 128, 112, 121, 112, 105, 106,
322
+ 108, 130, 112, 109, 109, 50, 105, 106,
323
+ 108, 131, 112, 109, 109, 50, 105, 106,
324
+ 108, 132, 112, 109, 109, 50, 105, 106,
325
+ 108, 133, 112, 109, 109, 50, 105, 106,
326
+ 108, 134, 112, 109, 109, 50, 105, 106,
327
+ 108, 135, 112, 109, 109, 50, 105, 106,
328
+ 108, 136, 112, 109, 109, 50, 105, 106,
329
+ 108, 137, 112, 109, 109, 50, 105, 106,
330
+ 108, 138, 112, 109, 109, 50, 105, 106,
331
+ 108, 139, 112, 109, 109, 50, 105, 106,
332
+ 108, 140, 112, 109, 109, 50, 105, 106,
333
+ 108, 141, 112, 109, 109, 50, 105, 106,
334
+ 108, 142, 112, 109, 109, 50, 105, 106,
335
+ 108, 118, 112, 109, 109, 50, 48, 43,
336
+ 44, 22, 21, 23, 143, 144, 144, 45,
337
+ 20, 17, 21, 23, 143, 45, 20, 17,
338
+ 144, 145, 146, 144, 45, 17, 148, 149,
339
+ 150, 148, 147, 148, 149, 150, 148, 29,
340
+ 147, 28, 149, 19, 145, 45, 10, 7,
341
+ 4, 2, 152, 153, 155, 152, 154, 156,
342
+ 151, 157, 159, 158, 151, 160, 161, 162,
343
+ 160, 158, 160, 161, 162, 160, 158, 151,
344
+ 163, 161, 162, 163, 154, 156, 151, 161,
345
+ 158, 157, 159, 164, 165, 165, 154, 156,
346
+ 151, 157, 158, 157, 159, 164, 154, 156,
347
+ 151, 165, 166, 167, 165, 154, 151, 168,
348
+ 169, 170, 168, 154, 168, 169, 170, 168,
349
+ 154, 151, 169, 154, 166, 154, 153, 37,
350
+ 152, 153, 155, 152, 172, 173, 171, 0,
351
+ 47, 48, 49, 47, 172, 173, 174, 0,
352
+ 12, 13, 15, 12, 176, 177, 175, 109,
353
+ 50, 56, 13, 15, 56, 172, 173, 57,
354
+ 0, 163, 161, 162, 163, 172, 173, 171,
355
+ 0, 0
356
+ ]
357
+
358
+ class << self
359
+ attr_accessor :_parser_trans_targs_wi
360
+ private :_parser_trans_targs_wi, :_parser_trans_targs_wi=
361
+ end
362
+ self._parser_trans_targs_wi = [
363
+ 1, 2, 0, 33, 3, 122, 4, 0,
364
+ 5, 43, 6, 121, 7, 141, 0, 31,
365
+ 53, 8, 24, 0, 114, 9, 0, 23,
366
+ 0, 10, 6, 22, 11, 15, 12, 0,
367
+ 21, 0, 13, 6, 14, 0, 16, 17,
368
+ 18, 20, 19, 0, 139, 0, 113, 25,
369
+ 140, 112, 26, 27, 0, 29, 6, 28,
370
+ 30, 0, 34, 35, 36, 37, 38, 39,
371
+ 40, 63, 41, 62, 0, 42, 44, 45,
372
+ 46, 61, 47, 60, 0, 48, 49, 50,
373
+ 0, 52, 54, 0, 6, 51, 55, 56,
374
+ 57, 59, 47, 58, 65, 66, 67, 68,
375
+ 69, 70, 71, 72, 73, 74, 75, 76,
376
+ 77, 79, 80, 0, 82, 78, 6, 81,
377
+ 0, 84, 85, 86, 87, 88, 89, 90,
378
+ 94, 95, 97, 91, 0, 93, 47, 92,
379
+ 47, 96, 99, 100, 101, 102, 103, 104,
380
+ 105, 106, 107, 108, 109, 110, 111, 115,
381
+ 116, 117, 120, 0, 118, 6, 119, 124,
382
+ 123, 138, 0, 137, 129, 125, 0, 130,
383
+ 126, 142, 128, 127, 131, 132, 133, 136,
384
+ 134, 142, 135, 0, 32, 64, 0, 0,
385
+ 83, 98
386
+ ]
387
+
388
+ class << self
389
+ attr_accessor :_parser_trans_actions_wi
390
+ private :_parser_trans_actions_wi, :_parser_trans_actions_wi=
391
+ end
392
+ self._parser_trans_actions_wi = [
393
+ 0, 0, 21, 0, 19, 0, 0, 3,
394
+ 0, 0, 1, 0, 27, 0, 102, 0,
395
+ 0, 0, 0, 49, 0, 5, 43, 0,
396
+ 82, 0, 11, 0, 0, 0, 7, 9,
397
+ 0, 17, 0, 29, 0, 0, 0, 0,
398
+ 15, 0, 0, 13, 5, 78, 0, 0,
399
+ 11, 0, 0, 0, 58, 0, 52, 0,
400
+ 0, 61, 0, 0, 0, 0, 0, 0,
401
+ 0, 0, 55, 0, 37, 0, 0, 0,
402
+ 0, 0, 31, 0, 127, 0, 0, 0,
403
+ 74, 0, 0, 40, 34, 0, 0, 0,
404
+ 0, 0, 70, 0, 0, 0, 0, 0,
405
+ 0, 0, 0, 0, 0, 0, 0, 0,
406
+ 0, 0, 0, 98, 0, 0, 90, 0,
407
+ 117, 0, 0, 0, 0, 0, 0, 0,
408
+ 0, 0, 0, 0, 94, 0, 86, 0,
409
+ 112, 0, 0, 0, 0, 0, 0, 0,
410
+ 0, 0, 0, 0, 0, 0, 0, 0,
411
+ 0, 5, 0, 107, 0, 46, 0, 0,
412
+ 0, 0, 67, 0, 0, 0, 25, 0,
413
+ 0, 23, 0, 0, 0, 0, 0, 0,
414
+ 0, 64, 0, 122, 0, 0, 133, 139,
415
+ 0, 0
416
+ ]
417
+
418
+ class << self
419
+ attr_accessor :_parser_eof_actions
420
+ private :_parser_eof_actions, :_parser_eof_actions=
421
+ end
422
+ self._parser_eof_actions = [
423
+ 0, 21, 21, 3, 3, 3, 102, 49,
424
+ 43, 82, 82, 9, 17, 17, 0, 17,
425
+ 17, 17, 9, 9, 17, 9, 13, 43,
426
+ 78, 82, 58, 58, 58, 58, 0, 0,
427
+ 61, 21, 61, 61, 61, 61, 61, 61,
428
+ 61, 37, 37, 3, 37, 37, 37, 127,
429
+ 74, 40, 40, 40, 40, 40, 74, 74,
430
+ 74, 74, 74, 74, 37, 37, 61, 61,
431
+ 61, 61, 61, 61, 61, 61, 61, 61,
432
+ 61, 61, 61, 61, 61, 61, 98, 98,
433
+ 98, 98, 98, 117, 117, 117, 117, 117,
434
+ 117, 117, 94, 94, 94, 94, 117, 117,
435
+ 117, 117, 117, 117, 117, 117, 117, 117,
436
+ 117, 117, 117, 117, 117, 117, 117, 117,
437
+ 13, 43, 78, 78, 78, 107, 107, 49,
438
+ 78, 3, 21, 67, 25, 25, 25, 67,
439
+ 25, 67, 25, 67, 67, 67, 67, 67,
440
+ 67, 0, 0, 0, 0, 0, 0
441
+ ]
442
+
443
+ class << self
444
+ attr_accessor :parser_start
445
+ end
446
+ self.parser_start = 138;
447
+ class << self
448
+ attr_accessor :parser_first_final
449
+ end
450
+ self.parser_first_final = 138;
451
+ class << self
452
+ attr_accessor :parser_error
453
+ end
454
+ self.parser_error = 0;
455
+
456
+ class << self
457
+ attr_accessor :parser_en_main
458
+ end
459
+ self.parser_en_main = 138;
460
+
461
+ # line 104 "src/ragel/parser.rl"
462
+
463
+ =end
464
+
465
+ module Eleanor
466
+
467
+ class Screenplay
468
+
469
+ def parse_! filename
470
+ lines= []
471
+ last_char_cue= nil
472
+ classes= nil
473
+ # these are needed by ragel
474
+ data= ''
475
+ eof= nil
476
+
477
+ # line 478 "lib/eleanor/parser.rb"
478
+ class << self
479
+ attr_accessor :_parser_actions
480
+ private :_parser_actions, :_parser_actions=
481
+ end
482
+ self._parser_actions = [
483
+ 0, 1, 0, 1, 1, 1, 2, 1,
484
+ 4, 1, 5, 1, 6, 1, 7, 1,
485
+ 12, 1, 13, 1, 14, 1, 15, 1,
486
+ 20, 1, 21, 1, 22, 1, 23, 2,
487
+ 0, 8, 2, 0, 16, 2, 1, 9,
488
+ 2, 1, 17, 2, 3, 7, 2, 6,
489
+ 18, 2, 7, 19, 2, 14, 0, 2,
490
+ 14, 10, 2, 15, 1, 2, 15, 11,
491
+ 2, 20, 18, 2, 21, 19, 3, 0,
492
+ 16, 8, 3, 1, 17, 9, 3, 3,
493
+ 7, 19, 3, 5, 13, 7, 3, 14,
494
+ 0, 10, 3, 14, 0, 16, 3, 15,
495
+ 1, 11, 3, 15, 1, 17, 4, 1,
496
+ 17, 7, 19, 4, 5, 13, 7, 19,
497
+ 4, 14, 0, 16, 10, 4, 15, 1,
498
+ 17, 11, 4, 21, 19, 15, 11, 5,
499
+ 1, 17, 7, 19, 9, 5, 15, 5,
500
+ 13, 7, 11, 6, 15, 1, 17, 7,
501
+ 19, 11
502
+ ]
503
+
504
+ class << self
505
+ attr_accessor :_parser_key_offsets
506
+ private :_parser_key_offsets, :_parser_key_offsets=
507
+ end
508
+ self._parser_key_offsets = [
509
+ 0, 0, 4, 8, 11, 15, 19, 27,
510
+ 35, 39, 43, 50, 54, 58, 63, 64,
511
+ 66, 69, 76, 78, 83, 84, 85, 86,
512
+ 87, 95, 102, 106, 110, 111, 112, 116,
513
+ 117, 122, 123, 128, 133, 138, 143, 148,
514
+ 152, 156, 161, 166, 167, 172, 176, 180,
515
+ 188, 198, 204, 208, 209, 210, 219, 229,
516
+ 238, 244, 248, 249, 250, 251, 252, 253,
517
+ 254, 259, 264, 269, 274, 279, 284, 289,
518
+ 294, 299, 304, 309, 314, 319, 324, 333,
519
+ 339, 343, 344, 345, 355, 365, 375, 385,
520
+ 395, 405, 414, 418, 422, 423, 424, 430,
521
+ 434, 435, 436, 446, 456, 466, 476, 486,
522
+ 496, 506, 516, 526, 536, 546, 556, 566,
523
+ 576, 577, 578, 587, 594, 600, 604, 611,
524
+ 612, 613, 614, 615, 623, 627, 631, 637,
525
+ 645, 646, 655, 656, 663, 669, 673, 679,
526
+ 680, 681, 682, 690, 698, 708, 716
527
+ ]
528
+
529
+ class << self
530
+ attr_accessor :_parser_trans_keys
531
+ private :_parser_trans_keys, :_parser_trans_keys=
532
+ end
533
+ self._parser_trans_keys = [
534
+ 10, 13, 11, 12, 9, 10, 13, 32,
535
+ 32, 9, 13, 10, 13, 11, 12, 9,
536
+ 10, 13, 32, 9, 10, 13, 32, 11,
537
+ 12, 65, 90, 9, 10, 13, 32, 11,
538
+ 12, 65, 90, 10, 13, 11, 12, 9,
539
+ 10, 13, 32, 9, 10, 13, 32, 40,
540
+ 11, 12, 10, 13, 11, 12, 9, 10,
541
+ 13, 32, 9, 10, 13, 32, 40, 10,
542
+ 10, 13, 41, 10, 13, 9, 10, 13,
543
+ 32, 41, 11, 12, 9, 32, 9, 32,
544
+ 40, 10, 13, 10, 10, 10, 10, 9,
545
+ 10, 13, 32, 11, 12, 65, 90, 9,
546
+ 10, 13, 32, 40, 11, 12, 10, 13,
547
+ 11, 12, 9, 10, 13, 32, 10, 10,
548
+ 9, 10, 13, 32, 10, 10, 13, 79,
549
+ 11, 12, 10, 10, 13, 78, 11, 12,
550
+ 10, 13, 84, 11, 12, 10, 13, 65,
551
+ 11, 12, 10, 13, 71, 11, 12, 10,
552
+ 13, 69, 11, 12, 10, 13, 11, 12,
553
+ 9, 10, 13, 32, 32, 9, 13, 65,
554
+ 90, 10, 13, 41, 11, 12, 10, 10,
555
+ 13, 32, 11, 12, 10, 13, 11, 12,
556
+ 9, 10, 13, 32, 9, 10, 13, 32,
557
+ 11, 12, 65, 90, 9, 10, 13, 41,
558
+ 11, 12, 32, 96, 123, 126, 9, 10,
559
+ 13, 32, 11, 12, 9, 10, 13, 32,
560
+ 10, 10, 9, 10, 13, 11, 12, 32,
561
+ 96, 123, 126, 9, 10, 13, 32, 11,
562
+ 12, 33, 96, 123, 126, 9, 10, 13,
563
+ 11, 12, 32, 96, 123, 126, 9, 10,
564
+ 13, 32, 11, 12, 9, 10, 13, 32,
565
+ 10, 10, 10, 10, 10, 10, 10, 13,
566
+ 69, 11, 12, 10, 13, 82, 11, 12,
567
+ 10, 13, 73, 11, 12, 10, 13, 69,
568
+ 11, 12, 10, 13, 83, 11, 12, 10,
569
+ 13, 32, 11, 12, 10, 13, 79, 11,
570
+ 12, 10, 13, 70, 11, 12, 10, 13,
571
+ 32, 11, 12, 10, 13, 83, 11, 12,
572
+ 10, 13, 72, 11, 12, 10, 13, 79,
573
+ 11, 12, 10, 13, 84, 11, 12, 10,
574
+ 13, 83, 11, 12, 9, 10, 13, 11,
575
+ 12, 32, 96, 123, 126, 9, 10, 13,
576
+ 32, 11, 12, 9, 10, 13, 32, 10,
577
+ 10, 9, 10, 13, 79, 11, 12, 32,
578
+ 96, 123, 126, 9, 10, 13, 78, 11,
579
+ 12, 32, 96, 123, 126, 9, 10, 13,
580
+ 84, 11, 12, 32, 96, 123, 126, 9,
581
+ 10, 13, 65, 11, 12, 32, 96, 123,
582
+ 126, 9, 10, 13, 71, 11, 12, 32,
583
+ 96, 123, 126, 9, 10, 13, 69, 11,
584
+ 12, 32, 96, 123, 126, 9, 10, 13,
585
+ 11, 12, 32, 96, 123, 126, 10, 13,
586
+ 11, 12, 9, 10, 13, 32, 10, 10,
587
+ 9, 10, 13, 32, 11, 12, 9, 10,
588
+ 13, 32, 10, 10, 9, 10, 13, 69,
589
+ 11, 12, 32, 96, 123, 126, 9, 10,
590
+ 13, 82, 11, 12, 32, 96, 123, 126,
591
+ 9, 10, 13, 73, 11, 12, 32, 96,
592
+ 123, 126, 9, 10, 13, 69, 11, 12,
593
+ 32, 96, 123, 126, 9, 10, 13, 83,
594
+ 11, 12, 32, 96, 123, 126, 9, 10,
595
+ 13, 32, 11, 12, 33, 96, 123, 126,
596
+ 9, 10, 13, 79, 11, 12, 32, 96,
597
+ 123, 126, 9, 10, 13, 70, 11, 12,
598
+ 32, 96, 123, 126, 9, 10, 13, 32,
599
+ 11, 12, 33, 96, 123, 126, 9, 10,
600
+ 13, 83, 11, 12, 32, 96, 123, 126,
601
+ 9, 10, 13, 72, 11, 12, 32, 96,
602
+ 123, 126, 9, 10, 13, 79, 11, 12,
603
+ 32, 96, 123, 126, 9, 10, 13, 84,
604
+ 11, 12, 32, 96, 123, 126, 9, 10,
605
+ 13, 83, 11, 12, 32, 96, 123, 126,
606
+ 10, 10, 10, 13, 32, 46, 58, 11,
607
+ 12, 65, 90, 10, 13, 32, 11, 12,
608
+ 65, 90, 9, 10, 13, 32, 11, 12,
609
+ 9, 10, 13, 32, 9, 10, 13, 32,
610
+ 40, 11, 12, 10, 10, 10, 10, 9,
611
+ 10, 13, 32, 11, 12, 65, 90, 10,
612
+ 13, 11, 12, 9, 10, 13, 32, 9,
613
+ 10, 13, 32, 11, 12, 9, 10, 13,
614
+ 32, 11, 12, 65, 90, 10, 10, 13,
615
+ 32, 46, 58, 11, 12, 65, 90, 10,
616
+ 10, 13, 32, 11, 12, 65, 90, 9,
617
+ 10, 13, 32, 11, 12, 9, 10, 13,
618
+ 32, 9, 10, 13, 32, 11, 12, 10,
619
+ 10, 10, 9, 10, 13, 32, 77, 83,
620
+ 11, 12, 9, 10, 13, 32, 77, 83,
621
+ 11, 12, 9, 10, 13, 32, 77, 83,
622
+ 11, 12, 65, 90, 9, 10, 13, 32,
623
+ 77, 83, 11, 12, 9, 10, 13, 32,
624
+ 77, 83, 11, 12, 0
625
+ ]
626
+
627
+ class << self
628
+ attr_accessor :_parser_single_lengths
629
+ private :_parser_single_lengths, :_parser_single_lengths=
630
+ end
631
+ self._parser_single_lengths = [
632
+ 0, 2, 4, 1, 2, 4, 4, 4,
633
+ 2, 4, 5, 2, 4, 5, 1, 0,
634
+ 1, 5, 2, 3, 1, 1, 1, 1,
635
+ 4, 5, 2, 4, 1, 1, 4, 1,
636
+ 3, 1, 3, 3, 3, 3, 3, 2,
637
+ 4, 1, 3, 1, 3, 2, 4, 4,
638
+ 4, 4, 4, 1, 1, 3, 4, 3,
639
+ 4, 4, 1, 1, 1, 1, 1, 1,
640
+ 3, 3, 3, 3, 3, 3, 3, 3,
641
+ 3, 3, 3, 3, 3, 3, 3, 4,
642
+ 4, 1, 1, 4, 4, 4, 4, 4,
643
+ 4, 3, 2, 4, 1, 1, 4, 4,
644
+ 1, 1, 4, 4, 4, 4, 4, 4,
645
+ 4, 4, 4, 4, 4, 4, 4, 4,
646
+ 1, 1, 5, 3, 4, 4, 5, 1,
647
+ 1, 1, 1, 4, 2, 4, 4, 4,
648
+ 1, 5, 1, 3, 4, 4, 4, 1,
649
+ 1, 1, 6, 6, 6, 6, 6
650
+ ]
651
+
652
+ class << self
653
+ attr_accessor :_parser_range_lengths
654
+ private :_parser_range_lengths, :_parser_range_lengths=
655
+ end
656
+ self._parser_range_lengths = [
657
+ 0, 1, 0, 1, 1, 0, 2, 2,
658
+ 1, 0, 1, 1, 0, 0, 0, 1,
659
+ 1, 1, 0, 1, 0, 0, 0, 0,
660
+ 2, 1, 1, 0, 0, 0, 0, 0,
661
+ 1, 0, 1, 1, 1, 1, 1, 1,
662
+ 0, 2, 1, 0, 1, 1, 0, 2,
663
+ 3, 1, 0, 0, 0, 3, 3, 3,
664
+ 1, 0, 0, 0, 0, 0, 0, 0,
665
+ 1, 1, 1, 1, 1, 1, 1, 1,
666
+ 1, 1, 1, 1, 1, 1, 3, 1,
667
+ 0, 0, 0, 3, 3, 3, 3, 3,
668
+ 3, 3, 1, 0, 0, 0, 1, 0,
669
+ 0, 0, 3, 3, 3, 3, 3, 3,
670
+ 3, 3, 3, 3, 3, 3, 3, 3,
671
+ 0, 0, 2, 2, 1, 0, 1, 0,
672
+ 0, 0, 0, 2, 1, 0, 1, 2,
673
+ 0, 2, 0, 2, 1, 0, 1, 0,
674
+ 0, 0, 1, 1, 2, 1, 1
675
+ ]
676
+
677
+ class << self
678
+ attr_accessor :_parser_index_offsets
679
+ private :_parser_index_offsets, :_parser_index_offsets=
680
+ end
681
+ self._parser_index_offsets = [
682
+ 0, 0, 4, 9, 12, 16, 21, 28,
683
+ 35, 39, 44, 51, 55, 60, 66, 68,
684
+ 70, 73, 80, 83, 88, 90, 92, 94,
685
+ 96, 103, 110, 114, 119, 121, 123, 128,
686
+ 130, 135, 137, 142, 147, 152, 157, 162,
687
+ 166, 171, 175, 180, 182, 187, 191, 196,
688
+ 203, 211, 217, 222, 224, 226, 233, 241,
689
+ 248, 254, 259, 261, 263, 265, 267, 269,
690
+ 271, 276, 281, 286, 291, 296, 301, 306,
691
+ 311, 316, 321, 326, 331, 336, 341, 348,
692
+ 354, 359, 361, 363, 371, 379, 387, 395,
693
+ 403, 411, 418, 422, 427, 429, 431, 437,
694
+ 442, 444, 446, 454, 462, 470, 478, 486,
695
+ 494, 502, 510, 518, 526, 534, 542, 550,
696
+ 558, 560, 562, 570, 576, 582, 587, 594,
697
+ 596, 598, 600, 602, 609, 613, 618, 624,
698
+ 631, 633, 641, 643, 649, 655, 660, 666,
699
+ 668, 670, 672, 680, 688, 697, 705
700
+ ]
701
+
702
+ class << self
703
+ attr_accessor :_parser_indicies
704
+ private :_parser_indicies, :_parser_indicies=
705
+ end
706
+ self._parser_indicies = [
707
+ 1, 3, 2, 0, 1, 4, 5, 1,
708
+ 2, 7, 7, 6, 8, 9, 7, 6,
709
+ 8, 10, 11, 8, 7, 12, 13, 15,
710
+ 12, 14, 16, 6, 18, 13, 15, 18,
711
+ 19, 20, 17, 21, 23, 22, 17, 25,
712
+ 26, 27, 25, 24, 25, 26, 27, 25,
713
+ 29, 24, 28, 30, 32, 31, 28, 34,
714
+ 35, 36, 34, 33, 34, 35, 36, 34,
715
+ 29, 33, 35, 37, 33, 38, 39, 33,
716
+ 38, 39, 40, 41, 39, 39, 33, 38,
717
+ 42, 42, 31, 42, 42, 31, 31, 28,
718
+ 40, 33, 30, 31, 26, 43, 21, 22,
719
+ 18, 44, 46, 18, 45, 20, 17, 47,
720
+ 48, 49, 47, 29, 24, 28, 51, 53,
721
+ 52, 50, 51, 54, 55, 51, 52, 54,
722
+ 52, 51, 52, 56, 13, 15, 56, 37,
723
+ 13, 37, 1, 3, 58, 57, 0, 1,
724
+ 2, 1, 3, 59, 57, 0, 1, 3,
725
+ 60, 57, 0, 1, 3, 61, 57, 0,
726
+ 1, 3, 62, 57, 0, 1, 3, 63,
727
+ 57, 0, 64, 65, 57, 63, 64, 66,
728
+ 67, 64, 57, 68, 68, 69, 6, 8,
729
+ 9, 70, 68, 6, 8, 7, 8, 9,
730
+ 71, 68, 6, 72, 73, 68, 71, 72,
731
+ 74, 75, 72, 68, 12, 13, 15, 12,
732
+ 76, 77, 6, 78, 79, 81, 82, 80,
733
+ 16, 16, 6, 78, 79, 81, 78, 83,
734
+ 6, 79, 84, 85, 79, 83, 84, 83,
735
+ 79, 83, 78, 79, 81, 83, 16, 16,
736
+ 6, 78, 79, 81, 86, 80, 16, 16,
737
+ 6, 87, 88, 89, 80, 86, 86, 71,
738
+ 87, 88, 89, 87, 80, 71, 88, 90,
739
+ 91, 88, 80, 90, 80, 88, 80, 74,
740
+ 68, 72, 68, 66, 57, 64, 57, 1,
741
+ 3, 92, 57, 0, 1, 3, 93, 57,
742
+ 0, 1, 3, 94, 57, 0, 1, 3,
743
+ 95, 57, 0, 1, 3, 96, 57, 0,
744
+ 1, 3, 97, 57, 0, 1, 3, 98,
745
+ 57, 0, 1, 3, 99, 57, 0, 1,
746
+ 3, 100, 57, 0, 1, 3, 101, 57,
747
+ 0, 1, 3, 102, 57, 0, 1, 3,
748
+ 103, 57, 0, 1, 3, 104, 57, 0,
749
+ 1, 3, 63, 57, 0, 105, 106, 108,
750
+ 107, 109, 109, 50, 105, 106, 108, 105,
751
+ 107, 50, 106, 110, 111, 106, 107, 110,
752
+ 107, 106, 107, 105, 106, 108, 113, 112,
753
+ 109, 109, 50, 105, 106, 108, 114, 112,
754
+ 109, 109, 50, 105, 106, 108, 115, 112,
755
+ 109, 109, 50, 105, 106, 108, 116, 112,
756
+ 109, 109, 50, 105, 106, 108, 117, 112,
757
+ 109, 109, 50, 105, 106, 108, 118, 112,
758
+ 109, 109, 50, 120, 121, 122, 112, 118,
759
+ 118, 119, 123, 125, 124, 119, 123, 126,
760
+ 127, 123, 124, 126, 124, 123, 124, 120,
761
+ 121, 122, 120, 112, 119, 121, 128, 129,
762
+ 121, 112, 128, 112, 121, 112, 105, 106,
763
+ 108, 130, 112, 109, 109, 50, 105, 106,
764
+ 108, 131, 112, 109, 109, 50, 105, 106,
765
+ 108, 132, 112, 109, 109, 50, 105, 106,
766
+ 108, 133, 112, 109, 109, 50, 105, 106,
767
+ 108, 134, 112, 109, 109, 50, 105, 106,
768
+ 108, 135, 112, 109, 109, 50, 105, 106,
769
+ 108, 136, 112, 109, 109, 50, 105, 106,
770
+ 108, 137, 112, 109, 109, 50, 105, 106,
771
+ 108, 138, 112, 109, 109, 50, 105, 106,
772
+ 108, 139, 112, 109, 109, 50, 105, 106,
773
+ 108, 140, 112, 109, 109, 50, 105, 106,
774
+ 108, 141, 112, 109, 109, 50, 105, 106,
775
+ 108, 142, 112, 109, 109, 50, 105, 106,
776
+ 108, 118, 112, 109, 109, 50, 48, 43,
777
+ 44, 22, 21, 23, 143, 144, 144, 45,
778
+ 20, 17, 21, 23, 143, 45, 20, 17,
779
+ 144, 145, 146, 144, 45, 17, 148, 149,
780
+ 150, 148, 147, 148, 149, 150, 148, 29,
781
+ 147, 28, 149, 19, 145, 45, 10, 7,
782
+ 4, 2, 152, 153, 155, 152, 154, 156,
783
+ 151, 157, 159, 158, 151, 160, 161, 162,
784
+ 160, 158, 160, 161, 162, 160, 158, 151,
785
+ 163, 161, 162, 163, 154, 156, 151, 161,
786
+ 158, 157, 159, 164, 165, 165, 154, 156,
787
+ 151, 157, 158, 157, 159, 164, 154, 156,
788
+ 151, 165, 166, 167, 165, 154, 151, 168,
789
+ 169, 170, 168, 154, 168, 169, 170, 168,
790
+ 154, 151, 169, 154, 166, 154, 153, 37,
791
+ 152, 153, 155, 152, 172, 173, 171, 0,
792
+ 47, 48, 49, 47, 172, 173, 174, 0,
793
+ 12, 13, 15, 12, 176, 177, 175, 109,
794
+ 50, 56, 13, 15, 56, 172, 173, 57,
795
+ 0, 163, 161, 162, 163, 172, 173, 171,
796
+ 0, 0
797
+ ]
798
+
799
+ class << self
800
+ attr_accessor :_parser_trans_targs_wi
801
+ private :_parser_trans_targs_wi, :_parser_trans_targs_wi=
802
+ end
803
+ self._parser_trans_targs_wi = [
804
+ 1, 2, 0, 33, 3, 122, 4, 0,
805
+ 5, 43, 6, 121, 7, 141, 0, 31,
806
+ 53, 8, 24, 0, 114, 9, 0, 23,
807
+ 0, 10, 6, 22, 11, 15, 12, 0,
808
+ 21, 0, 13, 6, 14, 0, 16, 17,
809
+ 18, 20, 19, 0, 139, 0, 113, 25,
810
+ 140, 112, 26, 27, 0, 29, 6, 28,
811
+ 30, 0, 34, 35, 36, 37, 38, 39,
812
+ 40, 63, 41, 62, 0, 42, 44, 45,
813
+ 46, 61, 47, 60, 0, 48, 49, 50,
814
+ 0, 52, 54, 0, 6, 51, 55, 56,
815
+ 57, 59, 47, 58, 65, 66, 67, 68,
816
+ 69, 70, 71, 72, 73, 74, 75, 76,
817
+ 77, 79, 80, 0, 82, 78, 6, 81,
818
+ 0, 84, 85, 86, 87, 88, 89, 90,
819
+ 94, 95, 97, 91, 0, 93, 47, 92,
820
+ 47, 96, 99, 100, 101, 102, 103, 104,
821
+ 105, 106, 107, 108, 109, 110, 111, 115,
822
+ 116, 117, 120, 0, 118, 6, 119, 124,
823
+ 123, 138, 0, 137, 129, 125, 0, 130,
824
+ 126, 142, 128, 127, 131, 132, 133, 136,
825
+ 134, 142, 135, 0, 32, 64, 0, 0,
826
+ 83, 98
827
+ ]
828
+
829
+ class << self
830
+ attr_accessor :_parser_trans_actions_wi
831
+ private :_parser_trans_actions_wi, :_parser_trans_actions_wi=
832
+ end
833
+ self._parser_trans_actions_wi = [
834
+ 0, 0, 21, 0, 19, 0, 0, 3,
835
+ 0, 0, 1, 0, 27, 0, 102, 0,
836
+ 0, 0, 0, 49, 0, 5, 43, 0,
837
+ 82, 0, 11, 0, 0, 0, 7, 9,
838
+ 0, 17, 0, 29, 0, 0, 0, 0,
839
+ 15, 0, 0, 13, 5, 78, 0, 0,
840
+ 11, 0, 0, 0, 58, 0, 52, 0,
841
+ 0, 61, 0, 0, 0, 0, 0, 0,
842
+ 0, 0, 55, 0, 37, 0, 0, 0,
843
+ 0, 0, 31, 0, 127, 0, 0, 0,
844
+ 74, 0, 0, 40, 34, 0, 0, 0,
845
+ 0, 0, 70, 0, 0, 0, 0, 0,
846
+ 0, 0, 0, 0, 0, 0, 0, 0,
847
+ 0, 0, 0, 98, 0, 0, 90, 0,
848
+ 117, 0, 0, 0, 0, 0, 0, 0,
849
+ 0, 0, 0, 0, 94, 0, 86, 0,
850
+ 112, 0, 0, 0, 0, 0, 0, 0,
851
+ 0, 0, 0, 0, 0, 0, 0, 0,
852
+ 0, 5, 0, 107, 0, 46, 0, 0,
853
+ 0, 0, 67, 0, 0, 0, 25, 0,
854
+ 0, 23, 0, 0, 0, 0, 0, 0,
855
+ 0, 64, 0, 122, 0, 0, 133, 139,
856
+ 0, 0
857
+ ]
858
+
859
+ class << self
860
+ attr_accessor :_parser_eof_actions
861
+ private :_parser_eof_actions, :_parser_eof_actions=
862
+ end
863
+ self._parser_eof_actions = [
864
+ 0, 21, 21, 3, 3, 3, 102, 49,
865
+ 43, 82, 82, 9, 17, 17, 0, 17,
866
+ 17, 17, 9, 9, 17, 9, 13, 43,
867
+ 78, 82, 58, 58, 58, 58, 0, 0,
868
+ 61, 21, 61, 61, 61, 61, 61, 61,
869
+ 61, 37, 37, 3, 37, 37, 37, 127,
870
+ 74, 40, 40, 40, 40, 40, 74, 74,
871
+ 74, 74, 74, 74, 37, 37, 61, 61,
872
+ 61, 61, 61, 61, 61, 61, 61, 61,
873
+ 61, 61, 61, 61, 61, 61, 98, 98,
874
+ 98, 98, 98, 117, 117, 117, 117, 117,
875
+ 117, 117, 94, 94, 94, 94, 117, 117,
876
+ 117, 117, 117, 117, 117, 117, 117, 117,
877
+ 117, 117, 117, 117, 117, 117, 117, 117,
878
+ 13, 43, 78, 78, 78, 107, 107, 49,
879
+ 78, 3, 21, 67, 25, 25, 25, 67,
880
+ 25, 67, 25, 67, 67, 67, 67, 67,
881
+ 67, 0, 0, 0, 0, 0, 0
882
+ ]
883
+
884
+ class << self
885
+ attr_accessor :parser_start
886
+ end
887
+ self.parser_start = 138;
888
+ class << self
889
+ attr_accessor :parser_first_final
890
+ end
891
+ self.parser_first_final = 138;
892
+ class << self
893
+ attr_accessor :parser_error
894
+ end
895
+ self.parser_error = 0;
896
+
897
+ class << self
898
+ attr_accessor :parser_en_main
899
+ end
900
+ self.parser_en_main = 138;
901
+
902
+ # line 119 "src/ragel/parser.rl"
903
+
904
+ # line 905 "lib/eleanor/parser.rb"
905
+ begin
906
+ p ||= 0
907
+ pe ||= data.length
908
+ cs = parser_start
909
+ end
910
+ # line 120 "src/ragel/parser.rl"
911
+ File.open(filename, 'r') do |file|
912
+ file.each_line do |line|
913
+ line << "\n" * 3 if file.eof?
914
+ error= lambda do |expected|
915
+ warn "#{filename}:#{file.lineno}: parse error: expected #{expected}:"
916
+ warn " #{@paras[-2]}" if @paras.length >= 2
917
+ warn " #{@paras[-1]}" if @paras.length >= 1
918
+ warn " #{line.inspect}"
919
+ end
920
+ consume= false
921
+ # these are needed by ragel
922
+ data= line
923
+ p= 0
924
+ pe= data.length
925
+
926
+ # line 927 "lib/eleanor/parser.rb"
927
+ begin
928
+ _klen, _trans, _keys, _acts, _nacts = nil
929
+ _goto_level = 0
930
+ _resume = 10
931
+ _eof_trans = 15
932
+ _again = 20
933
+ _test_eof = 30
934
+ _out = 40
935
+ while true
936
+ _trigger_goto = false
937
+ if _goto_level <= 0
938
+ if p == pe
939
+ _goto_level = _test_eof
940
+ next
941
+ end
942
+ if cs == 0
943
+ _goto_level = _out
944
+ next
945
+ end
946
+ end
947
+ if _goto_level <= _resume
948
+ _keys = _parser_key_offsets[cs]
949
+ _trans = _parser_index_offsets[cs]
950
+ _klen = _parser_single_lengths[cs]
951
+ _break_match = false
952
+
953
+ begin
954
+ if _klen > 0
955
+ _lower = _keys
956
+ _upper = _keys + _klen - 1
957
+
958
+ loop do
959
+ break if _upper < _lower
960
+ _mid = _lower + ( (_upper - _lower) >> 1 )
961
+
962
+ if data[p] < _parser_trans_keys[_mid]
963
+ _upper = _mid - 1
964
+ elsif data[p] > _parser_trans_keys[_mid]
965
+ _lower = _mid + 1
966
+ else
967
+ _trans += (_mid - _keys)
968
+ _break_match = true
969
+ break
970
+ end
971
+ end # loop
972
+ break if _break_match
973
+ _keys += _klen
974
+ _trans += _klen
975
+ end
976
+ _klen = _parser_range_lengths[cs]
977
+ if _klen > 0
978
+ _lower = _keys
979
+ _upper = _keys + (_klen << 1) - 2
980
+ loop do
981
+ break if _upper < _lower
982
+ _mid = _lower + (((_upper-_lower) >> 1) & ~1)
983
+ if data[p] < _parser_trans_keys[_mid]
984
+ _upper = _mid - 2
985
+ elsif data[p] > _parser_trans_keys[_mid+1]
986
+ _lower = _mid + 2
987
+ else
988
+ _trans += ((_mid - _keys) >> 1)
989
+ _break_match = true
990
+ break
991
+ end
992
+ end # loop
993
+ break if _break_match
994
+ _trans += _klen
995
+ end
996
+ end while false
997
+ _trans = _parser_indicies[_trans]
998
+ cs = _parser_trans_targs_wi[_trans]
999
+ if _parser_trans_actions_wi[_trans] != 0
1000
+ _acts = _parser_trans_actions_wi[_trans]
1001
+ _nacts = _parser_actions[_acts]
1002
+ _acts += 1
1003
+ while _nacts > 0
1004
+ _nacts -= 1
1005
+ _acts += 1
1006
+ case _parser_actions[_acts - 1]
1007
+ when 0 then
1008
+ # line 45 "src/ragel/parser.rl"
1009
+ begin
1010
+ classes= [Action]; consume= true end
1011
+ # line 45 "src/ragel/parser.rl"
1012
+ when 1 then
1013
+ # line 46 "src/ragel/parser.rl"
1014
+ begin
1015
+ error.call('Action') end
1016
+ # line 46 "src/ragel/parser.rl"
1017
+ when 2 then
1018
+ # line 49 "src/ragel/parser.rl"
1019
+ begin
1020
+ classes << CharacterCue end
1021
+ # line 49 "src/ragel/parser.rl"
1022
+ when 3 then
1023
+ # line 50 "src/ragel/parser.rl"
1024
+ begin
1025
+ error.call('Action') end
1026
+ # line 50 "src/ragel/parser.rl"
1027
+ when 4 then
1028
+ # line 53 "src/ragel/parser.rl"
1029
+ begin
1030
+ classes << Dialog end
1031
+ # line 53 "src/ragel/parser.rl"
1032
+ when 5 then
1033
+ # line 54 "src/ragel/parser.rl"
1034
+ begin
1035
+ error.call('Dialog') end
1036
+ # line 54 "src/ragel/parser.rl"
1037
+ when 6 then
1038
+ # line 57 "src/ragel/parser.rl"
1039
+ begin
1040
+ classes= [Insert]; consume= true end
1041
+ # line 57 "src/ragel/parser.rl"
1042
+ when 7 then
1043
+ # line 58 "src/ragel/parser.rl"
1044
+ begin
1045
+ error.call('Insert') end
1046
+ # line 58 "src/ragel/parser.rl"
1047
+ when 8 then
1048
+ # line 61 "src/ragel/parser.rl"
1049
+ begin
1050
+ classes= [MontageItem]; consume= true end
1051
+ # line 61 "src/ragel/parser.rl"
1052
+ when 9 then
1053
+ # line 62 "src/ragel/parser.rl"
1054
+ begin
1055
+ error.call('MontageItem') end
1056
+ # line 62 "src/ragel/parser.rl"
1057
+ when 10 then
1058
+ # line 65 "src/ragel/parser.rl"
1059
+ begin
1060
+ classes= [MontageHeading]; consume= true end
1061
+ # line 65 "src/ragel/parser.rl"
1062
+ when 11 then
1063
+ # line 66 "src/ragel/parser.rl"
1064
+ begin
1065
+ error.call('MontageHeading') end
1066
+ # line 66 "src/ragel/parser.rl"
1067
+ when 12 then
1068
+ # line 69 "src/ragel/parser.rl"
1069
+ begin
1070
+ classes << Parenthetical end
1071
+ # line 69 "src/ragel/parser.rl"
1072
+ when 13 then
1073
+ # line 70 "src/ragel/parser.rl"
1074
+ begin
1075
+ error.call('Parenthetical') end
1076
+ # line 70 "src/ragel/parser.rl"
1077
+ when 14 then
1078
+ # line 73 "src/ragel/parser.rl"
1079
+ begin
1080
+ classes= [SceneHeading]; consume= true end
1081
+ # line 73 "src/ragel/parser.rl"
1082
+ when 15 then
1083
+ # line 74 "src/ragel/parser.rl"
1084
+ begin
1085
+ error.call('SceneHeading') end
1086
+ # line 74 "src/ragel/parser.rl"
1087
+ when 16 then
1088
+ # line 77 "src/ragel/parser.rl"
1089
+ begin
1090
+ classes= [SlugLine]; consume= true end
1091
+ # line 77 "src/ragel/parser.rl"
1092
+ when 17 then
1093
+ # line 78 "src/ragel/parser.rl"
1094
+ begin
1095
+ error.call('SlugLine') end
1096
+ # line 78 "src/ragel/parser.rl"
1097
+ when 18 then
1098
+ # line 81 "src/ragel/parser.rl"
1099
+ begin
1100
+ classes= [Transition]; consume= true end
1101
+ # line 81 "src/ragel/parser.rl"
1102
+ when 19 then
1103
+ # line 82 "src/ragel/parser.rl"
1104
+ begin
1105
+ error.call('Transition') end
1106
+ # line 82 "src/ragel/parser.rl"
1107
+ when 20 then
1108
+ # line 87 "src/ragel/parser.rl"
1109
+ begin
1110
+ classes= [TitlePage]; consume= true end
1111
+ # line 87 "src/ragel/parser.rl"
1112
+ when 21 then
1113
+ # line 88 "src/ragel/parser.rl"
1114
+ begin
1115
+ error.call('TitlePage') end
1116
+ # line 88 "src/ragel/parser.rl"
1117
+ when 22 then
1118
+ # line 92 "src/ragel/parser.rl"
1119
+ begin
1120
+ classes= [] end
1121
+ # line 92 "src/ragel/parser.rl"
1122
+ when 23 then
1123
+ # line 93 "src/ragel/parser.rl"
1124
+ begin
1125
+ consume= true end
1126
+ # line 93 "src/ragel/parser.rl"
1127
+ # line 1128 "lib/eleanor/parser.rb"
1128
+ end # action switch
1129
+ end
1130
+ end
1131
+ if _trigger_goto
1132
+ next
1133
+ end
1134
+ end
1135
+ if _goto_level <= _again
1136
+ if cs == 0
1137
+ _goto_level = _out
1138
+ next
1139
+ end
1140
+ p += 1
1141
+ if p != pe
1142
+ _goto_level = _resume
1143
+ next
1144
+ end
1145
+ end
1146
+ if _goto_level <= _test_eof
1147
+ if p == eof
1148
+ __acts = _parser_eof_actions[cs]
1149
+ __nacts = _parser_actions[__acts]
1150
+ __acts += 1
1151
+ while __nacts > 0
1152
+ __nacts -= 1
1153
+ __acts += 1
1154
+ case _parser_actions[__acts - 1]
1155
+ when 1 then
1156
+ # line 46 "src/ragel/parser.rl"
1157
+ begin
1158
+ error.call('Action') end
1159
+ # line 46 "src/ragel/parser.rl"
1160
+ when 3 then
1161
+ # line 50 "src/ragel/parser.rl"
1162
+ begin
1163
+ error.call('Action') end
1164
+ # line 50 "src/ragel/parser.rl"
1165
+ when 5 then
1166
+ # line 54 "src/ragel/parser.rl"
1167
+ begin
1168
+ error.call('Dialog') end
1169
+ # line 54 "src/ragel/parser.rl"
1170
+ when 7 then
1171
+ # line 58 "src/ragel/parser.rl"
1172
+ begin
1173
+ error.call('Insert') end
1174
+ # line 58 "src/ragel/parser.rl"
1175
+ when 9 then
1176
+ # line 62 "src/ragel/parser.rl"
1177
+ begin
1178
+ error.call('MontageItem') end
1179
+ # line 62 "src/ragel/parser.rl"
1180
+ when 11 then
1181
+ # line 66 "src/ragel/parser.rl"
1182
+ begin
1183
+ error.call('MontageHeading') end
1184
+ # line 66 "src/ragel/parser.rl"
1185
+ when 13 then
1186
+ # line 70 "src/ragel/parser.rl"
1187
+ begin
1188
+ error.call('Parenthetical') end
1189
+ # line 70 "src/ragel/parser.rl"
1190
+ when 15 then
1191
+ # line 74 "src/ragel/parser.rl"
1192
+ begin
1193
+ error.call('SceneHeading') end
1194
+ # line 74 "src/ragel/parser.rl"
1195
+ when 17 then
1196
+ # line 78 "src/ragel/parser.rl"
1197
+ begin
1198
+ error.call('SlugLine') end
1199
+ # line 78 "src/ragel/parser.rl"
1200
+ when 19 then
1201
+ # line 82 "src/ragel/parser.rl"
1202
+ begin
1203
+ error.call('Transition') end
1204
+ # line 82 "src/ragel/parser.rl"
1205
+ when 21 then
1206
+ # line 88 "src/ragel/parser.rl"
1207
+ begin
1208
+ error.call('TitlePage') end
1209
+ # line 88 "src/ragel/parser.rl"
1210
+ # line 1211 "lib/eleanor/parser.rb"
1211
+ end # eof action switch
1212
+ end
1213
+ if _trigger_goto
1214
+ next
1215
+ end
1216
+ end
1217
+ end
1218
+ if _goto_level <= _out
1219
+ break
1220
+ end
1221
+ end
1222
+ end
1223
+ # line 135 "src/ragel/parser.rl"
1224
+ # collect lines until consume is set, i.e., we've seen a full
1225
+ # paragraph, in which case classes is non-nil
1226
+ lines << line
1227
+ if consume
1228
+ lines= lines.map { |l| l.strip }.reject { |l| l.empty? }
1229
+ unless lines.empty?
1230
+ if classes[0] == TitlePage
1231
+ @title_pages << TitlePage.new(:title => lines[0],
1232
+ :author => lines[1],
1233
+ :contact => lines[2..-1])
1234
+ else
1235
+ lines.each_with_index do |line, i|
1236
+ @paras << classes[i].new(self, line, last_char_cue)
1237
+ # remember the last character cue in the current scene
1238
+ if classes[i] == CharacterCue
1239
+ last_char_cue= @paras.last
1240
+ elsif classes[i] == SceneHeading
1241
+ last_char_cue= nil
1242
+ end
1243
+ end
1244
+ end
1245
+ end
1246
+ lines= []
1247
+ end
1248
+ end
1249
+ end
1250
+ cs < parser_first_final ? nil : @paras
1251
+ end
1252
+
1253
+ end
1254
+
1255
+ end