fancy 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. data/AUTHORS +2 -0
  2. data/README.md +6 -1
  3. data/bin/fancy +6 -0
  4. data/bin/ifancy +44 -3
  5. data/boot/fancy_ext/module.rb +4 -0
  6. data/boot/fancy_ext/object.rb +4 -0
  7. data/boot/rbx-compiler/compiler/ast/block.rb +29 -1
  8. data/boot/rbx-compiler/compiler/ast/identifier.rb +6 -0
  9. data/boot/rbx-compiler/compiler/ast/message_send.rb +1 -0
  10. data/boot/rbx-compiler/parser/fancy_parser.bundle +0 -0
  11. data/boot/rbx-compiler/parser/lexer.lex +2 -0
  12. data/boot/rbx-compiler/parser/parser.rb +6 -0
  13. data/boot/rbx-compiler/parser/parser.y +14 -1
  14. data/doc/api/fancy.jsonp +1 -1
  15. data/doc/features.md +24 -0
  16. data/examples/99bottles.fy +5 -0
  17. data/examples/conditions_exceptions.fy +9 -0
  18. data/examples/conditions_parsing.fy +68 -0
  19. data/examples/greeter.fy +9 -0
  20. data/examples/html_generator.fy +59 -29
  21. data/examples/webserver/webserver.fy +8 -11
  22. data/lib/argv.fy +6 -0
  23. data/lib/array.fy +17 -35
  24. data/lib/block.fy +82 -1
  25. data/lib/boot.fy +4 -2
  26. data/lib/compiler.fy +2 -2
  27. data/lib/compiler/ast/block.fy +24 -20
  28. data/lib/compiler/ast/message_send.fy +11 -0
  29. data/lib/contracts.fy +60 -0
  30. data/lib/dynamic_slot_object.fy +61 -0
  31. data/lib/enumerable.fy +432 -394
  32. data/lib/enumerator.fy +152 -150
  33. data/lib/fdoc.fy +4 -17
  34. data/lib/fiber.fy +4 -10
  35. data/lib/file.fy +33 -25
  36. data/lib/future.fy +59 -5
  37. data/lib/hash.fy +54 -1
  38. data/lib/html.fy +107 -0
  39. data/lib/kvo.fy +173 -0
  40. data/lib/main.fy +6 -2
  41. data/lib/message_sink.fy +19 -0
  42. data/lib/number.fy +48 -0
  43. data/lib/object.fy +65 -13
  44. data/lib/package.fy +12 -2
  45. data/lib/package/dependency.fy +13 -0
  46. data/lib/package/dependency_installer.fy +27 -0
  47. data/lib/package/installer.fy +4 -10
  48. data/lib/package/uninstaller.fy +1 -3
  49. data/lib/parser/ext/lexer.lex +8 -3
  50. data/lib/parser/ext/parser.y +4 -1
  51. data/lib/parser/methods.fy +7 -3
  52. data/lib/range.fy +1 -1
  53. data/lib/rbx.fy +2 -1
  54. data/lib/rbx/array.fy +28 -12
  55. data/lib/rbx/bignum.fy +1 -1
  56. data/lib/rbx/block.fy +27 -0
  57. data/lib/rbx/console.fy +6 -6
  58. data/lib/rbx/date.fy +6 -1
  59. data/lib/rbx/documentation.fy +8 -3
  60. data/lib/rbx/exception.fy +5 -0
  61. data/lib/rbx/file.fy +40 -7
  62. data/lib/rbx/fixnum.fy +12 -1
  63. data/lib/rbx/method.fy +9 -2
  64. data/lib/rbx/module.fy +24 -0
  65. data/lib/rbx/regexp.fy +8 -0
  66. data/lib/rbx/string.fy +23 -7
  67. data/lib/rbx/tcp_server.fy +4 -2
  68. data/lib/rbx/tcp_socket.fy +14 -0
  69. data/lib/remote_object.fy +59 -0
  70. data/lib/set.fy +15 -4
  71. data/lib/string.fy +38 -5
  72. data/lib/stringio.fy +1 -0
  73. data/lib/symbol.fy +4 -0
  74. data/lib/system.fy +22 -0
  75. data/lib/thread_pool.fy +2 -2
  76. data/lib/tuple.fy +18 -1
  77. data/lib/vars.fy +17 -0
  78. data/lib/version.fy +1 -1
  79. data/ruby_lib/fancy +6 -0
  80. data/tests/array.fy +30 -0
  81. data/tests/block.fy +106 -0
  82. data/tests/class.fy +19 -0
  83. data/tests/enumerable.fy +1 -1
  84. data/tests/enumerator.fy +5 -5
  85. data/tests/file.fy +28 -0
  86. data/tests/fixnum.fy +0 -50
  87. data/tests/future.fy +9 -24
  88. data/tests/hash.fy +35 -0
  89. data/tests/html.fy +33 -0
  90. data/tests/kvo.fy +101 -0
  91. data/tests/number.fy +75 -0
  92. data/tests/object.fy +50 -3
  93. data/tests/string.fy +19 -10
  94. data/tests/symbol.fy +5 -0
  95. data/tests/tuple.fy +7 -0
  96. data/tools/fancy-mode.el +5 -1
  97. metadata +22 -21
  98. data/boot/compiler/parser/ext/fancy_parser.bundle +0 -0
  99. data/boot/rbx-compiler/parser/Makefile +0 -156
  100. data/boot/rbx-compiler/parser/lexer.c +0 -2310
  101. data/boot/rbx-compiler/parser/lexer.h +0 -315
  102. data/boot/rbx-compiler/parser/parser.c +0 -2946
  103. data/boot/rbx-compiler/parser/parser.h +0 -151
  104. data/lib/fiber_pool.fy +0 -78
  105. data/lib/method.fy +0 -6
  106. data/lib/parser/ext/Makefile +0 -156
  107. data/lib/parser/ext/fancy_parser.bundle +0 -0
  108. data/lib/parser/ext/lexer.c +0 -2392
  109. data/lib/parser/ext/lexer.h +0 -315
  110. data/lib/parser/ext/parser.c +0 -3251
  111. data/lib/parser/ext/parser.h +0 -161
@@ -1,2310 +0,0 @@
1
- #line 2 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.c"
2
-
3
- #line 4 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.c"
4
-
5
- #define YY_INT_ALIGNED short int
6
-
7
- /* A lexical scanner generated by flex */
8
-
9
- #define FLEX_SCANNER
10
- #define YY_FLEX_MAJOR_VERSION 2
11
- #define YY_FLEX_MINOR_VERSION 5
12
- #define YY_FLEX_SUBMINOR_VERSION 35
13
- #if YY_FLEX_SUBMINOR_VERSION > 0
14
- #define FLEX_BETA
15
- #endif
16
-
17
- /* First, we deal with platform-specific or compiler-specific issues. */
18
-
19
- /* begin standard C headers. */
20
- #include <stdio.h>
21
- #include <string.h>
22
- #include <errno.h>
23
- #include <stdlib.h>
24
-
25
- /* end standard C headers. */
26
-
27
- /* flex integer type definitions */
28
-
29
- #ifndef FLEXINT_H
30
- #define FLEXINT_H
31
-
32
- /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
-
34
- #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35
-
36
- /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37
- * if you want the limit (max/min) macros for int types.
38
- */
39
- #ifndef __STDC_LIMIT_MACROS
40
- #define __STDC_LIMIT_MACROS 1
41
- #endif
42
-
43
- #include <inttypes.h>
44
- typedef int8_t flex_int8_t;
45
- typedef uint8_t flex_uint8_t;
46
- typedef int16_t flex_int16_t;
47
- typedef uint16_t flex_uint16_t;
48
- typedef int32_t flex_int32_t;
49
- typedef uint32_t flex_uint32_t;
50
- #else
51
- typedef signed char flex_int8_t;
52
- typedef short int flex_int16_t;
53
- typedef int flex_int32_t;
54
- typedef unsigned char flex_uint8_t;
55
- typedef unsigned short int flex_uint16_t;
56
- typedef unsigned int flex_uint32_t;
57
- #endif /* ! C99 */
58
-
59
- /* Limits of integral types. */
60
- #ifndef INT8_MIN
61
- #define INT8_MIN (-128)
62
- #endif
63
- #ifndef INT16_MIN
64
- #define INT16_MIN (-32767-1)
65
- #endif
66
- #ifndef INT32_MIN
67
- #define INT32_MIN (-2147483647-1)
68
- #endif
69
- #ifndef INT8_MAX
70
- #define INT8_MAX (127)
71
- #endif
72
- #ifndef INT16_MAX
73
- #define INT16_MAX (32767)
74
- #endif
75
- #ifndef INT32_MAX
76
- #define INT32_MAX (2147483647)
77
- #endif
78
- #ifndef UINT8_MAX
79
- #define UINT8_MAX (255U)
80
- #endif
81
- #ifndef UINT16_MAX
82
- #define UINT16_MAX (65535U)
83
- #endif
84
- #ifndef UINT32_MAX
85
- #define UINT32_MAX (4294967295U)
86
- #endif
87
-
88
- #endif /* ! FLEXINT_H */
89
-
90
- #ifdef __cplusplus
91
-
92
- /* The "const" storage-class-modifier is valid. */
93
- #define YY_USE_CONST
94
-
95
- #else /* ! __cplusplus */
96
-
97
- /* C99 requires __STDC__ to be defined as 1. */
98
- #if defined (__STDC__)
99
-
100
- #define YY_USE_CONST
101
-
102
- #endif /* defined (__STDC__) */
103
- #endif /* ! __cplusplus */
104
-
105
- #ifdef YY_USE_CONST
106
- #define yyconst const
107
- #else
108
- #define yyconst
109
- #endif
110
-
111
- /* Returned upon end-of-file. */
112
- #define YY_NULL 0
113
-
114
- /* Promotes a possibly negative, possibly signed char to an unsigned
115
- * integer for use as an array index. If the signed char is negative,
116
- * we want to instead treat it as an 8-bit unsigned char, hence the
117
- * double cast.
118
- */
119
- #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
120
-
121
- /* Enter a start condition. This macro really ought to take a parameter,
122
- * but we do it the disgusting crufty way forced on us by the ()-less
123
- * definition of BEGIN.
124
- */
125
- #define BEGIN (yy_start) = 1 + 2 *
126
-
127
- /* Translate the current start state into a value that can be later handed
128
- * to BEGIN to return to the state. The YYSTATE alias is for lex
129
- * compatibility.
130
- */
131
- #define YY_START (((yy_start) - 1) / 2)
132
- #define YYSTATE YY_START
133
-
134
- /* Action number for EOF rule of a given start state. */
135
- #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
136
-
137
- /* Special action meaning "start processing a new file". */
138
- #define YY_NEW_FILE yyrestart(yyin )
139
-
140
- #define YY_END_OF_BUFFER_CHAR 0
141
-
142
- /* Size of default input buffer. */
143
- #ifndef YY_BUF_SIZE
144
- #define YY_BUF_SIZE 16384
145
- #endif
146
-
147
- /* The state buf must be large enough to hold one state per character in the main buffer.
148
- */
149
- #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
150
-
151
- #ifndef YY_TYPEDEF_YY_BUFFER_STATE
152
- #define YY_TYPEDEF_YY_BUFFER_STATE
153
- typedef struct yy_buffer_state *YY_BUFFER_STATE;
154
- #endif
155
-
156
- #ifndef YY_TYPEDEF_YY_SIZE_T
157
- #define YY_TYPEDEF_YY_SIZE_T
158
- typedef size_t yy_size_t;
159
- #endif
160
-
161
- extern yy_size_t yyleng;
162
-
163
- extern FILE *yyin, *yyout;
164
-
165
- #define EOB_ACT_CONTINUE_SCAN 0
166
- #define EOB_ACT_END_OF_FILE 1
167
- #define EOB_ACT_LAST_MATCH 2
168
-
169
- /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
170
- * access to the local variable yy_act. Since yyless() is a macro, it would break
171
- * existing scanners that call yyless() from OUTSIDE yylex.
172
- * One obvious solution it to make yy_act a global. I tried that, and saw
173
- * a 5% performance hit in a non-yylineno scanner, because yy_act is
174
- * normally declared as a register variable-- so it is not worth it.
175
- */
176
- #define YY_LESS_LINENO(n) \
177
- do { \
178
- yy_size_t yyl;\
179
- for ( yyl = n; yyl < yyleng; ++yyl )\
180
- if ( yytext[yyl] == '\n' )\
181
- --yylineno;\
182
- }while(0)
183
-
184
- /* Return all but the first "n" matched characters back to the input stream. */
185
- #define yyless(n) \
186
- do \
187
- { \
188
- /* Undo effects of setting up yytext. */ \
189
- int yyless_macro_arg = (n); \
190
- YY_LESS_LINENO(yyless_macro_arg);\
191
- *yy_cp = (yy_hold_char); \
192
- YY_RESTORE_YY_MORE_OFFSET \
193
- (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
194
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \
195
- } \
196
- while ( 0 )
197
-
198
- #define unput(c) yyunput( c, (yytext_ptr) )
199
-
200
- #ifndef YY_STRUCT_YY_BUFFER_STATE
201
- #define YY_STRUCT_YY_BUFFER_STATE
202
- struct yy_buffer_state
203
- {
204
- FILE *yy_input_file;
205
-
206
- char *yy_ch_buf; /* input buffer */
207
- char *yy_buf_pos; /* current position in input buffer */
208
-
209
- /* Size of input buffer in bytes, not including room for EOB
210
- * characters.
211
- */
212
- yy_size_t yy_buf_size;
213
-
214
- /* Number of characters read into yy_ch_buf, not including EOB
215
- * characters.
216
- */
217
- yy_size_t yy_n_chars;
218
-
219
- /* Whether we "own" the buffer - i.e., we know we created it,
220
- * and can realloc() it to grow it, and should free() it to
221
- * delete it.
222
- */
223
- int yy_is_our_buffer;
224
-
225
- /* Whether this is an "interactive" input source; if so, and
226
- * if we're using stdio for input, then we want to use getc()
227
- * instead of fread(), to make sure we stop fetching input after
228
- * each newline.
229
- */
230
- int yy_is_interactive;
231
-
232
- /* Whether we're considered to be at the beginning of a line.
233
- * If so, '^' rules will be active on the next match, otherwise
234
- * not.
235
- */
236
- int yy_at_bol;
237
-
238
- int yy_bs_lineno; /**< The line count. */
239
- int yy_bs_column; /**< The column count. */
240
-
241
- /* Whether to try to fill the input buffer when we reach the
242
- * end of it.
243
- */
244
- int yy_fill_buffer;
245
-
246
- int yy_buffer_status;
247
-
248
- #define YY_BUFFER_NEW 0
249
- #define YY_BUFFER_NORMAL 1
250
- /* When an EOF's been seen but there's still some text to process
251
- * then we mark the buffer as YY_EOF_PENDING, to indicate that we
252
- * shouldn't try reading from the input source any more. We might
253
- * still have a bunch of tokens to match, though, because of
254
- * possible backing-up.
255
- *
256
- * When we actually see the EOF, we change the status to "new"
257
- * (via yyrestart()), so that the user can continue scanning by
258
- * just pointing yyin at a new input file.
259
- */
260
- #define YY_BUFFER_EOF_PENDING 2
261
-
262
- };
263
- #endif /* !YY_STRUCT_YY_BUFFER_STATE */
264
-
265
- /* Stack of input buffers. */
266
- static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
267
- static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
268
- static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
269
-
270
- /* We provide macros for accessing buffer states in case in the
271
- * future we want to put the buffer states in a more general
272
- * "scanner state".
273
- *
274
- * Returns the top of the stack, or NULL.
275
- */
276
- #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
277
- ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
278
- : NULL)
279
-
280
- /* Same as previous macro, but useful when we know that the buffer stack is not
281
- * NULL or when we need an lvalue. For internal use only.
282
- */
283
- #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
284
-
285
- /* yy_hold_char holds the character lost when yytext is formed. */
286
- static char yy_hold_char;
287
- static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
288
- yy_size_t yyleng;
289
-
290
- /* Points to current character in buffer. */
291
- static char *yy_c_buf_p = (char *) 0;
292
- static int yy_init = 0; /* whether we need to initialize */
293
- static int yy_start = 0; /* start state number */
294
-
295
- /* Flag which is used to allow yywrap()'s to do buffer switches
296
- * instead of setting up a fresh yyin. A bit of a hack ...
297
- */
298
- static int yy_did_buffer_switch_on_eof;
299
-
300
- void yyrestart (FILE *input_file );
301
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
302
- YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
303
- void yy_delete_buffer (YY_BUFFER_STATE b );
304
- void yy_flush_buffer (YY_BUFFER_STATE b );
305
- void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
306
- void yypop_buffer_state (void );
307
-
308
- static void yyensure_buffer_stack (void );
309
- static void yy_load_buffer_state (void );
310
- static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
311
-
312
- #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
313
-
314
- YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
315
- YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
316
- YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
317
-
318
- void *yyalloc (yy_size_t );
319
- void *yyrealloc (void *,yy_size_t );
320
- void yyfree (void * );
321
-
322
- #define yy_new_buffer yy_create_buffer
323
-
324
- #define yy_set_interactive(is_interactive) \
325
- { \
326
- if ( ! YY_CURRENT_BUFFER ){ \
327
- yyensure_buffer_stack (); \
328
- YY_CURRENT_BUFFER_LVALUE = \
329
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
330
- } \
331
- YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
332
- }
333
-
334
- #define yy_set_bol(at_bol) \
335
- { \
336
- if ( ! YY_CURRENT_BUFFER ){\
337
- yyensure_buffer_stack (); \
338
- YY_CURRENT_BUFFER_LVALUE = \
339
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
340
- } \
341
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
342
- }
343
-
344
- #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
345
-
346
- typedef unsigned char YY_CHAR;
347
-
348
- FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
349
-
350
- typedef int yy_state_type;
351
-
352
- extern int yylineno;
353
-
354
- int yylineno = 1;
355
-
356
- extern char *yytext;
357
- #define yytext_ptr yytext
358
-
359
- static yy_state_type yy_get_previous_state (void );
360
- static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
361
- static int yy_get_next_buffer (void );
362
- static void yy_fatal_error (yyconst char msg[] );
363
-
364
- /* Done after the current pattern has been matched and before the
365
- * corresponding action - sets up yytext.
366
- */
367
- #define YY_DO_BEFORE_ACTION \
368
- (yytext_ptr) = yy_bp; \
369
- yyleng = (size_t) (yy_cp - yy_bp); \
370
- (yy_hold_char) = *yy_cp; \
371
- *yy_cp = '\0'; \
372
- (yy_c_buf_p) = yy_cp;
373
-
374
- #define YY_NUM_RULES 50
375
- #define YY_END_OF_BUFFER 51
376
- /* This struct is not used in this scanner,
377
- but its presence is necessary. */
378
- struct yy_trans_info
379
- {
380
- flex_int32_t yy_verify;
381
- flex_int32_t yy_nxt;
382
- };
383
- static yyconst flex_int16_t yy_accept[181] =
384
- { 0,
385
- 46, 46, 51, 49, 46, 48, 46, 22, 49, 45,
386
- 44, 22, 49, 10, 11, 22, 40, 22, 43, 22,
387
- 6, 6, 42, 41, 22, 21, 49, 36, 36, 14,
388
- 49, 15, 33, 33, 33, 33, 33, 33, 33, 33,
389
- 12, 18, 13, 46, 0, 22, 35, 0, 8, 0,
390
- 45, 22, 34, 33, 33, 0, 38, 38, 38, 0,
391
- 38, 0, 38, 38, 6, 20, 0, 22, 35, 22,
392
- 0, 6, 0, 0, 0, 0, 16, 19, 33, 0,
393
- 36, 34, 36, 0, 0, 0, 47, 17, 33, 33,
394
- 33, 33, 33, 33, 33, 33, 33, 22, 22, 8,
395
-
396
- 0, 0, 38, 38, 38, 38, 38, 38, 0, 38,
397
- 38, 38, 38, 38, 38, 38, 39, 7, 5, 4,
398
- 3, 0, 33, 33, 33, 2, 33, 33, 33, 33,
399
- 33, 25, 22, 0, 0, 0, 38, 38, 38, 38,
400
- 38, 38, 38, 38, 38, 38, 37, 32, 33, 33,
401
- 33, 33, 33, 33, 30, 33, 0, 38, 38, 38,
402
- 37, 37, 26, 1, 33, 31, 28, 33, 29, 9,
403
- 33, 24, 27, 33, 33, 33, 33, 33, 23, 0
404
- } ;
405
-
406
- static yyconst flex_int32_t yy_ec[256] =
407
- { 0,
408
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
409
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
410
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
411
- 1, 4, 5, 6, 7, 8, 5, 9, 10, 11,
412
- 12, 9, 13, 14, 15, 16, 17, 18, 19, 20,
413
- 20, 20, 20, 20, 20, 21, 21, 22, 23, 24,
414
- 25, 26, 5, 27, 28, 29, 28, 28, 28, 28,
415
- 30, 30, 30, 30, 30, 31, 30, 30, 32, 30,
416
- 30, 30, 30, 30, 30, 30, 30, 33, 30, 30,
417
- 34, 35, 36, 5, 37, 1, 38, 39, 40, 41,
418
-
419
- 42, 43, 44, 45, 46, 44, 44, 47, 48, 49,
420
- 50, 51, 44, 52, 53, 54, 55, 44, 44, 56,
421
- 57, 44, 58, 59, 60, 5, 1, 1, 1, 1,
422
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
423
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
424
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
425
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
428
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
429
-
430
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
431
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
432
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435
- 1, 1, 1, 1, 1
436
- } ;
437
-
438
- static yyconst flex_int32_t yy_meta[61] =
439
- { 0,
440
- 1, 1, 2, 1, 3, 1, 1, 1, 4, 1,
441
- 5, 1, 3, 1, 3, 1, 3, 6, 6, 6,
442
- 6, 7, 1, 3, 3, 3, 8, 6, 6, 9,
443
- 9, 9, 9, 1, 1, 1, 10, 11, 11, 11,
444
- 11, 11, 11, 12, 12, 12, 12, 12, 12, 12,
445
- 12, 12, 12, 12, 12, 12, 12, 1, 1, 1
446
- } ;
447
-
448
- static yyconst flex_int16_t yy_base[194] =
449
- { 0,
450
- 0, 0, 352, 763, 59, 763, 60, 340, 59, 0,
451
- 763, 115, 149, 763, 763, 55, 763, 321, 763, 72,
452
- 193, 51, 763, 763, 57, 67, 319, 245, 278, 763,
453
- 342, 318, 311, 48, 301, 296, 303, 298, 37, 287,
454
- 763, 279, 763, 78, 330, 322, 763, 78, 326, 328,
455
- 0, 97, 763, 0, 0, 271, 0, 345, 0, 302,
456
- 401, 291, 0, 266, 126, 312, 304, 222, 302, 248,
457
- 97, 199, 81, 85, 0, 115, 763, 306, 0, 287,
458
- 307, 763, 306, 289, 103, 307, 763, 763, 95, 271,
459
- 265, 252, 245, 243, 245, 237, 228, 270, 257, 763,
460
-
461
- 121, 262, 0, 0, 0, 457, 0, 0, 237, 0,
462
- 0, 0, 0, 0, 0, 512, 238, 149, 132, 141,
463
- 0, 247, 210, 211, 192, 0, 206, 202, 155, 198,
464
- 198, 0, 227, 137, 228, 226, 0, 0, 0, 0,
465
- 0, 0, 0, 169, 281, 0, 567, 0, 179, 170,
466
- 174, 171, 128, 132, 0, 113, 151, 0, 0, 0,
467
- 600, 0, 0, 0, 108, 0, 0, 88, 0, 763,
468
- 74, 92, 0, 78, 61, 67, 63, 43, 0, 763,
469
- 635, 640, 652, 662, 674, 683, 693, 705, 714, 721,
470
- 730, 740, 750
471
-
472
- } ;
473
-
474
- static yyconst flex_int16_t yy_def[194] =
475
- { 0,
476
- 180, 1, 180, 180, 180, 180, 180, 181, 182, 183,
477
- 180, 184, 180, 180, 180, 181, 180, 16, 180, 185,
478
- 180, 180, 180, 180, 181, 181, 186, 187, 187, 180,
479
- 188, 180, 184, 33, 33, 33, 33, 33, 33, 33,
480
- 180, 180, 180, 180, 180, 181, 180, 182, 180, 182,
481
- 183, 33, 180, 33, 33, 180, 13, 180, 13, 189,
482
- 180, 180, 58, 13, 180, 181, 185, 185, 185, 185,
483
- 180, 180, 180, 180, 190, 180, 180, 181, 33, 186,
484
- 29, 180, 29, 180, 182, 188, 180, 180, 33, 33,
485
- 33, 33, 33, 33, 33, 33, 33, 191, 180, 180,
486
-
487
- 192, 180, 58, 58, 58, 180, 58, 58, 189, 61,
488
- 106, 61, 61, 106, 106, 13, 185, 180, 180, 180,
489
- 190, 180, 33, 33, 33, 33, 33, 33, 33, 33,
490
- 33, 33, 191, 192, 180, 192, 13, 106, 106, 106,
491
- 106, 106, 106, 116, 58, 145, 193, 33, 33, 33,
492
- 33, 33, 33, 33, 33, 33, 180, 145, 145, 145,
493
- 193, 161, 33, 33, 33, 33, 33, 33, 33, 180,
494
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 0,
495
- 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
496
- 180, 180, 180
497
-
498
- } ;
499
-
500
- static yyconst flex_int16_t yy_nxt[824] =
501
- { 0,
502
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
503
- 14, 15, 16, 17, 18, 19, 20, 21, 22, 22,
504
- 22, 23, 24, 25, 26, 8, 27, 28, 28, 28,
505
- 29, 28, 28, 30, 31, 32, 33, 33, 33, 34,
506
- 35, 33, 36, 33, 33, 33, 33, 37, 33, 33,
507
- 33, 38, 39, 40, 33, 33, 33, 41, 42, 43,
508
- 44, 44, 44, 44, 49, 47, 71, 47, 72, 72,
509
- 72, 72, 65, 65, 65, 65, 68, 47, 95, 44,
510
- 68, 44, 69, 100, 68, 89, 68, 76, 70, 179,
511
- 77, 96, 78, 50, 90, 68, 68, 68, 119, 119,
512
-
513
- 178, 52, 120, 120, 120, 52, 177, 53, 49, 52,
514
- 176, 52, 50, 52, 118, 118, 118, 118, 45, 52,
515
- 52, 52, 52, 52, 175, 53, 135, 52, 174, 52,
516
- 173, 52, 72, 72, 72, 72, 172, 50, 52, 52,
517
- 52, 71, 135, 72, 72, 72, 72, 123, 124, 119,
518
- 119, 55, 56, 57, 171, 136, 170, 58, 120, 120,
519
- 120, 57, 76, 57, 169, 57, 118, 118, 118, 118,
520
- 59, 136, 57, 57, 57, 60, 61, 61, 61, 61,
521
- 61, 61, 62, 168, 167, 63, 63, 63, 63, 63,
522
- 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
523
-
524
- 63, 63, 63, 63, 63, 63, 153, 64, 71, 154,
525
- 72, 72, 72, 72, 71, 166, 72, 72, 72, 72,
526
- 165, 73, 164, 163, 74, 75, 68, 64, 180, 76,
527
- 68, 73, 69, 157, 68, 76, 68, 47, 70, 156,
528
- 155, 152, 74, 151, 150, 68, 68, 68, 75, 81,
529
- 149, 148, 68, 81, 117, 82, 68, 81, 69, 81,
530
- 68, 81, 68, 180, 70, 137, 84, 47, 81, 81,
531
- 81, 68, 68, 68, 147, 147, 147, 147, 147, 147,
532
- 47, 81, 81, 85, 132, 158, 81, 131, 82, 159,
533
- 81, 130, 81, 158, 81, 158, 129, 158, 128, 84,
534
-
535
- 127, 81, 81, 81, 158, 158, 158, 126, 125, 87,
536
- 122, 180, 180, 180, 81, 55, 47, 160, 117, 55,
537
- 117, 82, 47, 55, 116, 55, 59, 55, 109, 102,
538
- 180, 101, 47, 99, 55, 55, 55, 98, 97, 94,
539
- 93, 92, 91, 88, 87, 80, 66, 55, 56, 103,
540
- 47, 180, 180, 104, 180, 180, 180, 103, 180, 103,
541
- 180, 103, 105, 105, 105, 105, 59, 180, 103, 103,
542
- 103, 60, 106, 106, 106, 106, 106, 106, 62, 180,
543
- 180, 107, 108, 108, 108, 108, 108, 108, 108, 108,
544
- 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
545
-
546
- 108, 108, 180, 64, 56, 110, 180, 180, 180, 111,
547
- 180, 180, 180, 110, 180, 110, 180, 110, 112, 112,
548
- 112, 112, 59, 180, 110, 110, 110, 60, 113, 113,
549
- 113, 113, 113, 113, 62, 180, 180, 114, 115, 115,
550
- 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
551
- 115, 115, 115, 115, 115, 115, 115, 115, 180, 64,
552
- 56, 138, 180, 180, 180, 139, 180, 180, 180, 138,
553
- 180, 138, 180, 138, 140, 140, 140, 140, 59, 180,
554
- 138, 138, 138, 60, 141, 141, 141, 141, 141, 141,
555
- 62, 180, 180, 142, 143, 143, 143, 143, 143, 143,
556
-
557
- 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
558
- 143, 143, 143, 143, 180, 64, 144, 180, 180, 180,
559
- 145, 180, 180, 180, 144, 180, 144, 180, 144, 180,
560
- 180, 180, 180, 180, 180, 144, 144, 144, 180, 180,
561
- 180, 180, 180, 180, 180, 180, 180, 180, 146, 180,
562
- 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
563
- 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
564
- 116, 161, 180, 180, 180, 161, 180, 180, 180, 161,
565
- 180, 161, 180, 161, 180, 180, 180, 180, 84, 180,
566
- 161, 161, 161, 180, 180, 180, 180, 180, 180, 180,
567
-
568
- 180, 180, 180, 161, 161, 180, 180, 180, 161, 180,
569
- 180, 180, 161, 180, 161, 180, 161, 180, 180, 180,
570
- 180, 84, 180, 161, 161, 161, 180, 180, 180, 180,
571
- 180, 180, 180, 180, 180, 180, 161, 46, 46, 46,
572
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
573
- 48, 48, 51, 180, 51, 51, 51, 51, 51, 51,
574
- 51, 51, 51, 51, 54, 54, 54, 54, 180, 180,
575
- 54, 54, 54, 54, 67, 180, 67, 67, 67, 67,
576
- 67, 67, 67, 67, 67, 67, 79, 180, 180, 180,
577
- 79, 180, 79, 79, 79, 83, 83, 83, 83, 83,
578
-
579
- 180, 83, 83, 83, 83, 86, 86, 86, 86, 86,
580
- 86, 86, 86, 86, 86, 86, 86, 63, 180, 180,
581
- 180, 63, 180, 63, 63, 63, 121, 180, 180, 180,
582
- 180, 121, 133, 133, 133, 180, 180, 180, 180, 133,
583
- 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
584
- 134, 134, 162, 162, 180, 162, 162, 180, 162, 162,
585
- 162, 162, 3, 180, 180, 180, 180, 180, 180, 180,
586
- 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
587
- 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
588
- 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
589
-
590
- 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
591
- 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
592
- 180, 180, 180
593
- } ;
594
-
595
- static yyconst flex_int16_t yy_chk[824] =
596
- { 0,
597
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
598
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
599
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
600
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
601
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
602
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
603
- 5, 7, 5, 7, 9, 16, 22, 25, 22, 22,
604
- 22, 22, 16, 16, 16, 16, 20, 26, 39, 44,
605
- 20, 44, 20, 48, 20, 34, 20, 22, 20, 178,
606
- 25, 39, 26, 9, 34, 20, 20, 20, 73, 73,
607
-
608
- 177, 52, 74, 74, 74, 52, 176, 52, 85, 52,
609
- 175, 52, 48, 52, 71, 71, 71, 71, 7, 12,
610
- 52, 52, 52, 12, 174, 12, 101, 12, 172, 12,
611
- 171, 12, 76, 76, 76, 76, 168, 85, 12, 12,
612
- 12, 65, 134, 65, 65, 65, 65, 89, 89, 119,
613
- 119, 12, 13, 13, 165, 101, 157, 13, 120, 120,
614
- 120, 13, 65, 13, 156, 13, 118, 118, 118, 118,
615
- 13, 134, 13, 13, 13, 13, 13, 13, 13, 13,
616
- 13, 13, 13, 154, 153, 13, 13, 13, 13, 13,
617
- 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
618
-
619
- 13, 13, 13, 13, 13, 13, 129, 13, 21, 129,
620
- 21, 21, 21, 21, 72, 152, 72, 72, 72, 72,
621
- 151, 21, 150, 149, 21, 21, 68, 144, 136, 21,
622
- 68, 21, 68, 135, 68, 72, 68, 133, 68, 131,
623
- 130, 128, 21, 127, 125, 68, 68, 68, 21, 28,
624
- 124, 123, 70, 28, 117, 28, 70, 28, 70, 28,
625
- 70, 28, 70, 109, 70, 102, 28, 99, 28, 28,
626
- 28, 70, 70, 70, 122, 122, 122, 122, 122, 122,
627
- 98, 28, 29, 29, 97, 145, 29, 96, 29, 145,
628
- 29, 95, 29, 145, 29, 145, 94, 145, 93, 29,
629
-
630
- 92, 29, 29, 29, 145, 145, 145, 91, 90, 86,
631
- 84, 83, 81, 80, 29, 33, 78, 145, 69, 33,
632
- 67, 33, 66, 33, 64, 33, 62, 33, 60, 56,
633
- 50, 49, 46, 45, 33, 33, 33, 42, 40, 38,
634
- 37, 36, 35, 32, 31, 27, 18, 33, 58, 58,
635
- 8, 3, 0, 58, 0, 0, 0, 58, 0, 58,
636
- 0, 58, 58, 58, 58, 58, 58, 0, 58, 58,
637
- 58, 58, 58, 58, 58, 58, 58, 58, 58, 0,
638
- 0, 58, 58, 58, 58, 58, 58, 58, 58, 58,
639
- 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
640
-
641
- 58, 58, 0, 58, 61, 61, 0, 0, 0, 61,
642
- 0, 0, 0, 61, 0, 61, 0, 61, 61, 61,
643
- 61, 61, 61, 0, 61, 61, 61, 61, 61, 61,
644
- 61, 61, 61, 61, 61, 0, 0, 61, 61, 61,
645
- 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
646
- 61, 61, 61, 61, 61, 61, 61, 61, 0, 61,
647
- 106, 106, 0, 0, 0, 106, 0, 0, 0, 106,
648
- 0, 106, 0, 106, 106, 106, 106, 106, 106, 0,
649
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
650
- 106, 0, 0, 106, 106, 106, 106, 106, 106, 106,
651
-
652
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
653
- 106, 106, 106, 106, 0, 106, 116, 0, 0, 0,
654
- 116, 0, 0, 0, 116, 0, 116, 0, 116, 0,
655
- 0, 0, 0, 0, 0, 116, 116, 116, 0, 0,
656
- 0, 0, 0, 0, 0, 0, 0, 0, 116, 0,
657
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
658
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
659
- 116, 147, 0, 0, 0, 147, 0, 0, 0, 147,
660
- 0, 147, 0, 147, 0, 0, 0, 0, 147, 0,
661
- 147, 147, 147, 0, 0, 0, 0, 0, 0, 0,
662
-
663
- 0, 0, 0, 147, 161, 0, 0, 0, 161, 0,
664
- 0, 0, 161, 0, 161, 0, 161, 0, 0, 0,
665
- 0, 161, 0, 161, 161, 161, 0, 0, 0, 0,
666
- 0, 0, 0, 0, 0, 0, 161, 181, 181, 181,
667
- 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
668
- 182, 182, 183, 0, 183, 183, 183, 183, 183, 183,
669
- 183, 183, 183, 183, 184, 184, 184, 184, 0, 0,
670
- 184, 184, 184, 184, 185, 0, 185, 185, 185, 185,
671
- 185, 185, 185, 185, 185, 185, 186, 0, 0, 0,
672
- 186, 0, 186, 186, 186, 187, 187, 187, 187, 187,
673
-
674
- 0, 187, 187, 187, 187, 188, 188, 188, 188, 188,
675
- 188, 188, 188, 188, 188, 188, 188, 189, 0, 0,
676
- 0, 189, 0, 189, 189, 189, 190, 0, 0, 0,
677
- 0, 190, 191, 191, 191, 0, 0, 0, 0, 191,
678
- 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
679
- 192, 192, 193, 193, 0, 193, 193, 0, 193, 193,
680
- 193, 193, 180, 180, 180, 180, 180, 180, 180, 180,
681
- 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
682
- 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
683
- 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
684
-
685
- 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
686
- 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
687
- 180, 180, 180
688
- } ;
689
-
690
- /* Table of booleans, true if rule could match eol. */
691
- static yyconst flex_int32_t yy_rule_can_match_eol[51] =
692
- { 0,
693
- 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
694
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
695
- 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, };
696
-
697
- static yy_state_type yy_last_accepting_state;
698
- static char *yy_last_accepting_cpos;
699
-
700
- extern int yy_flex_debug;
701
- int yy_flex_debug = 0;
702
-
703
- /* The intent behind this definition is that it'll catch
704
- * any uses of REJECT which flex missed.
705
- */
706
- #define REJECT reject_used_but_not_detected
707
- #define yymore() yymore_used_but_not_detected
708
- #define YY_MORE_ADJ 0
709
- #define YY_RESTORE_YY_MORE_OFFSET
710
- char *yytext;
711
- #line 1 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
712
- #line 2 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
713
- #include "ruby.h"
714
- #include "parser.h"
715
-
716
- int yyerror(char *s);
717
- #line 718 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.c"
718
-
719
- #define INITIAL 0
720
-
721
- #ifndef YY_NO_UNISTD_H
722
- /* Special case for "unistd.h", since it is non-ANSI. We include it way
723
- * down here because we want the user's section 1 to have been scanned first.
724
- * The user has a chance to override it with an option.
725
- */
726
- #include <unistd.h>
727
- #endif
728
-
729
- #ifndef YY_EXTRA_TYPE
730
- #define YY_EXTRA_TYPE void *
731
- #endif
732
-
733
- static int yy_init_globals (void );
734
-
735
- /* Accessor methods to globals.
736
- These are made visible to non-reentrant scanners for convenience. */
737
-
738
- int yylex_destroy (void );
739
-
740
- int yyget_debug (void );
741
-
742
- void yyset_debug (int debug_flag );
743
-
744
- YY_EXTRA_TYPE yyget_extra (void );
745
-
746
- void yyset_extra (YY_EXTRA_TYPE user_defined );
747
-
748
- FILE *yyget_in (void );
749
-
750
- void yyset_in (FILE * in_str );
751
-
752
- FILE *yyget_out (void );
753
-
754
- void yyset_out (FILE * out_str );
755
-
756
- yy_size_t yyget_leng (void );
757
-
758
- char *yyget_text (void );
759
-
760
- int yyget_lineno (void );
761
-
762
- void yyset_lineno (int line_number );
763
-
764
- /* Macros after this point can all be overridden by user definitions in
765
- * section 1.
766
- */
767
-
768
- #ifndef YY_SKIP_YYWRAP
769
- #ifdef __cplusplus
770
- extern "C" int yywrap (void );
771
- #else
772
- extern int yywrap (void );
773
- #endif
774
- #endif
775
-
776
- static void yyunput (int c,char *buf_ptr );
777
-
778
- #ifndef yytext_ptr
779
- static void yy_flex_strncpy (char *,yyconst char *,int );
780
- #endif
781
-
782
- #ifdef YY_NEED_STRLEN
783
- static int yy_flex_strlen (yyconst char * );
784
- #endif
785
-
786
- #ifndef YY_NO_INPUT
787
-
788
- #ifdef __cplusplus
789
- static int yyinput (void );
790
- #else
791
- static int input (void );
792
- #endif
793
-
794
- #endif
795
-
796
- /* Amount of stuff to slurp up with each read. */
797
- #ifndef YY_READ_BUF_SIZE
798
- #define YY_READ_BUF_SIZE 8192
799
- #endif
800
-
801
- /* Copy whatever the last rule matched to the standard output. */
802
- #ifndef ECHO
803
- /* This used to be an fputs(), but since the string might contain NUL's,
804
- * we now use fwrite().
805
- */
806
- #define ECHO fwrite( yytext, yyleng, 1, yyout )
807
- #endif
808
-
809
- /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
810
- * is returned in "result".
811
- */
812
- #ifndef YY_INPUT
813
- #define YY_INPUT(buf,result,max_size) \
814
- if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
815
- { \
816
- int c = '*'; \
817
- yy_size_t n; \
818
- for ( n = 0; n < max_size && \
819
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
820
- buf[n] = (char) c; \
821
- if ( c == '\n' ) \
822
- buf[n++] = (char) c; \
823
- if ( c == EOF && ferror( yyin ) ) \
824
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
825
- result = n; \
826
- } \
827
- else \
828
- { \
829
- errno=0; \
830
- while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
831
- { \
832
- if( errno != EINTR) \
833
- { \
834
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
835
- break; \
836
- } \
837
- errno=0; \
838
- clearerr(yyin); \
839
- } \
840
- }\
841
- \
842
-
843
- #endif
844
-
845
- /* No semi-colon after return; correct usage is to write "yyterminate();" -
846
- * we don't want an extra ';' after the "return" because that will cause
847
- * some compilers to complain about unreachable statements.
848
- */
849
- #ifndef yyterminate
850
- #define yyterminate() return YY_NULL
851
- #endif
852
-
853
- /* Number of entries by which start-condition stack grows. */
854
- #ifndef YY_START_STACK_INCR
855
- #define YY_START_STACK_INCR 25
856
- #endif
857
-
858
- /* Report a fatal error. */
859
- #ifndef YY_FATAL_ERROR
860
- #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
861
- #endif
862
-
863
- /* end tables serialization structures and prototypes */
864
-
865
- /* Default declaration of generated scanner - a define so the user can
866
- * easily add parameters.
867
- */
868
- #ifndef YY_DECL
869
- #define YY_DECL_IS_OURS 1
870
-
871
- extern int yylex (void);
872
-
873
- #define YY_DECL int yylex (void)
874
- #endif /* !YY_DECL */
875
-
876
- /* Code executed at the beginning of each rule, after yytext and yyleng
877
- * have been set up.
878
- */
879
- #ifndef YY_USER_ACTION
880
- #define YY_USER_ACTION
881
- #endif
882
-
883
- /* Code executed at the end of each rule. */
884
- #ifndef YY_BREAK
885
- #define YY_BREAK break;
886
- #endif
887
-
888
- #define YY_RULE_SETUP \
889
- YY_USER_ACTION
890
-
891
- /** The main scanner function which does all the work.
892
- */
893
- YY_DECL
894
- {
895
- register yy_state_type yy_current_state;
896
- register char *yy_cp, *yy_bp;
897
- register int yy_act;
898
-
899
- #line 68 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
900
-
901
-
902
- #line 903 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.c"
903
-
904
- if ( !(yy_init) )
905
- {
906
- (yy_init) = 1;
907
-
908
- #ifdef YY_USER_INIT
909
- YY_USER_INIT;
910
- #endif
911
-
912
- if ( ! (yy_start) )
913
- (yy_start) = 1; /* first start state */
914
-
915
- if ( ! yyin )
916
- yyin = stdin;
917
-
918
- if ( ! yyout )
919
- yyout = stdout;
920
-
921
- if ( ! YY_CURRENT_BUFFER ) {
922
- yyensure_buffer_stack ();
923
- YY_CURRENT_BUFFER_LVALUE =
924
- yy_create_buffer(yyin,YY_BUF_SIZE );
925
- }
926
-
927
- yy_load_buffer_state( );
928
- }
929
-
930
- while ( 1 ) /* loops until end-of-file is reached */
931
- {
932
- yy_cp = (yy_c_buf_p);
933
-
934
- /* Support of yytext. */
935
- *yy_cp = (yy_hold_char);
936
-
937
- /* yy_bp points to the position in yy_ch_buf of the start of
938
- * the current run.
939
- */
940
- yy_bp = yy_cp;
941
-
942
- yy_current_state = (yy_start);
943
- yy_match:
944
- do
945
- {
946
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
947
- if ( yy_accept[yy_current_state] )
948
- {
949
- (yy_last_accepting_state) = yy_current_state;
950
- (yy_last_accepting_cpos) = yy_cp;
951
- }
952
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
953
- {
954
- yy_current_state = (int) yy_def[yy_current_state];
955
- if ( yy_current_state >= 181 )
956
- yy_c = yy_meta[(unsigned int) yy_c];
957
- }
958
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
959
- ++yy_cp;
960
- }
961
- while ( yy_base[yy_current_state] != 763 );
962
-
963
- yy_find_action:
964
- yy_act = yy_accept[yy_current_state];
965
- if ( yy_act == 0 )
966
- { /* have to back up */
967
- yy_cp = (yy_last_accepting_cpos);
968
- yy_current_state = (yy_last_accepting_state);
969
- yy_act = yy_accept[yy_current_state];
970
- }
971
-
972
- YY_DO_BEFORE_ACTION;
973
-
974
- if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
975
- {
976
- yy_size_t yyl;
977
- for ( yyl = 0; yyl < yyleng; ++yyl )
978
- if ( yytext[yyl] == '\n' )
979
-
980
- yylineno++;
981
- ;
982
- }
983
-
984
- do_action: /* This label is used only to access EOF actions. */
985
-
986
- switch ( yy_act )
987
- { /* beginning of action switch */
988
- case 0: /* must back up */
989
- /* undo the effects of YY_DO_BEFORE_ACTION */
990
- *yy_cp = (yy_hold_char);
991
- yy_cp = (yy_last_accepting_cpos);
992
- yy_current_state = (yy_last_accepting_state);
993
- goto yy_find_action;
994
-
995
- case 1:
996
- YY_RULE_SETUP
997
- #line 70 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
998
- { return CLASS; }
999
- YY_BREAK
1000
- case 2:
1001
- YY_RULE_SETUP
1002
- #line 71 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1003
- { return DEF; }
1004
- YY_BREAK
1005
- case 3:
1006
- YY_RULE_SETUP
1007
- #line 72 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1008
- {
1009
- yylval.object = rb_str_new2(yytext);
1010
- return HEX_LITERAL;
1011
- }
1012
- YY_BREAK
1013
- case 4:
1014
- YY_RULE_SETUP
1015
- #line 76 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1016
- {
1017
- yylval.object = rb_str_new2(yytext);
1018
- return OCT_LITERAL;
1019
- }
1020
- YY_BREAK
1021
- case 5:
1022
- YY_RULE_SETUP
1023
- #line 80 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1024
- {
1025
- yylval.object = rb_str_new2(yytext);
1026
- return BIN_LITERAL;
1027
- }
1028
- YY_BREAK
1029
- case 6:
1030
- YY_RULE_SETUP
1031
- #line 84 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1032
- {
1033
- yylval.object = rb_str_new2(yytext);
1034
- return INTEGER_LITERAL;
1035
- }
1036
- YY_BREAK
1037
- case 7:
1038
- YY_RULE_SETUP
1039
- #line 88 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1040
- {
1041
- yylval.object = rb_str_new2(yytext);
1042
- return DOUBLE_LITERAL;
1043
- }
1044
- YY_BREAK
1045
- case 8:
1046
- /* rule 8 can match eol */
1047
- YY_RULE_SETUP
1048
- #line 92 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1049
- {
1050
- yylval.object = rb_str_new2(yytext);
1051
- return STRING_LITERAL;
1052
- }
1053
- YY_BREAK
1054
- case 9:
1055
- /* rule 9 can match eol */
1056
- YY_RULE_SETUP
1057
- #line 96 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1058
- {
1059
- yylval.object = rb_str_new2(yytext);
1060
- return MULTI_STRING_LITERAL;
1061
- }
1062
- YY_BREAK
1063
- case 10:
1064
- YY_RULE_SETUP
1065
- #line 100 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1066
- { return LPAREN; }
1067
- YY_BREAK
1068
- case 11:
1069
- YY_RULE_SETUP
1070
- #line 101 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1071
- { return RPAREN; }
1072
- YY_BREAK
1073
- case 12:
1074
- YY_RULE_SETUP
1075
- #line 102 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1076
- { return LCURLY; }
1077
- YY_BREAK
1078
- case 13:
1079
- YY_RULE_SETUP
1080
- #line 103 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1081
- { return RCURLY; }
1082
- YY_BREAK
1083
- case 14:
1084
- YY_RULE_SETUP
1085
- #line 104 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1086
- { return LBRACKET; }
1087
- YY_BREAK
1088
- case 15:
1089
- YY_RULE_SETUP
1090
- #line 105 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1091
- { return RBRACKET; }
1092
- YY_BREAK
1093
- case 16:
1094
- YY_RULE_SETUP
1095
- #line 106 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1096
- { return LEFTHASH; }
1097
- YY_BREAK
1098
- case 17:
1099
- YY_RULE_SETUP
1100
- #line 107 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1101
- { return RIGHTHASH; }
1102
- YY_BREAK
1103
- case 18:
1104
- YY_RULE_SETUP
1105
- #line 108 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1106
- { return STAB; }
1107
- YY_BREAK
1108
- case 19:
1109
- YY_RULE_SETUP
1110
- #line 109 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1111
- { return ARROW; }
1112
- YY_BREAK
1113
- case 20:
1114
- YY_RULE_SETUP
1115
- #line 110 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1116
- { return THIN_ARROW; }
1117
- YY_BREAK
1118
- case 21:
1119
- YY_RULE_SETUP
1120
- #line 111 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1121
- { return EQUALS; }
1122
- YY_BREAK
1123
- case 22:
1124
- YY_RULE_SETUP
1125
- #line 112 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1126
- {
1127
- yylval.object = rb_str_new2(yytext);
1128
- return OPERATOR;
1129
- }
1130
- YY_BREAK
1131
- case 23:
1132
- YY_RULE_SETUP
1133
- #line 116 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1134
- { return RETURN_LOCAL; }
1135
- YY_BREAK
1136
- case 24:
1137
- YY_RULE_SETUP
1138
- #line 117 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1139
- { return RETURN; }
1140
- YY_BREAK
1141
- case 25:
1142
- YY_RULE_SETUP
1143
- #line 118 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1144
- { return TRY; }
1145
- YY_BREAK
1146
- case 26:
1147
- YY_RULE_SETUP
1148
- #line 119 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1149
- { return CATCH; }
1150
- YY_BREAK
1151
- case 27:
1152
- YY_RULE_SETUP
1153
- #line 120 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1154
- { return FINALLY; }
1155
- YY_BREAK
1156
- case 28:
1157
- YY_RULE_SETUP
1158
- #line 121 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1159
- { return RETRY; }
1160
- YY_BREAK
1161
- case 29:
1162
- YY_RULE_SETUP
1163
- #line 122 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1164
- { return SUPER; }
1165
- YY_BREAK
1166
- case 30:
1167
- YY_RULE_SETUP
1168
- #line 123 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1169
- {
1170
- yylval.object = rb_str_new2(yytext);
1171
- return IDENTIFIER;
1172
- }
1173
- YY_BREAK
1174
- case 31:
1175
- YY_RULE_SETUP
1176
- #line 127 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1177
- {
1178
- return MATCH;
1179
- }
1180
- YY_BREAK
1181
- case 32:
1182
- YY_RULE_SETUP
1183
- #line 130 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1184
- {
1185
- return CASE;
1186
- }
1187
- YY_BREAK
1188
- case 33:
1189
- YY_RULE_SETUP
1190
- #line 133 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1191
- {
1192
- yylval.object = rb_str_new2(yytext);
1193
- return IDENTIFIER;
1194
- }
1195
- YY_BREAK
1196
- case 34:
1197
- YY_RULE_SETUP
1198
- #line 137 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1199
- {
1200
- yylval.object = rb_str_new2(yytext);
1201
- return RUBY_SEND_OPEN;
1202
- }
1203
- YY_BREAK
1204
- case 35:
1205
- YY_RULE_SETUP
1206
- #line 141 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1207
- {
1208
- yylval.object = rb_str_new2(yytext);
1209
- return RUBY_OPER_OPEN;
1210
- }
1211
- YY_BREAK
1212
- case 36:
1213
- YY_RULE_SETUP
1214
- #line 145 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1215
- {
1216
- yylval.object = rb_str_new2(yytext);
1217
- return CONSTANT;
1218
- }
1219
- YY_BREAK
1220
- case 37:
1221
- YY_RULE_SETUP
1222
- #line 149 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1223
- {
1224
- yylval.object = rb_str_new2(yytext);
1225
- return CONSTANT;
1226
- }
1227
- YY_BREAK
1228
- case 38:
1229
- YY_RULE_SETUP
1230
- #line 153 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1231
- {
1232
- yylval.object = rb_str_new2(yytext);
1233
- return SYMBOL_LITERAL;
1234
- }
1235
- YY_BREAK
1236
- case 39:
1237
- YY_RULE_SETUP
1238
- #line 157 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1239
- {
1240
- yylval.object = rb_str_new2(yytext);
1241
- return REGEX_LITERAL;
1242
- }
1243
- YY_BREAK
1244
- case 40:
1245
- YY_RULE_SETUP
1246
- #line 161 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1247
- { return COMMA; }
1248
- YY_BREAK
1249
- case 41:
1250
- YY_RULE_SETUP
1251
- #line 162 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1252
- { return SEMI; }
1253
- YY_BREAK
1254
- case 42:
1255
- YY_RULE_SETUP
1256
- #line 163 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1257
- { return COLON; }
1258
- YY_BREAK
1259
- case 43:
1260
- YY_RULE_SETUP
1261
- #line 164 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1262
- { return DOT; }
1263
- YY_BREAK
1264
- case 44:
1265
- YY_RULE_SETUP
1266
- #line 165 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1267
- { return DOLLAR; }
1268
- YY_BREAK
1269
- case 45:
1270
- YY_RULE_SETUP
1271
- #line 167 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1272
- {}
1273
- YY_BREAK
1274
- case 46:
1275
- YY_RULE_SETUP
1276
- #line 169 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1277
- {}
1278
- YY_BREAK
1279
- case 47:
1280
- /* rule 47 can match eol */
1281
- YY_RULE_SETUP
1282
- #line 170 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1283
- {}
1284
- YY_BREAK
1285
- case 48:
1286
- /* rule 48 can match eol */
1287
- YY_RULE_SETUP
1288
- #line 171 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1289
- { return NL; }
1290
- YY_BREAK
1291
- case 49:
1292
- YY_RULE_SETUP
1293
- #line 173 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1294
- { fprintf(stderr, "SCANNER %d", yyerror("")); exit(1); }
1295
- YY_BREAK
1296
- case 50:
1297
- YY_RULE_SETUP
1298
- #line 175 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"
1299
- ECHO;
1300
- YY_BREAK
1301
- #line 1302 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.c"
1302
- case YY_STATE_EOF(INITIAL):
1303
- yyterminate();
1304
-
1305
- case YY_END_OF_BUFFER:
1306
- {
1307
- /* Amount of text matched not including the EOB char. */
1308
- int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1309
-
1310
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
1311
- *yy_cp = (yy_hold_char);
1312
- YY_RESTORE_YY_MORE_OFFSET
1313
-
1314
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1315
- {
1316
- /* We're scanning a new file or input source. It's
1317
- * possible that this happened because the user
1318
- * just pointed yyin at a new source and called
1319
- * yylex(). If so, then we have to assure
1320
- * consistency between YY_CURRENT_BUFFER and our
1321
- * globals. Here is the right place to do so, because
1322
- * this is the first action (other than possibly a
1323
- * back-up) that will match for the new input source.
1324
- */
1325
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1326
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1327
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1328
- }
1329
-
1330
- /* Note that here we test for yy_c_buf_p "<=" to the position
1331
- * of the first EOB in the buffer, since yy_c_buf_p will
1332
- * already have been incremented past the NUL character
1333
- * (since all states make transitions on EOB to the
1334
- * end-of-buffer state). Contrast this with the test
1335
- * in input().
1336
- */
1337
- if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1338
- { /* This was really a NUL. */
1339
- yy_state_type yy_next_state;
1340
-
1341
- (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1342
-
1343
- yy_current_state = yy_get_previous_state( );
1344
-
1345
- /* Okay, we're now positioned to make the NUL
1346
- * transition. We couldn't have
1347
- * yy_get_previous_state() go ahead and do it
1348
- * for us because it doesn't know how to deal
1349
- * with the possibility of jamming (and we don't
1350
- * want to build jamming into it because then it
1351
- * will run more slowly).
1352
- */
1353
-
1354
- yy_next_state = yy_try_NUL_trans( yy_current_state );
1355
-
1356
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1357
-
1358
- if ( yy_next_state )
1359
- {
1360
- /* Consume the NUL. */
1361
- yy_cp = ++(yy_c_buf_p);
1362
- yy_current_state = yy_next_state;
1363
- goto yy_match;
1364
- }
1365
-
1366
- else
1367
- {
1368
- yy_cp = (yy_c_buf_p);
1369
- goto yy_find_action;
1370
- }
1371
- }
1372
-
1373
- else switch ( yy_get_next_buffer( ) )
1374
- {
1375
- case EOB_ACT_END_OF_FILE:
1376
- {
1377
- (yy_did_buffer_switch_on_eof) = 0;
1378
-
1379
- if ( yywrap( ) )
1380
- {
1381
- /* Note: because we've taken care in
1382
- * yy_get_next_buffer() to have set up
1383
- * yytext, we can now set up
1384
- * yy_c_buf_p so that if some total
1385
- * hoser (like flex itself) wants to
1386
- * call the scanner after we return the
1387
- * YY_NULL, it'll still work - another
1388
- * YY_NULL will get returned.
1389
- */
1390
- (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1391
-
1392
- yy_act = YY_STATE_EOF(YY_START);
1393
- goto do_action;
1394
- }
1395
-
1396
- else
1397
- {
1398
- if ( ! (yy_did_buffer_switch_on_eof) )
1399
- YY_NEW_FILE;
1400
- }
1401
- break;
1402
- }
1403
-
1404
- case EOB_ACT_CONTINUE_SCAN:
1405
- (yy_c_buf_p) =
1406
- (yytext_ptr) + yy_amount_of_matched_text;
1407
-
1408
- yy_current_state = yy_get_previous_state( );
1409
-
1410
- yy_cp = (yy_c_buf_p);
1411
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1412
- goto yy_match;
1413
-
1414
- case EOB_ACT_LAST_MATCH:
1415
- (yy_c_buf_p) =
1416
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1417
-
1418
- yy_current_state = yy_get_previous_state( );
1419
-
1420
- yy_cp = (yy_c_buf_p);
1421
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1422
- goto yy_find_action;
1423
- }
1424
- break;
1425
- }
1426
-
1427
- default:
1428
- YY_FATAL_ERROR(
1429
- "fatal flex scanner internal error--no action found" );
1430
- } /* end of action switch */
1431
- } /* end of scanning one token */
1432
- } /* end of yylex */
1433
-
1434
- /* yy_get_next_buffer - try to read in a new buffer
1435
- *
1436
- * Returns a code representing an action:
1437
- * EOB_ACT_LAST_MATCH -
1438
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1439
- * EOB_ACT_END_OF_FILE - end of file
1440
- */
1441
- static int yy_get_next_buffer (void)
1442
- {
1443
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1444
- register char *source = (yytext_ptr);
1445
- register int number_to_move, i;
1446
- int ret_val;
1447
-
1448
- if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1449
- YY_FATAL_ERROR(
1450
- "fatal flex scanner internal error--end of buffer missed" );
1451
-
1452
- if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1453
- { /* Don't try to fill the buffer, so this is an EOF. */
1454
- if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1455
- {
1456
- /* We matched a single character, the EOB, so
1457
- * treat this as a final EOF.
1458
- */
1459
- return EOB_ACT_END_OF_FILE;
1460
- }
1461
-
1462
- else
1463
- {
1464
- /* We matched some text prior to the EOB, first
1465
- * process it.
1466
- */
1467
- return EOB_ACT_LAST_MATCH;
1468
- }
1469
- }
1470
-
1471
- /* Try to read more data. */
1472
-
1473
- /* First move last chars to start of buffer. */
1474
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1475
-
1476
- for ( i = 0; i < number_to_move; ++i )
1477
- *(dest++) = *(source++);
1478
-
1479
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1480
- /* don't do the read, it's not guaranteed to return an EOF,
1481
- * just force an EOF
1482
- */
1483
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1484
-
1485
- else
1486
- {
1487
- yy_size_t num_to_read =
1488
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1489
-
1490
- while ( num_to_read <= 0 )
1491
- { /* Not enough room in the buffer - grow it. */
1492
-
1493
- /* just a shorter name for the current buffer */
1494
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1495
-
1496
- int yy_c_buf_p_offset =
1497
- (int) ((yy_c_buf_p) - b->yy_ch_buf);
1498
-
1499
- if ( b->yy_is_our_buffer )
1500
- {
1501
- yy_size_t new_size = b->yy_buf_size * 2;
1502
-
1503
- if ( new_size <= 0 )
1504
- b->yy_buf_size += b->yy_buf_size / 8;
1505
- else
1506
- b->yy_buf_size *= 2;
1507
-
1508
- b->yy_ch_buf = (char *)
1509
- /* Include room in for 2 EOB chars. */
1510
- yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1511
- }
1512
- else
1513
- /* Can't grow it, we don't own it. */
1514
- b->yy_ch_buf = 0;
1515
-
1516
- if ( ! b->yy_ch_buf )
1517
- YY_FATAL_ERROR(
1518
- "fatal error - scanner input buffer overflow" );
1519
-
1520
- (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1521
-
1522
- num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1523
- number_to_move - 1;
1524
-
1525
- }
1526
-
1527
- if ( num_to_read > YY_READ_BUF_SIZE )
1528
- num_to_read = YY_READ_BUF_SIZE;
1529
-
1530
- /* Read in more data. */
1531
- YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1532
- (yy_n_chars), num_to_read );
1533
-
1534
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1535
- }
1536
-
1537
- if ( (yy_n_chars) == 0 )
1538
- {
1539
- if ( number_to_move == YY_MORE_ADJ )
1540
- {
1541
- ret_val = EOB_ACT_END_OF_FILE;
1542
- yyrestart(yyin );
1543
- }
1544
-
1545
- else
1546
- {
1547
- ret_val = EOB_ACT_LAST_MATCH;
1548
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1549
- YY_BUFFER_EOF_PENDING;
1550
- }
1551
- }
1552
-
1553
- else
1554
- ret_val = EOB_ACT_CONTINUE_SCAN;
1555
-
1556
- if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1557
- /* Extend the array by 50%, plus the number we really need. */
1558
- yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1559
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1560
- if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1561
- YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1562
- }
1563
-
1564
- (yy_n_chars) += number_to_move;
1565
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1566
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1567
-
1568
- (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1569
-
1570
- return ret_val;
1571
- }
1572
-
1573
- /* yy_get_previous_state - get the state just before the EOB char was reached */
1574
-
1575
- static yy_state_type yy_get_previous_state (void)
1576
- {
1577
- register yy_state_type yy_current_state;
1578
- register char *yy_cp;
1579
-
1580
- yy_current_state = (yy_start);
1581
-
1582
- for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1583
- {
1584
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1585
- if ( yy_accept[yy_current_state] )
1586
- {
1587
- (yy_last_accepting_state) = yy_current_state;
1588
- (yy_last_accepting_cpos) = yy_cp;
1589
- }
1590
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1591
- {
1592
- yy_current_state = (int) yy_def[yy_current_state];
1593
- if ( yy_current_state >= 181 )
1594
- yy_c = yy_meta[(unsigned int) yy_c];
1595
- }
1596
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1597
- }
1598
-
1599
- return yy_current_state;
1600
- }
1601
-
1602
- /* yy_try_NUL_trans - try to make a transition on the NUL character
1603
- *
1604
- * synopsis
1605
- * next_state = yy_try_NUL_trans( current_state );
1606
- */
1607
- static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1608
- {
1609
- register int yy_is_jam;
1610
- register char *yy_cp = (yy_c_buf_p);
1611
-
1612
- register YY_CHAR yy_c = 1;
1613
- if ( yy_accept[yy_current_state] )
1614
- {
1615
- (yy_last_accepting_state) = yy_current_state;
1616
- (yy_last_accepting_cpos) = yy_cp;
1617
- }
1618
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1619
- {
1620
- yy_current_state = (int) yy_def[yy_current_state];
1621
- if ( yy_current_state >= 181 )
1622
- yy_c = yy_meta[(unsigned int) yy_c];
1623
- }
1624
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1625
- yy_is_jam = (yy_current_state == 180);
1626
-
1627
- return yy_is_jam ? 0 : yy_current_state;
1628
- }
1629
-
1630
- static void yyunput (int c, register char * yy_bp )
1631
- {
1632
- register char *yy_cp;
1633
-
1634
- yy_cp = (yy_c_buf_p);
1635
-
1636
- /* undo effects of setting up yytext */
1637
- *yy_cp = (yy_hold_char);
1638
-
1639
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1640
- { /* need to shift things up to make room */
1641
- /* +2 for EOB chars. */
1642
- register yy_size_t number_to_move = (yy_n_chars) + 2;
1643
- register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1644
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1645
- register char *source =
1646
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1647
-
1648
- while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1649
- *--dest = *--source;
1650
-
1651
- yy_cp += (int) (dest - source);
1652
- yy_bp += (int) (dest - source);
1653
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1654
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1655
-
1656
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1657
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
1658
- }
1659
-
1660
- *--yy_cp = (char) c;
1661
-
1662
- if ( c == '\n' ){
1663
- --yylineno;
1664
- }
1665
-
1666
- (yytext_ptr) = yy_bp;
1667
- (yy_hold_char) = *yy_cp;
1668
- (yy_c_buf_p) = yy_cp;
1669
- }
1670
-
1671
- #ifndef YY_NO_INPUT
1672
- #ifdef __cplusplus
1673
- static int yyinput (void)
1674
- #else
1675
- static int input (void)
1676
- #endif
1677
-
1678
- {
1679
- int c;
1680
-
1681
- *(yy_c_buf_p) = (yy_hold_char);
1682
-
1683
- if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1684
- {
1685
- /* yy_c_buf_p now points to the character we want to return.
1686
- * If this occurs *before* the EOB characters, then it's a
1687
- * valid NUL; if not, then we've hit the end of the buffer.
1688
- */
1689
- if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1690
- /* This was really a NUL. */
1691
- *(yy_c_buf_p) = '\0';
1692
-
1693
- else
1694
- { /* need more input */
1695
- yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1696
- ++(yy_c_buf_p);
1697
-
1698
- switch ( yy_get_next_buffer( ) )
1699
- {
1700
- case EOB_ACT_LAST_MATCH:
1701
- /* This happens because yy_g_n_b()
1702
- * sees that we've accumulated a
1703
- * token and flags that we need to
1704
- * try matching the token before
1705
- * proceeding. But for input(),
1706
- * there's no matching to consider.
1707
- * So convert the EOB_ACT_LAST_MATCH
1708
- * to EOB_ACT_END_OF_FILE.
1709
- */
1710
-
1711
- /* Reset buffer status. */
1712
- yyrestart(yyin );
1713
-
1714
- /*FALLTHROUGH*/
1715
-
1716
- case EOB_ACT_END_OF_FILE:
1717
- {
1718
- if ( yywrap( ) )
1719
- return 0;
1720
-
1721
- if ( ! (yy_did_buffer_switch_on_eof) )
1722
- YY_NEW_FILE;
1723
- #ifdef __cplusplus
1724
- return yyinput();
1725
- #else
1726
- return input();
1727
- #endif
1728
- }
1729
-
1730
- case EOB_ACT_CONTINUE_SCAN:
1731
- (yy_c_buf_p) = (yytext_ptr) + offset;
1732
- break;
1733
- }
1734
- }
1735
- }
1736
-
1737
- c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1738
- *(yy_c_buf_p) = '\0'; /* preserve yytext */
1739
- (yy_hold_char) = *++(yy_c_buf_p);
1740
-
1741
- if ( c == '\n' )
1742
-
1743
- yylineno++;
1744
- ;
1745
-
1746
- return c;
1747
- }
1748
- #endif /* ifndef YY_NO_INPUT */
1749
-
1750
- /** Immediately switch to a different input stream.
1751
- * @param input_file A readable stream.
1752
- *
1753
- * @note This function does not reset the start condition to @c INITIAL .
1754
- */
1755
- void yyrestart (FILE * input_file )
1756
- {
1757
-
1758
- if ( ! YY_CURRENT_BUFFER ){
1759
- yyensure_buffer_stack ();
1760
- YY_CURRENT_BUFFER_LVALUE =
1761
- yy_create_buffer(yyin,YY_BUF_SIZE );
1762
- }
1763
-
1764
- yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1765
- yy_load_buffer_state( );
1766
- }
1767
-
1768
- /** Switch to a different input buffer.
1769
- * @param new_buffer The new input buffer.
1770
- *
1771
- */
1772
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1773
- {
1774
-
1775
- /* TODO. We should be able to replace this entire function body
1776
- * with
1777
- * yypop_buffer_state();
1778
- * yypush_buffer_state(new_buffer);
1779
- */
1780
- yyensure_buffer_stack ();
1781
- if ( YY_CURRENT_BUFFER == new_buffer )
1782
- return;
1783
-
1784
- if ( YY_CURRENT_BUFFER )
1785
- {
1786
- /* Flush out information for old buffer. */
1787
- *(yy_c_buf_p) = (yy_hold_char);
1788
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1789
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1790
- }
1791
-
1792
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
1793
- yy_load_buffer_state( );
1794
-
1795
- /* We don't actually know whether we did this switch during
1796
- * EOF (yywrap()) processing, but the only time this flag
1797
- * is looked at is after yywrap() is called, so it's safe
1798
- * to go ahead and always set it.
1799
- */
1800
- (yy_did_buffer_switch_on_eof) = 1;
1801
- }
1802
-
1803
- static void yy_load_buffer_state (void)
1804
- {
1805
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1806
- (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1807
- yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1808
- (yy_hold_char) = *(yy_c_buf_p);
1809
- }
1810
-
1811
- /** Allocate and initialize an input buffer state.
1812
- * @param file A readable stream.
1813
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1814
- *
1815
- * @return the allocated buffer state.
1816
- */
1817
- YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1818
- {
1819
- YY_BUFFER_STATE b;
1820
-
1821
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1822
- if ( ! b )
1823
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1824
-
1825
- b->yy_buf_size = size;
1826
-
1827
- /* yy_ch_buf has to be 2 characters longer than the size given because
1828
- * we need to put in 2 end-of-buffer characters.
1829
- */
1830
- b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1831
- if ( ! b->yy_ch_buf )
1832
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1833
-
1834
- b->yy_is_our_buffer = 1;
1835
-
1836
- yy_init_buffer(b,file );
1837
-
1838
- return b;
1839
- }
1840
-
1841
- /** Destroy the buffer.
1842
- * @param b a buffer created with yy_create_buffer()
1843
- *
1844
- */
1845
- void yy_delete_buffer (YY_BUFFER_STATE b )
1846
- {
1847
-
1848
- if ( ! b )
1849
- return;
1850
-
1851
- if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1852
- YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1853
-
1854
- if ( b->yy_is_our_buffer )
1855
- yyfree((void *) b->yy_ch_buf );
1856
-
1857
- yyfree((void *) b );
1858
- }
1859
-
1860
- #ifndef __cplusplus
1861
- extern int isatty (int );
1862
- #endif /* __cplusplus */
1863
-
1864
- /* Initializes or reinitializes a buffer.
1865
- * This function is sometimes called more than once on the same buffer,
1866
- * such as during a yyrestart() or at EOF.
1867
- */
1868
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1869
-
1870
- {
1871
- int oerrno = errno;
1872
-
1873
- yy_flush_buffer(b );
1874
-
1875
- b->yy_input_file = file;
1876
- b->yy_fill_buffer = 1;
1877
-
1878
- /* If b is the current buffer, then yy_init_buffer was _probably_
1879
- * called from yyrestart() or through yy_get_next_buffer.
1880
- * In that case, we don't want to reset the lineno or column.
1881
- */
1882
- if (b != YY_CURRENT_BUFFER){
1883
- b->yy_bs_lineno = 1;
1884
- b->yy_bs_column = 0;
1885
- }
1886
-
1887
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1888
-
1889
- errno = oerrno;
1890
- }
1891
-
1892
- /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1893
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1894
- *
1895
- */
1896
- void yy_flush_buffer (YY_BUFFER_STATE b )
1897
- {
1898
- if ( ! b )
1899
- return;
1900
-
1901
- b->yy_n_chars = 0;
1902
-
1903
- /* We always need two end-of-buffer characters. The first causes
1904
- * a transition to the end-of-buffer state. The second causes
1905
- * a jam in that state.
1906
- */
1907
- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1908
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1909
-
1910
- b->yy_buf_pos = &b->yy_ch_buf[0];
1911
-
1912
- b->yy_at_bol = 1;
1913
- b->yy_buffer_status = YY_BUFFER_NEW;
1914
-
1915
- if ( b == YY_CURRENT_BUFFER )
1916
- yy_load_buffer_state( );
1917
- }
1918
-
1919
- /** Pushes the new state onto the stack. The new state becomes
1920
- * the current state. This function will allocate the stack
1921
- * if necessary.
1922
- * @param new_buffer The new state.
1923
- *
1924
- */
1925
- void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1926
- {
1927
- if (new_buffer == NULL)
1928
- return;
1929
-
1930
- yyensure_buffer_stack();
1931
-
1932
- /* This block is copied from yy_switch_to_buffer. */
1933
- if ( YY_CURRENT_BUFFER )
1934
- {
1935
- /* Flush out information for old buffer. */
1936
- *(yy_c_buf_p) = (yy_hold_char);
1937
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1938
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1939
- }
1940
-
1941
- /* Only push if top exists. Otherwise, replace top. */
1942
- if (YY_CURRENT_BUFFER)
1943
- (yy_buffer_stack_top)++;
1944
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
1945
-
1946
- /* copied from yy_switch_to_buffer. */
1947
- yy_load_buffer_state( );
1948
- (yy_did_buffer_switch_on_eof) = 1;
1949
- }
1950
-
1951
- /** Removes and deletes the top of the stack, if present.
1952
- * The next element becomes the new top.
1953
- *
1954
- */
1955
- void yypop_buffer_state (void)
1956
- {
1957
- if (!YY_CURRENT_BUFFER)
1958
- return;
1959
-
1960
- yy_delete_buffer(YY_CURRENT_BUFFER );
1961
- YY_CURRENT_BUFFER_LVALUE = NULL;
1962
- if ((yy_buffer_stack_top) > 0)
1963
- --(yy_buffer_stack_top);
1964
-
1965
- if (YY_CURRENT_BUFFER) {
1966
- yy_load_buffer_state( );
1967
- (yy_did_buffer_switch_on_eof) = 1;
1968
- }
1969
- }
1970
-
1971
- /* Allocates the stack if it does not exist.
1972
- * Guarantees space for at least one push.
1973
- */
1974
- static void yyensure_buffer_stack (void)
1975
- {
1976
- yy_size_t num_to_alloc;
1977
-
1978
- if (!(yy_buffer_stack)) {
1979
-
1980
- /* First allocation is just for 2 elements, since we don't know if this
1981
- * scanner will even need a stack. We use 2 instead of 1 to avoid an
1982
- * immediate realloc on the next call.
1983
- */
1984
- num_to_alloc = 1;
1985
- (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1986
- (num_to_alloc * sizeof(struct yy_buffer_state*)
1987
- );
1988
- if ( ! (yy_buffer_stack) )
1989
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1990
-
1991
- memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1992
-
1993
- (yy_buffer_stack_max) = num_to_alloc;
1994
- (yy_buffer_stack_top) = 0;
1995
- return;
1996
- }
1997
-
1998
- if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1999
-
2000
- /* Increase the buffer to prepare for a possible push. */
2001
- int grow_size = 8 /* arbitrary grow size */;
2002
-
2003
- num_to_alloc = (yy_buffer_stack_max) + grow_size;
2004
- (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2005
- ((yy_buffer_stack),
2006
- num_to_alloc * sizeof(struct yy_buffer_state*)
2007
- );
2008
- if ( ! (yy_buffer_stack) )
2009
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2010
-
2011
- /* zero only the new slots.*/
2012
- memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2013
- (yy_buffer_stack_max) = num_to_alloc;
2014
- }
2015
- }
2016
-
2017
- /** Setup the input buffer state to scan directly from a user-specified character buffer.
2018
- * @param base the character buffer
2019
- * @param size the size in bytes of the character buffer
2020
- *
2021
- * @return the newly allocated buffer state object.
2022
- */
2023
- YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2024
- {
2025
- YY_BUFFER_STATE b;
2026
-
2027
- if ( size < 2 ||
2028
- base[size-2] != YY_END_OF_BUFFER_CHAR ||
2029
- base[size-1] != YY_END_OF_BUFFER_CHAR )
2030
- /* They forgot to leave room for the EOB's. */
2031
- return 0;
2032
-
2033
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2034
- if ( ! b )
2035
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2036
-
2037
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2038
- b->yy_buf_pos = b->yy_ch_buf = base;
2039
- b->yy_is_our_buffer = 0;
2040
- b->yy_input_file = 0;
2041
- b->yy_n_chars = b->yy_buf_size;
2042
- b->yy_is_interactive = 0;
2043
- b->yy_at_bol = 1;
2044
- b->yy_fill_buffer = 0;
2045
- b->yy_buffer_status = YY_BUFFER_NEW;
2046
-
2047
- yy_switch_to_buffer(b );
2048
-
2049
- return b;
2050
- }
2051
-
2052
- /** Setup the input buffer state to scan a string. The next call to yylex() will
2053
- * scan from a @e copy of @a str.
2054
- * @param yystr a NUL-terminated string to scan
2055
- *
2056
- * @return the newly allocated buffer state object.
2057
- * @note If you want to scan bytes that may contain NUL values, then use
2058
- * yy_scan_bytes() instead.
2059
- */
2060
- YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
2061
- {
2062
-
2063
- return yy_scan_bytes(yystr,strlen(yystr) );
2064
- }
2065
-
2066
- /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2067
- * scan from a @e copy of @a bytes.
2068
- * @param bytes the byte buffer to scan
2069
- * @param len the number of bytes in the buffer pointed to by @a bytes.
2070
- *
2071
- * @return the newly allocated buffer state object.
2072
- */
2073
- YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
2074
- {
2075
- YY_BUFFER_STATE b;
2076
- char *buf;
2077
- yy_size_t n, i;
2078
-
2079
- /* Get memory for full buffer, including space for trailing EOB's. */
2080
- n = _yybytes_len + 2;
2081
- buf = (char *) yyalloc(n );
2082
- if ( ! buf )
2083
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2084
-
2085
- for ( i = 0; i < _yybytes_len; ++i )
2086
- buf[i] = yybytes[i];
2087
-
2088
- buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2089
-
2090
- b = yy_scan_buffer(buf,n );
2091
- if ( ! b )
2092
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2093
-
2094
- /* It's okay to grow etc. this buffer, and we should throw it
2095
- * away when we're done.
2096
- */
2097
- b->yy_is_our_buffer = 1;
2098
-
2099
- return b;
2100
- }
2101
-
2102
- #ifndef YY_EXIT_FAILURE
2103
- #define YY_EXIT_FAILURE 2
2104
- #endif
2105
-
2106
- static void yy_fatal_error (yyconst char* msg )
2107
- {
2108
- (void) fprintf( stderr, "%s\n", msg );
2109
- exit( YY_EXIT_FAILURE );
2110
- }
2111
-
2112
- /* Redefine yyless() so it works in section 3 code. */
2113
-
2114
- #undef yyless
2115
- #define yyless(n) \
2116
- do \
2117
- { \
2118
- /* Undo effects of setting up yytext. */ \
2119
- int yyless_macro_arg = (n); \
2120
- YY_LESS_LINENO(yyless_macro_arg);\
2121
- yytext[yyleng] = (yy_hold_char); \
2122
- (yy_c_buf_p) = yytext + yyless_macro_arg; \
2123
- (yy_hold_char) = *(yy_c_buf_p); \
2124
- *(yy_c_buf_p) = '\0'; \
2125
- yyleng = yyless_macro_arg; \
2126
- } \
2127
- while ( 0 )
2128
-
2129
- /* Accessor methods (get/set functions) to struct members. */
2130
-
2131
- /** Get the current line number.
2132
- *
2133
- */
2134
- int yyget_lineno (void)
2135
- {
2136
-
2137
- return yylineno;
2138
- }
2139
-
2140
- /** Get the input stream.
2141
- *
2142
- */
2143
- FILE *yyget_in (void)
2144
- {
2145
- return yyin;
2146
- }
2147
-
2148
- /** Get the output stream.
2149
- *
2150
- */
2151
- FILE *yyget_out (void)
2152
- {
2153
- return yyout;
2154
- }
2155
-
2156
- /** Get the length of the current token.
2157
- *
2158
- */
2159
- yy_size_t yyget_leng (void)
2160
- {
2161
- return yyleng;
2162
- }
2163
-
2164
- /** Get the current token.
2165
- *
2166
- */
2167
-
2168
- char *yyget_text (void)
2169
- {
2170
- return yytext;
2171
- }
2172
-
2173
- /** Set the current line number.
2174
- * @param line_number
2175
- *
2176
- */
2177
- void yyset_lineno (int line_number )
2178
- {
2179
-
2180
- yylineno = line_number;
2181
- }
2182
-
2183
- /** Set the input stream. This does not discard the current
2184
- * input buffer.
2185
- * @param in_str A readable stream.
2186
- *
2187
- * @see yy_switch_to_buffer
2188
- */
2189
- void yyset_in (FILE * in_str )
2190
- {
2191
- yyin = in_str ;
2192
- }
2193
-
2194
- void yyset_out (FILE * out_str )
2195
- {
2196
- yyout = out_str ;
2197
- }
2198
-
2199
- int yyget_debug (void)
2200
- {
2201
- return yy_flex_debug;
2202
- }
2203
-
2204
- void yyset_debug (int bdebug )
2205
- {
2206
- yy_flex_debug = bdebug ;
2207
- }
2208
-
2209
- static int yy_init_globals (void)
2210
- {
2211
- /* Initialization is the same as for the non-reentrant scanner.
2212
- * This function is called from yylex_destroy(), so don't allocate here.
2213
- */
2214
-
2215
- /* We do not touch yylineno unless the option is enabled. */
2216
- yylineno = 1;
2217
-
2218
- (yy_buffer_stack) = 0;
2219
- (yy_buffer_stack_top) = 0;
2220
- (yy_buffer_stack_max) = 0;
2221
- (yy_c_buf_p) = (char *) 0;
2222
- (yy_init) = 0;
2223
- (yy_start) = 0;
2224
-
2225
- /* Defined in main.c */
2226
- #ifdef YY_STDINIT
2227
- yyin = stdin;
2228
- yyout = stdout;
2229
- #else
2230
- yyin = (FILE *) 0;
2231
- yyout = (FILE *) 0;
2232
- #endif
2233
-
2234
- /* For future reference: Set errno on error, since we are called by
2235
- * yylex_init()
2236
- */
2237
- return 0;
2238
- }
2239
-
2240
- /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2241
- int yylex_destroy (void)
2242
- {
2243
-
2244
- /* Pop the buffer stack, destroying each element. */
2245
- while(YY_CURRENT_BUFFER){
2246
- yy_delete_buffer(YY_CURRENT_BUFFER );
2247
- YY_CURRENT_BUFFER_LVALUE = NULL;
2248
- yypop_buffer_state();
2249
- }
2250
-
2251
- /* Destroy the stack itself. */
2252
- yyfree((yy_buffer_stack) );
2253
- (yy_buffer_stack) = NULL;
2254
-
2255
- /* Reset the globals. This is important in a non-reentrant scanner so the next time
2256
- * yylex() is called, initialization will occur. */
2257
- yy_init_globals( );
2258
-
2259
- return 0;
2260
- }
2261
-
2262
- /*
2263
- * Internal utility routines.
2264
- */
2265
-
2266
- #ifndef yytext_ptr
2267
- static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2268
- {
2269
- register int i;
2270
- for ( i = 0; i < n; ++i )
2271
- s1[i] = s2[i];
2272
- }
2273
- #endif
2274
-
2275
- #ifdef YY_NEED_STRLEN
2276
- static int yy_flex_strlen (yyconst char * s )
2277
- {
2278
- register int n;
2279
- for ( n = 0; s[n]; ++n )
2280
- ;
2281
-
2282
- return n;
2283
- }
2284
- #endif
2285
-
2286
- void *yyalloc (yy_size_t size )
2287
- {
2288
- return (void *) malloc( size );
2289
- }
2290
-
2291
- void *yyrealloc (void * ptr, yy_size_t size )
2292
- {
2293
- /* The cast to (char *) in the following accommodates both
2294
- * implementations that use char* generic pointers, and those
2295
- * that use void* generic pointers. It works with the latter
2296
- * because both ANSI C and C++ allow castless assignment from
2297
- * any pointer type to void*, and deal with argument conversions
2298
- * as though doing an assignment.
2299
- */
2300
- return (void *) realloc( (char *) ptr, size );
2301
- }
2302
-
2303
- void yyfree (void * ptr )
2304
- {
2305
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2306
- }
2307
-
2308
- #define YYTABLES_NAME "yytables"
2309
-
2310
- #line 175 "/Users/backtype/projects/fancy/boot/rbx-compiler/parser/lexer.lex"