/src/rdkit/Code/GraphMol/SmilesParse/lex.yysmiles.cpp
Line | Count | Source |
1 | | |
2 | | #define YY_INT_ALIGNED short int |
3 | | |
4 | | /* A lexical scanner generated by flex */ |
5 | | |
6 | | #define FLEX_SCANNER |
7 | | #define YY_FLEX_MAJOR_VERSION 2 |
8 | | #define YY_FLEX_MINOR_VERSION 6 |
9 | | #define YY_FLEX_SUBMINOR_VERSION 4 |
10 | | #if YY_FLEX_SUBMINOR_VERSION > 0 |
11 | | #define FLEX_BETA |
12 | | #endif |
13 | | |
14 | | #ifdef yy_create_buffer |
15 | | #define yysmiles__create_buffer_ALREADY_DEFINED |
16 | | #else |
17 | 0 | #define yy_create_buffer yysmiles__create_buffer |
18 | | #endif |
19 | | |
20 | | #ifdef yy_delete_buffer |
21 | | #define yysmiles__delete_buffer_ALREADY_DEFINED |
22 | | #else |
23 | 223 | #define yy_delete_buffer yysmiles__delete_buffer |
24 | | #endif |
25 | | |
26 | | #ifdef yy_scan_buffer |
27 | | #define yysmiles__scan_buffer_ALREADY_DEFINED |
28 | | #else |
29 | 0 | #define yy_scan_buffer yysmiles__scan_buffer |
30 | | #endif |
31 | | |
32 | | #ifdef yy_scan_string |
33 | | #define yysmiles__scan_string_ALREADY_DEFINED |
34 | | #else |
35 | | #define yy_scan_string yysmiles__scan_string |
36 | | #endif |
37 | | |
38 | | #ifdef yy_scan_bytes |
39 | | #define yysmiles__scan_bytes_ALREADY_DEFINED |
40 | | #else |
41 | 0 | #define yy_scan_bytes yysmiles__scan_bytes |
42 | | #endif |
43 | | |
44 | | #ifdef yy_init_buffer |
45 | | #define yysmiles__init_buffer_ALREADY_DEFINED |
46 | | #else |
47 | 0 | #define yy_init_buffer yysmiles__init_buffer |
48 | | #endif |
49 | | |
50 | | #ifdef yy_flush_buffer |
51 | | #define yysmiles__flush_buffer_ALREADY_DEFINED |
52 | | #else |
53 | 0 | #define yy_flush_buffer yysmiles__flush_buffer |
54 | | #endif |
55 | | |
56 | | #ifdef yy_load_buffer_state |
57 | | #define yysmiles__load_buffer_state_ALREADY_DEFINED |
58 | | #else |
59 | 446 | #define yy_load_buffer_state yysmiles__load_buffer_state |
60 | | #endif |
61 | | |
62 | | #ifdef yy_switch_to_buffer |
63 | | #define yysmiles__switch_to_buffer_ALREADY_DEFINED |
64 | | #else |
65 | 223 | #define yy_switch_to_buffer yysmiles__switch_to_buffer |
66 | | #endif |
67 | | |
68 | | #ifdef yypush_buffer_state |
69 | | #define yysmiles_push_buffer_state_ALREADY_DEFINED |
70 | | #else |
71 | | #define yypush_buffer_state yysmiles_push_buffer_state |
72 | | #endif |
73 | | |
74 | | #ifdef yypop_buffer_state |
75 | | #define yysmiles_pop_buffer_state_ALREADY_DEFINED |
76 | | #else |
77 | 223 | #define yypop_buffer_state yysmiles_pop_buffer_state |
78 | | #endif |
79 | | |
80 | | #ifdef yyensure_buffer_stack |
81 | | #define yysmiles_ensure_buffer_stack_ALREADY_DEFINED |
82 | | #else |
83 | 223 | #define yyensure_buffer_stack yysmiles_ensure_buffer_stack |
84 | | #endif |
85 | | |
86 | | #ifdef yylex |
87 | | #define yysmiles_lex_ALREADY_DEFINED |
88 | | #else |
89 | | #define yylex yysmiles_lex |
90 | | #endif |
91 | | |
92 | | #ifdef yyrestart |
93 | | #define yysmiles_restart_ALREADY_DEFINED |
94 | | #else |
95 | 0 | #define yyrestart yysmiles_restart |
96 | | #endif |
97 | | |
98 | | #ifdef yylex_init |
99 | | #define yysmiles_lex_init_ALREADY_DEFINED |
100 | | #else |
101 | | #define yylex_init yysmiles_lex_init |
102 | | #endif |
103 | | |
104 | | #ifdef yylex_init_extra |
105 | | #define yysmiles_lex_init_extra_ALREADY_DEFINED |
106 | | #else |
107 | | #define yylex_init_extra yysmiles_lex_init_extra |
108 | | #endif |
109 | | |
110 | | #ifdef yylex_destroy |
111 | | #define yysmiles_lex_destroy_ALREADY_DEFINED |
112 | | #else |
113 | | #define yylex_destroy yysmiles_lex_destroy |
114 | | #endif |
115 | | |
116 | | #ifdef yyget_debug |
117 | | #define yysmiles_get_debug_ALREADY_DEFINED |
118 | | #else |
119 | | #define yyget_debug yysmiles_get_debug |
120 | | #endif |
121 | | |
122 | | #ifdef yyset_debug |
123 | | #define yysmiles_set_debug_ALREADY_DEFINED |
124 | | #else |
125 | | #define yyset_debug yysmiles_set_debug |
126 | | #endif |
127 | | |
128 | | #ifdef yyget_extra |
129 | | #define yysmiles_get_extra_ALREADY_DEFINED |
130 | | #else |
131 | | #define yyget_extra yysmiles_get_extra |
132 | | #endif |
133 | | |
134 | | #ifdef yyset_extra |
135 | | #define yysmiles_set_extra_ALREADY_DEFINED |
136 | | #else |
137 | 0 | #define yyset_extra yysmiles_set_extra |
138 | | #endif |
139 | | |
140 | | #ifdef yyget_in |
141 | | #define yysmiles_get_in_ALREADY_DEFINED |
142 | | #else |
143 | | #define yyget_in yysmiles_get_in |
144 | | #endif |
145 | | |
146 | | #ifdef yyset_in |
147 | | #define yysmiles_set_in_ALREADY_DEFINED |
148 | | #else |
149 | | #define yyset_in yysmiles_set_in |
150 | | #endif |
151 | | |
152 | | #ifdef yyget_out |
153 | | #define yysmiles_get_out_ALREADY_DEFINED |
154 | | #else |
155 | | #define yyget_out yysmiles_get_out |
156 | | #endif |
157 | | |
158 | | #ifdef yyset_out |
159 | | #define yysmiles_set_out_ALREADY_DEFINED |
160 | | #else |
161 | | #define yyset_out yysmiles_set_out |
162 | | #endif |
163 | | |
164 | | #ifdef yyget_leng |
165 | | #define yysmiles_get_leng_ALREADY_DEFINED |
166 | | #else |
167 | | #define yyget_leng yysmiles_get_leng |
168 | | #endif |
169 | | |
170 | | #ifdef yyget_text |
171 | | #define yysmiles_get_text_ALREADY_DEFINED |
172 | | #else |
173 | | #define yyget_text yysmiles_get_text |
174 | | #endif |
175 | | |
176 | | #ifdef yyget_lineno |
177 | | #define yysmiles_get_lineno_ALREADY_DEFINED |
178 | | #else |
179 | | #define yyget_lineno yysmiles_get_lineno |
180 | | #endif |
181 | | |
182 | | #ifdef yyset_lineno |
183 | | #define yysmiles_set_lineno_ALREADY_DEFINED |
184 | | #else |
185 | | #define yyset_lineno yysmiles_set_lineno |
186 | | #endif |
187 | | |
188 | | #ifdef yyget_column |
189 | | #define yysmiles_get_column_ALREADY_DEFINED |
190 | | #else |
191 | | #define yyget_column yysmiles_get_column |
192 | | #endif |
193 | | |
194 | | #ifdef yyset_column |
195 | | #define yysmiles_set_column_ALREADY_DEFINED |
196 | | #else |
197 | | #define yyset_column yysmiles_set_column |
198 | | #endif |
199 | | |
200 | | #ifdef yywrap |
201 | | #define yysmiles_wrap_ALREADY_DEFINED |
202 | | #else |
203 | 211 | #define yywrap yysmiles_wrap |
204 | | #endif |
205 | | |
206 | | #ifdef yyget_lval |
207 | | #define yysmiles_get_lval_ALREADY_DEFINED |
208 | | #else |
209 | | #define yyget_lval yysmiles_get_lval |
210 | | #endif |
211 | | |
212 | | #ifdef yyset_lval |
213 | | #define yysmiles_set_lval_ALREADY_DEFINED |
214 | | #else |
215 | | #define yyset_lval yysmiles_set_lval |
216 | | #endif |
217 | | |
218 | | #ifdef yyalloc |
219 | | #define yysmiles_alloc_ALREADY_DEFINED |
220 | | #else |
221 | 669 | #define yyalloc yysmiles_alloc |
222 | | #endif |
223 | | |
224 | | #ifdef yyrealloc |
225 | | #define yysmiles_realloc_ALREADY_DEFINED |
226 | | #else |
227 | 0 | #define yyrealloc yysmiles_realloc |
228 | | #endif |
229 | | |
230 | | #ifdef yyfree |
231 | | #define yysmiles_free_ALREADY_DEFINED |
232 | | #else |
233 | 1.11k | #define yyfree yysmiles_free |
234 | | #endif |
235 | | |
236 | | /* First, we deal with platform-specific or compiler-specific issues. */ |
237 | | |
238 | | /* begin standard C headers. */ |
239 | | #include <stdio.h> |
240 | | #include <string.h> |
241 | | #include <errno.h> |
242 | | #include <stdlib.h> |
243 | | |
244 | | /* end standard C headers. */ |
245 | | |
246 | | /* flex integer type definitions */ |
247 | | |
248 | | #ifndef FLEXINT_H |
249 | | #define FLEXINT_H |
250 | | |
251 | | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
252 | | |
253 | | #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
254 | | |
255 | | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
256 | | * if you want the limit (max/min) macros for int types. |
257 | | */ |
258 | | #ifndef __STDC_LIMIT_MACROS |
259 | | #define __STDC_LIMIT_MACROS 1 |
260 | | #endif |
261 | | |
262 | | #include <inttypes.h> |
263 | | typedef int8_t flex_int8_t; |
264 | | typedef uint8_t flex_uint8_t; |
265 | | typedef int16_t flex_int16_t; |
266 | | typedef uint16_t flex_uint16_t; |
267 | | typedef int32_t flex_int32_t; |
268 | | typedef uint32_t flex_uint32_t; |
269 | | #else |
270 | | typedef signed char flex_int8_t; |
271 | | typedef short int flex_int16_t; |
272 | | typedef int flex_int32_t; |
273 | | typedef unsigned char flex_uint8_t; |
274 | | typedef unsigned short int flex_uint16_t; |
275 | | typedef unsigned int flex_uint32_t; |
276 | | |
277 | | /* Limits of integral types. */ |
278 | | #ifndef INT8_MIN |
279 | | #define INT8_MIN (-128) |
280 | | #endif |
281 | | #ifndef INT16_MIN |
282 | | #define INT16_MIN (-32767-1) |
283 | | #endif |
284 | | #ifndef INT32_MIN |
285 | | #define INT32_MIN (-2147483647-1) |
286 | | #endif |
287 | | #ifndef INT8_MAX |
288 | | #define INT8_MAX (127) |
289 | | #endif |
290 | | #ifndef INT16_MAX |
291 | | #define INT16_MAX (32767) |
292 | | #endif |
293 | | #ifndef INT32_MAX |
294 | | #define INT32_MAX (2147483647) |
295 | | #endif |
296 | | #ifndef UINT8_MAX |
297 | | #define UINT8_MAX (255U) |
298 | | #endif |
299 | | #ifndef UINT16_MAX |
300 | | #define UINT16_MAX (65535U) |
301 | | #endif |
302 | | #ifndef UINT32_MAX |
303 | | #define UINT32_MAX (4294967295U) |
304 | | #endif |
305 | | |
306 | | #ifndef SIZE_MAX |
307 | | #define SIZE_MAX (~(size_t)0) |
308 | | #endif |
309 | | |
310 | | #endif /* ! C99 */ |
311 | | |
312 | | #endif /* ! FLEXINT_H */ |
313 | | |
314 | | /* begin standard C++ headers. */ |
315 | | |
316 | | /* TODO: this is always defined, so inline it */ |
317 | 223 | #define yyconst const |
318 | | |
319 | | #if defined(__GNUC__) && __GNUC__ >= 3 |
320 | | #define yynoreturn __attribute__((__noreturn__)) |
321 | | #else |
322 | | #define yynoreturn |
323 | | #endif |
324 | | |
325 | | /* Returned upon end-of-file. */ |
326 | | #define YY_NULL 0 |
327 | | |
328 | | /* Promotes a possibly negative, possibly signed char to an |
329 | | * integer in range [0..255] for use as an array index. |
330 | | */ |
331 | 45.0M | #define YY_SC_TO_UI(c) ((YY_CHAR) (c)) |
332 | | |
333 | | /* An opaque pointer. */ |
334 | | #ifndef YY_TYPEDEF_YY_SCANNER_T |
335 | | #define YY_TYPEDEF_YY_SCANNER_T |
336 | | typedef void* yyscan_t; |
337 | | #endif |
338 | | |
339 | | /* For convenience, these vars (plus the bison vars far below) |
340 | | are macros in the reentrant scanner. */ |
341 | 1.55k | #define yyin yyg->yyin_r |
342 | 892 | #define yyout yyg->yyout_r |
343 | 0 | #define yyextra yyg->yyextra_r |
344 | 44.9M | #define yyleng yyg->yyleng_r |
345 | 2.39M | #define yytext yyg->yytext_r |
346 | 0 | #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) |
347 | 0 | #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) |
348 | 0 | #define yy_flex_debug yyg->yy_flex_debug_r |
349 | | |
350 | | /* Enter a start condition. This macro really ought to take a parameter, |
351 | | * but we do it the disgusting crufty way forced on us by the ()-less |
352 | | * definition of BEGIN. |
353 | | */ |
354 | 1.28M | #define BEGIN yyg->yy_start = 1 + 2 * |
355 | | /* Translate the current start state into a value that can be later handed |
356 | | * to BEGIN to return to the state. The YYSTATE alias is for lex |
357 | | * compatibility. |
358 | | */ |
359 | | #define YY_START ((yyg->yy_start - 1) / 2) |
360 | | #define YYSTATE YY_START |
361 | | /* Action number for EOF rule of a given start state. */ |
362 | 622 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
363 | | /* Special action meaning "start processing a new file". */ |
364 | 0 | #define YY_NEW_FILE yyrestart( yyin , yyscanner ) |
365 | 892 | #define YY_END_OF_BUFFER_CHAR 0 |
366 | | |
367 | | /* Size of default input buffer. */ |
368 | | #ifndef YY_BUF_SIZE |
369 | | #ifdef __ia64__ |
370 | | /* On IA-64, the buffer size is 16k, not 8k. |
371 | | * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. |
372 | | * Ditto for the __ia64__ case accordingly. |
373 | | */ |
374 | | #define YY_BUF_SIZE 32768 |
375 | | #else |
376 | 0 | #define YY_BUF_SIZE 16384 |
377 | | #endif /* __ia64__ */ |
378 | | #endif |
379 | | |
380 | | /* The state buf must be large enough to hold one state per character in the main buffer. |
381 | | */ |
382 | | #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
383 | | |
384 | | #ifndef YY_TYPEDEF_YY_BUFFER_STATE |
385 | | #define YY_TYPEDEF_YY_BUFFER_STATE |
386 | | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
387 | | #endif |
388 | | |
389 | | #ifndef YY_TYPEDEF_YY_SIZE_T |
390 | | #define YY_TYPEDEF_YY_SIZE_T |
391 | | typedef size_t yy_size_t; |
392 | | #endif |
393 | | |
394 | 0 | #define EOB_ACT_CONTINUE_SCAN 0 |
395 | 422 | #define EOB_ACT_END_OF_FILE 1 |
396 | 422 | #define EOB_ACT_LAST_MATCH 2 |
397 | | |
398 | | #define YY_LESS_LINENO(n) |
399 | | #define YY_LINENO_REWIND_TO(ptr) |
400 | | |
401 | | /* Return all but the first "n" matched characters back to the input stream. */ |
402 | | #define yyless(n) \ |
403 | | do \ |
404 | | { \ |
405 | | /* Undo effects of setting up yytext. */ \ |
406 | | int yyless_macro_arg = (n); \ |
407 | | YY_LESS_LINENO(yyless_macro_arg);\ |
408 | | *yy_cp = yyg->yy_hold_char; \ |
409 | | YY_RESTORE_YY_MORE_OFFSET \ |
410 | | yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
411 | | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
412 | | } \ |
413 | | while ( 0 ) |
414 | | #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) |
415 | | |
416 | | #ifndef YY_STRUCT_YY_BUFFER_STATE |
417 | | #define YY_STRUCT_YY_BUFFER_STATE |
418 | | struct yy_buffer_state |
419 | | { |
420 | | FILE *yy_input_file; |
421 | | |
422 | | char *yy_ch_buf; /* input buffer */ |
423 | | char *yy_buf_pos; /* current position in input buffer */ |
424 | | |
425 | | /* Size of input buffer in bytes, not including room for EOB |
426 | | * characters. |
427 | | */ |
428 | | int yy_buf_size; |
429 | | |
430 | | /* Number of characters read into yy_ch_buf, not including EOB |
431 | | * characters. |
432 | | */ |
433 | | int yy_n_chars; |
434 | | |
435 | | /* Whether we "own" the buffer - i.e., we know we created it, |
436 | | * and can realloc() it to grow it, and should free() it to |
437 | | * delete it. |
438 | | */ |
439 | | int yy_is_our_buffer; |
440 | | |
441 | | /* Whether this is an "interactive" input source; if so, and |
442 | | * if we're using stdio for input, then we want to use getc() |
443 | | * instead of fread(), to make sure we stop fetching input after |
444 | | * each newline. |
445 | | */ |
446 | | int yy_is_interactive; |
447 | | |
448 | | /* Whether we're considered to be at the beginning of a line. |
449 | | * If so, '^' rules will be active on the next match, otherwise |
450 | | * not. |
451 | | */ |
452 | | int yy_at_bol; |
453 | | |
454 | | int yy_bs_lineno; /**< The line count. */ |
455 | | int yy_bs_column; /**< The column count. */ |
456 | | |
457 | | /* Whether to try to fill the input buffer when we reach the |
458 | | * end of it. |
459 | | */ |
460 | | int yy_fill_buffer; |
461 | | |
462 | | int yy_buffer_status; |
463 | | |
464 | 6.42M | #define YY_BUFFER_NEW 0 |
465 | 214 | #define YY_BUFFER_NORMAL 1 |
466 | | /* When an EOF's been seen but there's still some text to process |
467 | | * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
468 | | * shouldn't try reading from the input source any more. We might |
469 | | * still have a bunch of tokens to match, though, because of |
470 | | * possible backing-up. |
471 | | * |
472 | | * When we actually see the EOF, we change the status to "new" |
473 | | * (via yyrestart()), so that the user can continue scanning by |
474 | | * just pointing yyin at a new input file. |
475 | | */ |
476 | 0 | #define YY_BUFFER_EOF_PENDING 2 |
477 | | |
478 | | }; |
479 | | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
480 | | |
481 | | /* We provide macros for accessing buffer states in case in the |
482 | | * future we want to put the buffer states in a more general |
483 | | * "scanner state". |
484 | | * |
485 | | * Returns the top of the stack, or NULL. |
486 | | */ |
487 | 1.78k | #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ |
488 | 1.78k | ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ |
489 | 1.78k | : NULL) |
490 | | /* Same as previous macro, but useful when we know that the buffer stack is not |
491 | | * NULL or when we need an lvalue. For internal use only. |
492 | | */ |
493 | 12.8M | #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] |
494 | | |
495 | | void yyrestart ( FILE *input_file , yyscan_t yyscanner ); |
496 | | void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
497 | | YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); |
498 | | void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
499 | | void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
500 | | void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
501 | | void yypop_buffer_state ( yyscan_t yyscanner ); |
502 | | |
503 | | static void yyensure_buffer_stack ( yyscan_t yyscanner ); |
504 | | static void yy_load_buffer_state ( yyscan_t yyscanner ); |
505 | | static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); |
506 | | #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) |
507 | | |
508 | | YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); |
509 | | YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); |
510 | | YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); |
511 | | |
512 | | void *yyalloc ( yy_size_t , yyscan_t yyscanner ); |
513 | | void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); |
514 | | void yyfree ( void * , yyscan_t yyscanner ); |
515 | | |
516 | | #define yy_new_buffer yy_create_buffer |
517 | | #define yy_set_interactive(is_interactive) \ |
518 | | { \ |
519 | | if ( ! YY_CURRENT_BUFFER ){ \ |
520 | | yyensure_buffer_stack (yyscanner); \ |
521 | | YY_CURRENT_BUFFER_LVALUE = \ |
522 | | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
523 | | } \ |
524 | | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
525 | | } |
526 | | #define yy_set_bol(at_bol) \ |
527 | | { \ |
528 | | if ( ! YY_CURRENT_BUFFER ){\ |
529 | | yyensure_buffer_stack (yyscanner); \ |
530 | | YY_CURRENT_BUFFER_LVALUE = \ |
531 | | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
532 | | } \ |
533 | | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
534 | | } |
535 | | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
536 | | |
537 | | /* Begin user sect3 */ |
538 | | |
539 | 211 | #define yysmiles_wrap(yyscanner) (/*CONSTCOND*/1) |
540 | | #define YY_SKIP_YYWRAP |
541 | | typedef flex_uint8_t YY_CHAR; |
542 | | |
543 | | typedef int yy_state_type; |
544 | | |
545 | 51.3M | #define yytext_ptr yytext_r |
546 | | |
547 | | static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); |
548 | | static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); |
549 | | static int yy_get_next_buffer ( yyscan_t yyscanner ); |
550 | | static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); |
551 | | |
552 | | /* Done after the current pattern has been matched and before the |
553 | | * corresponding action - sets up yytext. |
554 | | */ |
555 | | #define YY_DO_BEFORE_ACTION \ |
556 | 25.6M | yyg->yytext_ptr = yy_bp; \ |
557 | 25.6M | yyleng = (int) (yy_cp - yy_bp); \ |
558 | 25.6M | yyg->yy_hold_char = *yy_cp; \ |
559 | 25.6M | *yy_cp = '\0'; \ |
560 | 25.6M | yyg->yy_c_buf_p = yy_cp; |
561 | | #define YY_NUM_RULES 183 |
562 | 6.42M | #define YY_END_OF_BUFFER 184 |
563 | | /* This struct is not used in this scanner, |
564 | | but its presence is necessary. */ |
565 | | struct yy_trans_info |
566 | | { |
567 | | flex_int32_t yy_verify; |
568 | | flex_int32_t yy_nxt; |
569 | | }; |
570 | | static const flex_int16_t yy_accept[247] = |
571 | | { 0, |
572 | | 0, 0, 0, 0, 184, 182, 181, 163, 165, 178, |
573 | | 173, 174, 144, 172, 171, 177, 170, 179, 180, 164, |
574 | | 182, 162, 6, 123, 124, 129, 133, 132, 125, 126, |
575 | | 127, 128, 175, 169, 134, 135, 136, 137, 138, 139, |
576 | | 168, 146, 182, 145, 182, 123, 124, 182, 182, 129, |
577 | | 182, 133, 132, 16, 182, 182, 125, 126, 127, 182, |
578 | | 128, 182, 87, 20, 69, 182, 35, 182, 176, 182, |
579 | | 139, 182, 166, 167, 0, 0, 0, 0, 0, 131, |
580 | | 130, 169, 0, 0, 0, 0, 0, 0, 0, 0, |
581 | | 0, 0, 0, 0, 84, 43, 13, 90, 15, 30, |
582 | | |
583 | | 80, 74, 51, 9, 102, 78, 92, 17, 44, 53, |
584 | | 93, 91, 107, 24, 21, 50, 26, 100, 105, 61, |
585 | | 63, 94, 58, 23, 109, 95, 82, 28, 59, 29, |
586 | | 7, 67, 75, 62, 103, 45, 72, 32, 52, 8, |
587 | | 98, 66, 111, 110, 96, 12, 22, 38, 104, 11, |
588 | | 37, 55, 10, 108, 25, 97, 88, 113, 71, 86, |
589 | | 77, 42, 56, 79, 54, 73, 89, 83, 33, 70, |
590 | | 99, 106, 41, 81, 40, 47, 18, 31, 101, 14, |
591 | | 57, 46, 34, 68, 60, 39, 48, 85, 19, 76, |
592 | | 64, 112, 0, 49, 65, 27, 36, 141, 142, 140, |
593 | | |
594 | | 143, 2, 5, 3, 4, 1, 0, 0, 0, 0, |
595 | | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
596 | | 0, 116, 120, 114, 122, 119, 118, 121, 117, 115, |
597 | | 150, 155, 148, 153, 157, 151, 159, 158, 152, 156, |
598 | | 161, 147, 154, 149, 160, 0 |
599 | | } ; |
600 | | |
601 | | static const YY_CHAR yy_ec[256] = |
602 | | { 0, |
603 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, |
604 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
605 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
606 | | 1, 3, 1, 1, 4, 5, 6, 1, 7, 8, |
607 | | 9, 10, 11, 1, 12, 13, 14, 15, 16, 16, |
608 | | 16, 16, 16, 16, 16, 16, 16, 17, 1, 18, |
609 | | 19, 20, 1, 21, 22, 23, 24, 25, 26, 27, |
610 | | 28, 29, 30, 1, 31, 32, 33, 34, 35, 36, |
611 | | 1, 37, 38, 39, 40, 41, 42, 43, 44, 45, |
612 | | 46, 47, 48, 1, 1, 1, 49, 50, 51, 52, |
613 | | |
614 | | 53, 54, 55, 56, 57, 1, 58, 59, 60, 61, |
615 | | 62, 63, 64, 65, 66, 67, 68, 69, 1, 1, |
616 | | 70, 1, 1, 1, 1, 71, 1, 1, 1, 1, |
617 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
618 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
619 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
620 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
621 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
622 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
623 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
624 | | |
625 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
626 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
627 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
628 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
629 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
630 | | 1, 1, 1, 1, 1 |
631 | | } ; |
632 | | |
633 | | static const YY_CHAR yy_meta[72] = |
634 | | { 0, |
635 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
636 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
637 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
638 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
639 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
640 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
641 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
642 | | 1 |
643 | | } ; |
644 | | |
645 | | static const flex_int16_t yy_base[247] = |
646 | | { 0, |
647 | | 0, 0, 68, 0, 283, 286, 286, 286, 286, 286, |
648 | | 286, 286, 286, 286, 262, 286, 286, 286, 286, 286, |
649 | | 268, 286, 111, 214, 219, 286, 286, 286, 286, 286, |
650 | | 286, 286, 286, 230, 286, 286, 286, 286, 286, 286, |
651 | | 286, 286, 128, 286, 64, 24, 119, 70, 18, 117, |
652 | | 73, 135, 13, 208, 126, 141, 157, 21, 166, 186, |
653 | | 195, 88, 199, 286, 286, 213, 215, 139, 286, 197, |
654 | | 164, 209, 286, 286, 246, 229, 230, 221, 98, 286, |
655 | | 286, 286, 195, 183, 92, 184, 172, 168, 92, 176, |
656 | | 175, 144, 174, 161, 286, 286, 286, 286, 286, 286, |
657 | | |
658 | | 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, |
659 | | 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, |
660 | | 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, |
661 | | 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, |
662 | | 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, |
663 | | 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, |
664 | | 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, |
665 | | 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, |
666 | | 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, |
667 | | 286, 286, 208, 286, 286, 286, 286, 286, 286, 286, |
668 | | |
669 | | 286, 286, 286, 286, 286, 286, 218, 217, 216, 215, |
670 | | 205, 204, 198, 179, 167, 162, 157, 149, 121, 81, |
671 | | 72, 286, 286, 286, 286, 286, 286, 286, 286, 286, |
672 | | 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, |
673 | | 286, 286, 286, 286, 286, 286 |
674 | | } ; |
675 | | |
676 | | static const flex_int16_t yy_def[247] = |
677 | | { 0, |
678 | | 246, 1, 1, 3, 246, 246, 246, 246, 246, 246, |
679 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
680 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
681 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
682 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
683 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
684 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
685 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
686 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
687 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
688 | | |
689 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
690 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
691 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
692 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
693 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
694 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
695 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
696 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
697 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
698 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
699 | | |
700 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
701 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
702 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
703 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
704 | | 246, 246, 246, 246, 246, 0 |
705 | | } ; |
706 | | |
707 | | static const flex_int16_t yy_nxt[358] = |
708 | | { 0, |
709 | | 6, 7, 6, 8, 9, 10, 6, 11, 12, 13, |
710 | | 14, 15, 16, 17, 18, 19, 20, 21, 22, 6, |
711 | | 23, 6, 24, 25, 6, 6, 26, 6, 27, 28, |
712 | | 6, 6, 6, 29, 30, 31, 6, 32, 6, 6, |
713 | | 6, 6, 6, 6, 6, 33, 34, 6, 6, 35, |
714 | | 36, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
715 | | 37, 38, 39, 6, 6, 40, 6, 6, 6, 6, |
716 | | 41, 42, 103, 136, 43, 158, 104, 137, 245, 105, |
717 | | 106, 107, 121, 122, 44, 123, 159, 244, 80, 45, |
718 | | 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, |
719 | | |
720 | | 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, |
721 | | 66, 67, 68, 75, 95, 69, 70, 75, 96, 118, |
722 | | 205, 128, 97, 98, 129, 130, 206, 243, 99, 100, |
723 | | 101, 102, 76, 71, 72, 119, 184, 185, 186, 120, |
724 | | 187, 209, 214, 188, 189, 77, 190, 191, 78, 79, |
725 | | 83, 84, 85, 192, 86, 242, 87, 210, 215, 88, |
726 | | 89, 90, 91, 241, 92, 93, 94, 108, 240, 124, |
727 | | 109, 110, 111, 239, 139, 125, 126, 81, 112, 113, |
728 | | 114, 127, 140, 115, 116, 238, 117, 131, 132, 133, |
729 | | 141, 144, 145, 142, 143, 146, 134, 218, 219, 196, |
730 | | |
731 | | 135, 147, 148, 197, 237, 150, 151, 149, 152, 153, |
732 | | 236, 235, 154, 155, 160, 161, 199, 162, 156, 157, |
733 | | 200, 234, 233, 232, 231, 163, 221, 164, 220, 217, |
734 | | 165, 216, 166, 167, 168, 169, 213, 212, 170, 171, |
735 | | 172, 173, 211, 208, 176, 177, 174, 178, 75, 179, |
736 | | 207, 180, 75, 175, 181, 182, 204, 222, 203, 183, |
737 | | 202, 201, 198, 223, 195, 194, 193, 76, 224, 225, |
738 | | 226, 227, 138, 228, 229, 230, 82, 81, 80, 74, |
739 | | 77, 73, 246, 78, 79, 5, 246, 246, 246, 246, |
740 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
741 | | |
742 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
743 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
744 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
745 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
746 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
747 | | 246, 246, 246, 246, 246, 246, 246 |
748 | | } ; |
749 | | |
750 | | static const flex_int16_t yy_chk[358] = |
751 | | { 0, |
752 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
753 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
754 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
755 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
756 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
757 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
758 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
759 | | 1, 3, 46, 53, 3, 58, 46, 53, 221, 46, |
760 | | 46, 46, 49, 49, 3, 49, 58, 220, 46, 3, |
761 | | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
762 | | |
763 | | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
764 | | 3, 3, 3, 23, 45, 3, 3, 23, 45, 48, |
765 | | 79, 51, 45, 45, 51, 51, 79, 219, 45, 45, |
766 | | 45, 45, 23, 3, 3, 48, 62, 62, 62, 48, |
767 | | 62, 85, 89, 62, 62, 23, 62, 62, 23, 23, |
768 | | 43, 43, 43, 62, 43, 218, 43, 85, 89, 43, |
769 | | 43, 43, 43, 217, 43, 43, 43, 47, 216, 50, |
770 | | 47, 47, 47, 215, 55, 50, 50, 47, 47, 47, |
771 | | 47, 50, 55, 47, 47, 214, 47, 52, 52, 52, |
772 | | 55, 56, 56, 55, 55, 56, 52, 92, 92, 68, |
773 | | |
774 | | 52, 56, 56, 68, 213, 57, 57, 56, 57, 57, |
775 | | 212, 211, 57, 57, 59, 59, 71, 59, 57, 57, |
776 | | 71, 210, 209, 208, 207, 59, 94, 59, 93, 91, |
777 | | 59, 90, 59, 59, 60, 60, 88, 87, 60, 60, |
778 | | 60, 60, 86, 84, 61, 61, 60, 61, 75, 61, |
779 | | 83, 61, 75, 60, 61, 61, 78, 193, 77, 61, |
780 | | 76, 72, 70, 193, 67, 66, 63, 75, 193, 193, |
781 | | 193, 193, 54, 193, 193, 193, 34, 25, 24, 21, |
782 | | 75, 15, 5, 75, 75, 246, 246, 246, 246, 246, |
783 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
784 | | |
785 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
786 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
787 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
788 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
789 | | 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, |
790 | | 246, 246, 246, 246, 246, 246, 246 |
791 | | } ; |
792 | | |
793 | | /* The intent behind this definition is that it'll catch |
794 | | * any uses of REJECT which flex missed. |
795 | | */ |
796 | | #define REJECT reject_used_but_not_detected |
797 | | #define yymore() yymore_used_but_not_detected |
798 | 12.8M | #define YY_MORE_ADJ 0 |
799 | | #define YY_RESTORE_YY_MORE_OFFSET |
800 | | |
801 | | // |
802 | | // Copyright (C) 2001-2010 Randal Henne, Greg Landrum and Rational Discovery LLC |
803 | | // |
804 | | // @@ All Rights Reserved @@ |
805 | | // |
806 | | |
807 | | #include <cstdio> |
808 | | |
809 | | #include <RDGeneral/Exceptions.h> |
810 | | #include <RDGeneral/types.h> |
811 | | #include <GraphMol/GraphMol.h> |
812 | | #include <GraphMol/Atom.h> |
813 | | #include <GraphMol/Bond.h> |
814 | | #include <GraphMol/PeriodicTable.h> |
815 | | #include <GraphMol/RDKitQueries.h> |
816 | | |
817 | | #include <string> |
818 | | #include <cstring> |
819 | | #include "smiles.tab.hpp" |
820 | | |
821 | | using namespace RDKit; |
822 | | |
823 | | // This will be called every time we construct a token an will allow us to track |
824 | | // the position of the current token. |
825 | | #undef YY_USER_ACTION |
826 | 19.2M | #define YY_USER_ACTION current_token_position += yyleng; |
827 | | |
828 | 0 | #define YY_FATAL_ERROR(msg) smiles_lexer_error(msg) |
829 | | |
830 | 0 | void smiles_lexer_error(const char *msg) { |
831 | 0 | BOOST_LOG(rdErrorLog) << msg<<std::endl; |
832 | 0 | throw ValueErrorException(msg); |
833 | 0 | } |
834 | | |
835 | 223 | size_t setup_smiles_string(const std::string &text,yyscan_t yyscanner){ |
836 | | // YY_BUFFER_STATE buff=yysmiles__scan_string(text.c_str()+pos,yyscanner); |
837 | | // Faster implementation of yysmiles__scan_string that handles trimming |
838 | 223 | YY_BUFFER_STATE b; |
839 | 223 | char *buf; |
840 | 223 | yyconst char * yybytes = text.c_str(); |
841 | 223 | yy_size_t _yybytes_len=text.size(), n, start, end; |
842 | | /* Get memory for full buffer, including space for trailing EOB's. */ |
843 | 223 | n = _yybytes_len + 2; |
844 | 223 | buf = (char *) yysmiles_alloc(n ,yyscanner ); |
845 | 223 | if ( ! buf ) |
846 | 0 | smiles_lexer_error( "out of dynamic memory in yysmiles__scan_bytes()" ); |
847 | | |
848 | | // ltrim |
849 | | |
850 | 96.1k | for(start = 0 ; start < _yybytes_len; ++start) { |
851 | 96.1k | if (yybytes[start] > 32) break; |
852 | 96.1k | } |
853 | 3.97M | for(end = _yybytes_len ; end > start; --end) { |
854 | 3.97M | if (yybytes[end] > 32) break; |
855 | 3.97M | } |
856 | | |
857 | 223 | _yybytes_len = end-start+1; |
858 | 223 | n = _yybytes_len + 2; |
859 | 223 | memcpy(buf, yybytes+start, _yybytes_len); |
860 | | |
861 | 223 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
862 | | |
863 | 223 | b = yysmiles__scan_buffer(buf,n ,yyscanner); |
864 | 223 | if ( ! b ) |
865 | 0 | smiles_lexer_error( "bad buffer in yysmiles__scan_bytes()" ); |
866 | | |
867 | | /* It's okay to grow etc. this buffer, and we should throw it |
868 | | * away when we're done. |
869 | | */ |
870 | 223 | b->yy_is_our_buffer = 1; |
871 | | |
872 | 223 | POSTCONDITION(b,"invalid buffer"); |
873 | 223 | return start; |
874 | | |
875 | 223 | } |
876 | | |
877 | 91.8k | #define INITIAL 0 |
878 | 1.19M | #define IN_ATOM_STATE 1 |
879 | | |
880 | | #ifndef YY_NO_UNISTD_H |
881 | | /* Special case for "unistd.h", since it is non-ANSI. We include it way |
882 | | * down here because we want the user's section 1 to have been scanned first. |
883 | | * The user has a chance to override it with an option. |
884 | | */ |
885 | | #include <unistd.h> |
886 | | #endif |
887 | | |
888 | | #ifndef YY_EXTRA_TYPE |
889 | | #define YY_EXTRA_TYPE void * |
890 | | #endif |
891 | | |
892 | | /* Holds the entire state of the reentrant scanner. */ |
893 | | struct yyguts_t |
894 | | { |
895 | | |
896 | | /* User-defined. Not touched by flex. */ |
897 | | YY_EXTRA_TYPE yyextra_r; |
898 | | |
899 | | /* The rest are the same as the globals declared in the non-reentrant scanner. */ |
900 | | FILE *yyin_r, *yyout_r; |
901 | | size_t yy_buffer_stack_top; /**< index of top of stack. */ |
902 | | size_t yy_buffer_stack_max; /**< capacity of stack. */ |
903 | | YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ |
904 | | char yy_hold_char; |
905 | | int yy_n_chars; |
906 | | int yyleng_r; |
907 | | char *yy_c_buf_p; |
908 | | int yy_init; |
909 | | int yy_start; |
910 | | int yy_did_buffer_switch_on_eof; |
911 | | int yy_start_stack_ptr; |
912 | | int yy_start_stack_depth; |
913 | | int *yy_start_stack; |
914 | | yy_state_type yy_last_accepting_state; |
915 | | char* yy_last_accepting_cpos; |
916 | | |
917 | | int yylineno_r; |
918 | | int yy_flex_debug_r; |
919 | | |
920 | | char *yytext_r; |
921 | | int yy_more_flag; |
922 | | int yy_more_len; |
923 | | |
924 | | YYSTYPE * yylval_r; |
925 | | |
926 | | }; /* end struct yyguts_t */ |
927 | | |
928 | | static int yy_init_globals ( yyscan_t yyscanner ); |
929 | | |
930 | | /* This must go here because YYSTYPE and YYLTYPE are included |
931 | | * from bison output in section 1.*/ |
932 | 30.4M | # define yylval yyg->yylval_r |
933 | | |
934 | | int yylex_init (yyscan_t* scanner); |
935 | | |
936 | | int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); |
937 | | |
938 | | /* Accessor methods to globals. |
939 | | These are made visible to non-reentrant scanners for convenience. */ |
940 | | |
941 | | int yylex_destroy ( yyscan_t yyscanner ); |
942 | | |
943 | | int yyget_debug ( yyscan_t yyscanner ); |
944 | | |
945 | | void yyset_debug ( int debug_flag , yyscan_t yyscanner ); |
946 | | |
947 | | YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); |
948 | | |
949 | | void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); |
950 | | |
951 | | FILE *yyget_in ( yyscan_t yyscanner ); |
952 | | |
953 | | void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); |
954 | | |
955 | | FILE *yyget_out ( yyscan_t yyscanner ); |
956 | | |
957 | | void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); |
958 | | |
959 | | int yyget_leng ( yyscan_t yyscanner ); |
960 | | |
961 | | char *yyget_text ( yyscan_t yyscanner ); |
962 | | |
963 | | int yyget_lineno ( yyscan_t yyscanner ); |
964 | | |
965 | | void yyset_lineno ( int _line_number , yyscan_t yyscanner ); |
966 | | |
967 | | int yyget_column ( yyscan_t yyscanner ); |
968 | | |
969 | | void yyset_column ( int _column_no , yyscan_t yyscanner ); |
970 | | |
971 | | YYSTYPE * yyget_lval ( yyscan_t yyscanner ); |
972 | | |
973 | | void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); |
974 | | |
975 | | /* Macros after this point can all be overridden by user definitions in |
976 | | * section 1. |
977 | | */ |
978 | | |
979 | | #ifndef YY_SKIP_YYWRAP |
980 | | #ifdef __cplusplus |
981 | | extern "C" int yywrap ( yyscan_t yyscanner ); |
982 | | #else |
983 | | extern int yywrap ( yyscan_t yyscanner ); |
984 | | #endif |
985 | | #endif |
986 | | |
987 | | #ifndef YY_NO_UNPUT |
988 | | |
989 | | static void yyunput ( int c, char *buf_ptr , yyscan_t yyscanner); |
990 | | |
991 | | #endif |
992 | | |
993 | | #ifndef yytext_ptr |
994 | | static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); |
995 | | #endif |
996 | | |
997 | | #ifdef YY_NEED_STRLEN |
998 | | static int yy_flex_strlen ( const char * , yyscan_t yyscanner); |
999 | | #endif |
1000 | | |
1001 | | #ifndef YY_NO_INPUT |
1002 | | #ifdef __cplusplus |
1003 | | static int yyinput ( yyscan_t yyscanner ); |
1004 | | #else |
1005 | | static int input ( yyscan_t yyscanner ); |
1006 | | #endif |
1007 | | |
1008 | | #endif |
1009 | | |
1010 | | /* Amount of stuff to slurp up with each read. */ |
1011 | | #ifndef YY_READ_BUF_SIZE |
1012 | | #ifdef __ia64__ |
1013 | | /* On IA-64, the buffer size is 16k, not 8k */ |
1014 | | #define YY_READ_BUF_SIZE 16384 |
1015 | | #else |
1016 | 0 | #define YY_READ_BUF_SIZE 8192 |
1017 | | #endif /* __ia64__ */ |
1018 | | #endif |
1019 | | |
1020 | | /* Copy whatever the last rule matched to the standard output. */ |
1021 | | #ifndef ECHO |
1022 | | /* This used to be an fputs(), but since the string might contain NUL's, |
1023 | | * we now use fwrite(). |
1024 | | */ |
1025 | | #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) |
1026 | | #endif |
1027 | | |
1028 | | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
1029 | | * is returned in "result". |
1030 | | */ |
1031 | | #ifndef YY_INPUT |
1032 | | #define YY_INPUT(buf,result,max_size) \ |
1033 | 0 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
1034 | 0 | { \ |
1035 | 0 | int c = '*'; \ |
1036 | 0 | int n; \ |
1037 | 0 | for ( n = 0; n < max_size && \ |
1038 | 0 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
1039 | 0 | buf[n] = (char) c; \ |
1040 | 0 | if ( c == '\n' ) \ |
1041 | 0 | buf[n++] = (char) c; \ |
1042 | 0 | if ( c == EOF && ferror( yyin ) ) \ |
1043 | 0 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
1044 | 0 | result = n; \ |
1045 | 0 | } \ |
1046 | 0 | else \ |
1047 | 0 | { \ |
1048 | 0 | errno=0; \ |
1049 | 0 | while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ |
1050 | 0 | { \ |
1051 | 0 | if( errno != EINTR) \ |
1052 | 0 | { \ |
1053 | 0 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
1054 | 0 | break; \ |
1055 | 0 | } \ |
1056 | 0 | errno=0; \ |
1057 | 0 | clearerr(yyin); \ |
1058 | 0 | } \ |
1059 | 0 | }\ |
1060 | | \ |
1061 | | |
1062 | | #endif |
1063 | | |
1064 | | /* No semi-colon after return; correct usage is to write "yyterminate();" - |
1065 | | * we don't want an extra ';' after the "return" because that will cause |
1066 | | * some compilers to complain about unreachable statements. |
1067 | | */ |
1068 | | #ifndef yyterminate |
1069 | | #define yyterminate() return YY_NULL |
1070 | | #endif |
1071 | | |
1072 | | /* Number of entries by which start-condition stack grows. */ |
1073 | | #ifndef YY_START_STACK_INCR |
1074 | | #define YY_START_STACK_INCR 25 |
1075 | | #endif |
1076 | | |
1077 | | /* Report a fatal error. */ |
1078 | | #ifndef YY_FATAL_ERROR |
1079 | | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) |
1080 | | #endif |
1081 | | |
1082 | | /* end tables serialization structures and prototypes */ |
1083 | | |
1084 | | /* Default declaration of generated scanner - a define so the user can |
1085 | | * easily add parameters. |
1086 | | */ |
1087 | | #ifndef YY_DECL |
1088 | | #define YY_DECL_IS_OURS 1 |
1089 | | |
1090 | | extern int yylex \ |
1091 | | (YYSTYPE * yylval_param , yyscan_t yyscanner); |
1092 | | |
1093 | | #define YY_DECL int yylex \ |
1094 | | (YYSTYPE * yylval_param , yyscan_t yyscanner) |
1095 | | #endif /* !YY_DECL */ |
1096 | | |
1097 | | /* Code executed at the beginning of each rule, after yytext and yyleng |
1098 | | * have been set up. |
1099 | | */ |
1100 | | #ifndef YY_USER_ACTION |
1101 | | #define YY_USER_ACTION |
1102 | | #endif |
1103 | | |
1104 | | /* Code executed at the end of each rule. */ |
1105 | | #ifndef YY_BREAK |
1106 | 0 | #define YY_BREAK /*LINTED*/break; |
1107 | | #endif |
1108 | | |
1109 | | #define YY_RULE_SETUP \ |
1110 | 19.2M | YY_USER_ACTION |
1111 | | |
1112 | | /** The main scanner function which does all the work. |
1113 | | */ |
1114 | | YY_DECL |
1115 | 19.2M | { |
1116 | 19.2M | yy_state_type yy_current_state; |
1117 | 19.2M | char *yy_cp, *yy_bp; |
1118 | 19.2M | int yy_act; |
1119 | 19.2M | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1120 | | |
1121 | 19.2M | yylval = yylval_param; |
1122 | | |
1123 | 19.2M | if ( !yyg->yy_init ) |
1124 | 223 | { |
1125 | 223 | yyg->yy_init = 1; |
1126 | | |
1127 | | #ifdef YY_USER_INIT |
1128 | | YY_USER_INIT; |
1129 | | #endif |
1130 | | |
1131 | 223 | if ( ! yyg->yy_start ) |
1132 | 223 | yyg->yy_start = 1; /* first start state */ |
1133 | | |
1134 | 223 | if ( ! yyin ) |
1135 | 223 | yyin = stdin; |
1136 | | |
1137 | 223 | if ( ! yyout ) |
1138 | 223 | yyout = stdout; |
1139 | | |
1140 | 223 | if ( ! YY_CURRENT_BUFFER ) { |
1141 | 0 | yyensure_buffer_stack (yyscanner); |
1142 | 0 | YY_CURRENT_BUFFER_LVALUE = |
1143 | 0 | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
1144 | 0 | } |
1145 | | |
1146 | 223 | yy_load_buffer_state( yyscanner ); |
1147 | 223 | } |
1148 | | |
1149 | 19.2M | { |
1150 | | |
1151 | 19.2M | if (start_token) |
1152 | 223 | { |
1153 | 223 | int t = start_token; |
1154 | 223 | start_token = 0; |
1155 | 223 | return t; |
1156 | 223 | } |
1157 | | |
1158 | 19.2M | while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ |
1159 | 19.2M | { |
1160 | 19.2M | yy_cp = yyg->yy_c_buf_p; |
1161 | | |
1162 | | /* Support of yytext. */ |
1163 | 19.2M | *yy_cp = yyg->yy_hold_char; |
1164 | | |
1165 | | /* yy_bp points to the position in yy_ch_buf of the start of |
1166 | | * the current run. |
1167 | | */ |
1168 | 19.2M | yy_bp = yy_cp; |
1169 | | |
1170 | 19.2M | yy_current_state = yyg->yy_start; |
1171 | 22.4M | yy_match: |
1172 | 22.4M | do |
1173 | 45.0M | { |
1174 | 45.0M | YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; |
1175 | 45.0M | if ( yy_accept[yy_current_state] ) |
1176 | 25.7M | { |
1177 | 25.7M | yyg->yy_last_accepting_state = yy_current_state; |
1178 | 25.7M | yyg->yy_last_accepting_cpos = yy_cp; |
1179 | 25.7M | } |
1180 | 72.8M | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
1181 | 27.8M | { |
1182 | 27.8M | yy_current_state = (int) yy_def[yy_current_state]; |
1183 | 27.8M | if ( yy_current_state >= 247 ) |
1184 | 0 | yy_c = yy_meta[yy_c]; |
1185 | 27.8M | } |
1186 | 45.0M | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
1187 | 45.0M | ++yy_cp; |
1188 | 45.0M | } |
1189 | 45.0M | while ( yy_current_state != 246 ); |
1190 | 22.4M | yy_cp = yyg->yy_last_accepting_cpos; |
1191 | 22.4M | yy_current_state = yyg->yy_last_accepting_state; |
1192 | | |
1193 | 25.6M | yy_find_action: |
1194 | 25.6M | yy_act = yy_accept[yy_current_state]; |
1195 | | |
1196 | 25.6M | YY_DO_BEFORE_ACTION; |
1197 | | |
1198 | 25.6M | do_action: /* This label is used only to access EOF actions. */ |
1199 | | |
1200 | 25.6M | switch ( yy_act ) |
1201 | 25.6M | { /* beginning of action switch */ |
1202 | 0 | case 0: /* must back up */ |
1203 | | /* undo the effects of YY_DO_BEFORE_ACTION */ |
1204 | 0 | *yy_cp = yyg->yy_hold_char; |
1205 | 0 | yy_cp = yyg->yy_last_accepting_cpos; |
1206 | 0 | yy_current_state = yyg->yy_last_accepting_state; |
1207 | 0 | goto yy_find_action; |
1208 | | |
1209 | 0 | case 1: |
1210 | 0 | YY_RULE_SETUP |
1211 | 0 | { yylval->chiraltype = Atom::ChiralType::CHI_TETRAHEDRAL; return CHI_CLASS_TOKEN; } |
1212 | 0 | YY_BREAK |
1213 | 0 | case 2: |
1214 | 0 | YY_RULE_SETUP |
1215 | 0 | { yylval->chiraltype = Atom::ChiralType::CHI_ALLENE; return CHI_CLASS_TOKEN; } |
1216 | 0 | YY_BREAK |
1217 | 9 | case 3: |
1218 | 9 | YY_RULE_SETUP |
1219 | 9 | { yylval->chiraltype = Atom::ChiralType::CHI_SQUAREPLANAR; return CHI_CLASS_TOKEN; } |
1220 | 0 | YY_BREAK |
1221 | 0 | case 4: |
1222 | 0 | YY_RULE_SETUP |
1223 | 0 | { yylval->chiraltype = Atom::ChiralType::CHI_TRIGONALBIPYRAMIDAL; return CHI_CLASS_TOKEN; } |
1224 | 0 | YY_BREAK |
1225 | 0 | case 5: |
1226 | 0 | YY_RULE_SETUP |
1227 | 0 | { yylval->chiraltype = Atom::ChiralType::CHI_OCTAHEDRAL; return CHI_CLASS_TOKEN; } |
1228 | 0 | YY_BREAK |
1229 | 98.6k | case 6: |
1230 | 98.6k | YY_RULE_SETUP |
1231 | 98.6k | { return AT_TOKEN; } |
1232 | 0 | YY_BREAK |
1233 | 0 | case 7: |
1234 | 0 | YY_RULE_SETUP |
1235 | 0 | { yylval->atom = new Atom(2); return ATOM_TOKEN; } |
1236 | 0 | YY_BREAK |
1237 | 0 | case 8: |
1238 | 0 | YY_RULE_SETUP |
1239 | 0 | { yylval->atom = new Atom(3); return ATOM_TOKEN; } |
1240 | 0 | YY_BREAK |
1241 | 24 | case 9: |
1242 | 24 | YY_RULE_SETUP |
1243 | 24 | { yylval->atom = new Atom(4); return ATOM_TOKEN; } |
1244 | 0 | YY_BREAK |
1245 | 1 | case 10: |
1246 | 1 | YY_RULE_SETUP |
1247 | 1 | { yylval->atom = new Atom(10); return ATOM_TOKEN; } |
1248 | 0 | YY_BREAK |
1249 | 43 | case 11: |
1250 | 43 | YY_RULE_SETUP |
1251 | 43 | { yylval->atom = new Atom(11); return ATOM_TOKEN; } |
1252 | 0 | YY_BREAK |
1253 | 172 | case 12: |
1254 | 172 | YY_RULE_SETUP |
1255 | 172 | { yylval->atom = new Atom(12); return ATOM_TOKEN; } |
1256 | 0 | YY_BREAK |
1257 | 7.41k | case 13: |
1258 | 7.41k | YY_RULE_SETUP |
1259 | 7.41k | { yylval->atom = new Atom(13); return ATOM_TOKEN; } |
1260 | 0 | YY_BREAK |
1261 | 0 | case 14: |
1262 | 0 | YY_RULE_SETUP |
1263 | 0 | { yylval->atom = new Atom(14); return ATOM_TOKEN; } |
1264 | 0 | YY_BREAK |
1265 | 14.6k | case 15: |
1266 | 14.6k | YY_RULE_SETUP |
1267 | 14.6k | { yylval->atom = new Atom(18); return ATOM_TOKEN; } |
1268 | 0 | YY_BREAK |
1269 | 175 | case 16: |
1270 | 175 | YY_RULE_SETUP |
1271 | 175 | { yylval->atom = new Atom(19); return ATOM_TOKEN; } |
1272 | 0 | YY_BREAK |
1273 | 76 | case 17: |
1274 | 76 | YY_RULE_SETUP |
1275 | 76 | { yylval->atom = new Atom(20); return ATOM_TOKEN; } |
1276 | 0 | YY_BREAK |
1277 | 7.33k | case 18: |
1278 | 7.33k | YY_RULE_SETUP |
1279 | 7.33k | { yylval->atom = new Atom(21); return ATOM_TOKEN; } |
1280 | 0 | YY_BREAK |
1281 | 25 | case 19: |
1282 | 25 | YY_RULE_SETUP |
1283 | 25 | { yylval->atom = new Atom(22); return ATOM_TOKEN; } |
1284 | 0 | YY_BREAK |
1285 | 252k | case 20: |
1286 | 252k | YY_RULE_SETUP |
1287 | 252k | { yylval->atom = new Atom(23); return ATOM_TOKEN; } |
1288 | 0 | YY_BREAK |
1289 | 482 | case 21: |
1290 | 482 | YY_RULE_SETUP |
1291 | 482 | { yylval->atom = new Atom(24); return ATOM_TOKEN; } |
1292 | 0 | YY_BREAK |
1293 | 316 | case 22: |
1294 | 316 | YY_RULE_SETUP |
1295 | 316 | { yylval->atom = new Atom(25); return ATOM_TOKEN; } |
1296 | 0 | YY_BREAK |
1297 | 327 | case 23: |
1298 | 327 | YY_RULE_SETUP |
1299 | 327 | { yylval->atom = new Atom(26); return ATOM_TOKEN; } |
1300 | 0 | YY_BREAK |
1301 | 25 | case 24: |
1302 | 25 | YY_RULE_SETUP |
1303 | 25 | { yylval->atom = new Atom(27); return ATOM_TOKEN; } |
1304 | 0 | YY_BREAK |
1305 | 50 | case 25: |
1306 | 50 | YY_RULE_SETUP |
1307 | 50 | { yylval->atom = new Atom(28); return ATOM_TOKEN; } |
1308 | 0 | YY_BREAK |
1309 | 206 | case 26: |
1310 | 206 | YY_RULE_SETUP |
1311 | 206 | { yylval->atom = new Atom(29); return ATOM_TOKEN; } |
1312 | 0 | YY_BREAK |
1313 | 285 | case 27: |
1314 | 285 | YY_RULE_SETUP |
1315 | 285 | { yylval->atom = new Atom(30); return ATOM_TOKEN; } |
1316 | 0 | YY_BREAK |
1317 | 7.32k | case 28: |
1318 | 7.32k | YY_RULE_SETUP |
1319 | 7.32k | { yylval->atom = new Atom(31); return ATOM_TOKEN; } |
1320 | 0 | YY_BREAK |
1321 | 828 | case 29: |
1322 | 828 | YY_RULE_SETUP |
1323 | 828 | { yylval->atom = new Atom(32); return ATOM_TOKEN; } |
1324 | 0 | YY_BREAK |
1325 | 90 | case 30: |
1326 | 90 | YY_RULE_SETUP |
1327 | 90 | { yylval->atom = new Atom(33); return ATOM_TOKEN; } |
1328 | 0 | YY_BREAK |
1329 | 7 | case 31: |
1330 | 7 | YY_RULE_SETUP |
1331 | 7 | { yylval->atom = new Atom(34); return ATOM_TOKEN; } |
1332 | 0 | YY_BREAK |
1333 | 0 | case 32: |
1334 | 0 | YY_RULE_SETUP |
1335 | 0 | { yylval->atom = new Atom(36); return ATOM_TOKEN; } |
1336 | 0 | YY_BREAK |
1337 | 231 | case 33: |
1338 | 231 | YY_RULE_SETUP |
1339 | 231 | { yylval->atom = new Atom(37); return ATOM_TOKEN; } |
1340 | 0 | YY_BREAK |
1341 | 86 | case 34: |
1342 | 86 | YY_RULE_SETUP |
1343 | 86 | { yylval->atom = new Atom(38); return ATOM_TOKEN; } |
1344 | 0 | YY_BREAK |
1345 | 126 | case 35: |
1346 | 126 | YY_RULE_SETUP |
1347 | 126 | { yylval->atom = new Atom(39); return ATOM_TOKEN; } |
1348 | 0 | YY_BREAK |
1349 | 237 | case 36: |
1350 | 237 | YY_RULE_SETUP |
1351 | 237 | { yylval->atom = new Atom(40); return ATOM_TOKEN; } |
1352 | 0 | YY_BREAK |
1353 | 73 | case 37: |
1354 | 73 | YY_RULE_SETUP |
1355 | 73 | { yylval->atom = new Atom(41); return ATOM_TOKEN; } |
1356 | 0 | YY_BREAK |
1357 | 8 | case 38: |
1358 | 8 | YY_RULE_SETUP |
1359 | 8 | { yylval->atom = new Atom(42); return ATOM_TOKEN; } |
1360 | 0 | YY_BREAK |
1361 | 77 | case 39: |
1362 | 77 | YY_RULE_SETUP |
1363 | 77 | { yylval->atom = new Atom(43); return ATOM_TOKEN; } |
1364 | 0 | YY_BREAK |
1365 | 85 | case 40: |
1366 | 85 | YY_RULE_SETUP |
1367 | 85 | { yylval->atom = new Atom(44); return ATOM_TOKEN; } |
1368 | 0 | YY_BREAK |
1369 | 0 | case 41: |
1370 | 0 | YY_RULE_SETUP |
1371 | 0 | { yylval->atom = new Atom(45); return ATOM_TOKEN; } |
1372 | 0 | YY_BREAK |
1373 | 1 | case 42: |
1374 | 1 | YY_RULE_SETUP |
1375 | 1 | { yylval->atom = new Atom(46); return ATOM_TOKEN; } |
1376 | 0 | YY_BREAK |
1377 | 2 | case 43: |
1378 | 2 | YY_RULE_SETUP |
1379 | 2 | { yylval->atom = new Atom(47); return ATOM_TOKEN; } |
1380 | 0 | YY_BREAK |
1381 | 0 | case 44: |
1382 | 0 | YY_RULE_SETUP |
1383 | 0 | { yylval->atom = new Atom(48); return ATOM_TOKEN; } |
1384 | 0 | YY_BREAK |
1385 | 37 | case 45: |
1386 | 37 | YY_RULE_SETUP |
1387 | 37 | { yylval->atom = new Atom(49); return ATOM_TOKEN; } |
1388 | 0 | YY_BREAK |
1389 | 144 | case 46: |
1390 | 144 | YY_RULE_SETUP |
1391 | 144 | { yylval->atom = new Atom(50); return ATOM_TOKEN; } |
1392 | 0 | YY_BREAK |
1393 | 9 | case 47: |
1394 | 9 | YY_RULE_SETUP |
1395 | 9 | { yylval->atom = new Atom(51); return ATOM_TOKEN; } |
1396 | 0 | YY_BREAK |
1397 | 40 | case 48: |
1398 | 40 | YY_RULE_SETUP |
1399 | 40 | { yylval->atom = new Atom(52); return ATOM_TOKEN; } |
1400 | 0 | YY_BREAK |
1401 | 0 | case 49: |
1402 | 0 | YY_RULE_SETUP |
1403 | 0 | { yylval->atom = new Atom(54); return ATOM_TOKEN; } |
1404 | 0 | YY_BREAK |
1405 | 117 | case 50: |
1406 | 117 | YY_RULE_SETUP |
1407 | 117 | { yylval->atom = new Atom(55); return ATOM_TOKEN; } |
1408 | 0 | YY_BREAK |
1409 | 1 | case 51: |
1410 | 1 | YY_RULE_SETUP |
1411 | 1 | { yylval->atom = new Atom(56); return ATOM_TOKEN; } |
1412 | 0 | YY_BREAK |
1413 | 30 | case 52: |
1414 | 30 | YY_RULE_SETUP |
1415 | 30 | { yylval->atom = new Atom(57); return ATOM_TOKEN; } |
1416 | 0 | YY_BREAK |
1417 | 0 | case 53: |
1418 | 0 | YY_RULE_SETUP |
1419 | 0 | { yylval->atom = new Atom(58); return ATOM_TOKEN; } |
1420 | 0 | YY_BREAK |
1421 | 240 | case 54: |
1422 | 240 | YY_RULE_SETUP |
1423 | 240 | { yylval->atom = new Atom(59); return ATOM_TOKEN; } |
1424 | 0 | YY_BREAK |
1425 | 168 | case 55: |
1426 | 168 | YY_RULE_SETUP |
1427 | 168 | { yylval->atom = new Atom(60); return ATOM_TOKEN; } |
1428 | 0 | YY_BREAK |
1429 | 0 | case 56: |
1430 | 0 | YY_RULE_SETUP |
1431 | 0 | { yylval->atom = new Atom(61); return ATOM_TOKEN; } |
1432 | 0 | YY_BREAK |
1433 | 15 | case 57: |
1434 | 15 | YY_RULE_SETUP |
1435 | 15 | { yylval->atom = new Atom(62); return ATOM_TOKEN; } |
1436 | 0 | YY_BREAK |
1437 | 12 | case 58: |
1438 | 12 | YY_RULE_SETUP |
1439 | 12 | { yylval->atom = new Atom(63); return ATOM_TOKEN; } |
1440 | 0 | YY_BREAK |
1441 | 3 | case 59: |
1442 | 3 | YY_RULE_SETUP |
1443 | 3 | { yylval->atom = new Atom(64); return ATOM_TOKEN; } |
1444 | 0 | YY_BREAK |
1445 | 1 | case 60: |
1446 | 1 | YY_RULE_SETUP |
1447 | 1 | { yylval->atom = new Atom(65); return ATOM_TOKEN; } |
1448 | 0 | YY_BREAK |
1449 | 36 | case 61: |
1450 | 36 | YY_RULE_SETUP |
1451 | 36 | { yylval->atom = new Atom(66); return ATOM_TOKEN; } |
1452 | 0 | YY_BREAK |
1453 | 3 | case 62: |
1454 | 3 | YY_RULE_SETUP |
1455 | 3 | { yylval->atom = new Atom(67); return ATOM_TOKEN; } |
1456 | 0 | YY_BREAK |
1457 | 0 | case 63: |
1458 | 0 | YY_RULE_SETUP |
1459 | 0 | { yylval->atom = new Atom(68); return ATOM_TOKEN; } |
1460 | 0 | YY_BREAK |
1461 | 35 | case 64: |
1462 | 35 | YY_RULE_SETUP |
1463 | 35 | { yylval->atom = new Atom(69); return ATOM_TOKEN; } |
1464 | 0 | YY_BREAK |
1465 | 0 | case 65: |
1466 | 0 | YY_RULE_SETUP |
1467 | 0 | { yylval->atom = new Atom(70); return ATOM_TOKEN; } |
1468 | 0 | YY_BREAK |
1469 | 21 | case 66: |
1470 | 21 | YY_RULE_SETUP |
1471 | 21 | { yylval->atom = new Atom(71); return ATOM_TOKEN; } |
1472 | 0 | YY_BREAK |
1473 | 0 | case 67: |
1474 | 0 | YY_RULE_SETUP |
1475 | 0 | { yylval->atom = new Atom(72); return ATOM_TOKEN; } |
1476 | 0 | YY_BREAK |
1477 | 62 | case 68: |
1478 | 62 | YY_RULE_SETUP |
1479 | 62 | { yylval->atom = new Atom(73); return ATOM_TOKEN; } |
1480 | 0 | YY_BREAK |
1481 | 799 | case 69: |
1482 | 799 | YY_RULE_SETUP |
1483 | 799 | { yylval->atom = new Atom(74); return ATOM_TOKEN; } |
1484 | 0 | YY_BREAK |
1485 | 4 | case 70: |
1486 | 4 | YY_RULE_SETUP |
1487 | 4 | { yylval->atom = new Atom(75); return ATOM_TOKEN; } |
1488 | 0 | YY_BREAK |
1489 | 4 | case 71: |
1490 | 4 | YY_RULE_SETUP |
1491 | 4 | { yylval->atom = new Atom(76); return ATOM_TOKEN; } |
1492 | 0 | YY_BREAK |
1493 | 164 | case 72: |
1494 | 164 | YY_RULE_SETUP |
1495 | 164 | { yylval->atom = new Atom(77); return ATOM_TOKEN; } |
1496 | 0 | YY_BREAK |
1497 | 270 | case 73: |
1498 | 270 | YY_RULE_SETUP |
1499 | 270 | { yylval->atom = new Atom(78); return ATOM_TOKEN; } |
1500 | 0 | YY_BREAK |
1501 | 0 | case 74: |
1502 | 0 | YY_RULE_SETUP |
1503 | 0 | { yylval->atom = new Atom(79); return ATOM_TOKEN; } |
1504 | 0 | YY_BREAK |
1505 | 0 | case 75: |
1506 | 0 | YY_RULE_SETUP |
1507 | 0 | { yylval->atom = new Atom(80); return ATOM_TOKEN; } |
1508 | 0 | YY_BREAK |
1509 | 21 | case 76: |
1510 | 21 | YY_RULE_SETUP |
1511 | 21 | { yylval->atom = new Atom(81); return ATOM_TOKEN; } |
1512 | 0 | YY_BREAK |
1513 | 28 | case 77: |
1514 | 28 | YY_RULE_SETUP |
1515 | 28 | { yylval->atom = new Atom(82); return ATOM_TOKEN; } |
1516 | 0 | YY_BREAK |
1517 | 45 | case 78: |
1518 | 45 | YY_RULE_SETUP |
1519 | 45 | { yylval->atom = new Atom(83); return ATOM_TOKEN; } |
1520 | 0 | YY_BREAK |
1521 | 129 | case 79: |
1522 | 129 | YY_RULE_SETUP |
1523 | 129 | { yylval->atom = new Atom(84); return ATOM_TOKEN; } |
1524 | 0 | YY_BREAK |
1525 | 11.7k | case 80: |
1526 | 11.7k | YY_RULE_SETUP |
1527 | 11.7k | { yylval->atom = new Atom(85); return ATOM_TOKEN; } |
1528 | 0 | YY_BREAK |
1529 | 5 | case 81: |
1530 | 5 | YY_RULE_SETUP |
1531 | 5 | { yylval->atom = new Atom(86); return ATOM_TOKEN; } |
1532 | 0 | YY_BREAK |
1533 | 382 | case 82: |
1534 | 382 | YY_RULE_SETUP |
1535 | 382 | { yylval->atom = new Atom(87); return ATOM_TOKEN; } |
1536 | 0 | YY_BREAK |
1537 | 1.42k | case 83: |
1538 | 1.42k | YY_RULE_SETUP |
1539 | 1.42k | { yylval->atom = new Atom(88); return ATOM_TOKEN; } |
1540 | 0 | YY_BREAK |
1541 | 265 | case 84: |
1542 | 265 | YY_RULE_SETUP |
1543 | 265 | { yylval->atom = new Atom(89); return ATOM_TOKEN; } |
1544 | 0 | YY_BREAK |
1545 | 8 | case 85: |
1546 | 8 | YY_RULE_SETUP |
1547 | 8 | { yylval->atom = new Atom(90); return ATOM_TOKEN; } |
1548 | 0 | YY_BREAK |
1549 | 18 | case 86: |
1550 | 18 | YY_RULE_SETUP |
1551 | 18 | { yylval->atom = new Atom(91); return ATOM_TOKEN; } |
1552 | 0 | YY_BREAK |
1553 | 984 | case 87: |
1554 | 984 | YY_RULE_SETUP |
1555 | 984 | { yylval->atom = new Atom(92); return ATOM_TOKEN; } |
1556 | 0 | YY_BREAK |
1557 | 35 | case 88: |
1558 | 35 | YY_RULE_SETUP |
1559 | 35 | { yylval->atom = new Atom(93); return ATOM_TOKEN; } |
1560 | 0 | YY_BREAK |
1561 | 517 | case 89: |
1562 | 517 | YY_RULE_SETUP |
1563 | 517 | { yylval->atom = new Atom(94); return ATOM_TOKEN; } |
1564 | 0 | YY_BREAK |
1565 | 15 | case 90: |
1566 | 15 | YY_RULE_SETUP |
1567 | 15 | { yylval->atom = new Atom(95); return ATOM_TOKEN; } |
1568 | 0 | YY_BREAK |
1569 | 3 | case 91: |
1570 | 3 | YY_RULE_SETUP |
1571 | 3 | { yylval->atom = new Atom(96); return ATOM_TOKEN; } |
1572 | 0 | YY_BREAK |
1573 | 0 | case 92: |
1574 | 0 | YY_RULE_SETUP |
1575 | 0 | { yylval->atom = new Atom(97); return ATOM_TOKEN; } |
1576 | 0 | YY_BREAK |
1577 | 3 | case 93: |
1578 | 3 | YY_RULE_SETUP |
1579 | 3 | { yylval->atom = new Atom(98); return ATOM_TOKEN; } |
1580 | 0 | YY_BREAK |
1581 | 23 | case 94: |
1582 | 23 | YY_RULE_SETUP |
1583 | 23 | { yylval->atom = new Atom(99); return ATOM_TOKEN; } |
1584 | 0 | YY_BREAK |
1585 | 292 | case 95: |
1586 | 292 | YY_RULE_SETUP |
1587 | 292 | { yylval->atom = new Atom(100); return ATOM_TOKEN; } |
1588 | 0 | YY_BREAK |
1589 | 13 | case 96: |
1590 | 13 | YY_RULE_SETUP |
1591 | 13 | { yylval->atom = new Atom(101); return ATOM_TOKEN; } |
1592 | 0 | YY_BREAK |
1593 | 1.59k | case 97: |
1594 | 1.59k | YY_RULE_SETUP |
1595 | 1.59k | { yylval->atom = new Atom(102); return ATOM_TOKEN; } |
1596 | 0 | YY_BREAK |
1597 | 34 | case 98: |
1598 | 34 | YY_RULE_SETUP |
1599 | 34 | { yylval->atom = new Atom(103); return ATOM_TOKEN; } |
1600 | 0 | YY_BREAK |
1601 | 3.72k | case 99: |
1602 | 3.72k | YY_RULE_SETUP |
1603 | 3.72k | { yylval->atom = new Atom(104); return ATOM_TOKEN; } |
1604 | 0 | YY_BREAK |
1605 | 60 | case 100: |
1606 | 60 | YY_RULE_SETUP |
1607 | 60 | { yylval->atom = new Atom(105); return ATOM_TOKEN; } |
1608 | 0 | YY_BREAK |
1609 | 5.06k | case 101: |
1610 | 5.06k | YY_RULE_SETUP |
1611 | 5.06k | { yylval->atom = new Atom(106); return ATOM_TOKEN; } |
1612 | 0 | YY_BREAK |
1613 | 481 | case 102: |
1614 | 481 | YY_RULE_SETUP |
1615 | 481 | { yylval->atom = new Atom(107); return ATOM_TOKEN; } |
1616 | 0 | YY_BREAK |
1617 | 1 | case 103: |
1618 | 1 | YY_RULE_SETUP |
1619 | 1 | { yylval->atom = new Atom(108); return ATOM_TOKEN; } |
1620 | 0 | YY_BREAK |
1621 | 215 | case 104: |
1622 | 215 | YY_RULE_SETUP |
1623 | 215 | { yylval->atom = new Atom(109); return ATOM_TOKEN; } |
1624 | 0 | YY_BREAK |
1625 | 12 | case 105: |
1626 | 12 | YY_RULE_SETUP |
1627 | 12 | { yylval->atom = new Atom(110); return ATOM_TOKEN; } |
1628 | 0 | YY_BREAK |
1629 | 6.28k | case 106: |
1630 | 6.28k | YY_RULE_SETUP |
1631 | 6.28k | { yylval->atom = new Atom(111); return ATOM_TOKEN; } |
1632 | 0 | YY_BREAK |
1633 | 36 | case 107: |
1634 | 36 | YY_RULE_SETUP |
1635 | 36 | { yylval->atom = new Atom(112); return ATOM_TOKEN; } |
1636 | 0 | YY_BREAK |
1637 | 5 | case 108: |
1638 | 5 | YY_RULE_SETUP |
1639 | 5 | { yylval->atom = new Atom(113); return ATOM_TOKEN; } |
1640 | 0 | YY_BREAK |
1641 | 3 | case 109: |
1642 | 3 | YY_RULE_SETUP |
1643 | 3 | { yylval->atom = new Atom(114); return ATOM_TOKEN; } |
1644 | 0 | YY_BREAK |
1645 | 264 | case 110: |
1646 | 264 | YY_RULE_SETUP |
1647 | 264 | { yylval->atom = new Atom(115); return ATOM_TOKEN; } |
1648 | 0 | YY_BREAK |
1649 | 0 | case 111: |
1650 | 0 | YY_RULE_SETUP |
1651 | 0 | { yylval->atom = new Atom(116); return ATOM_TOKEN; } |
1652 | 0 | YY_BREAK |
1653 | 225 | case 112: |
1654 | 225 | YY_RULE_SETUP |
1655 | 225 | { yylval->atom = new Atom(117); return ATOM_TOKEN; } |
1656 | 0 | YY_BREAK |
1657 | 728 | case 113: |
1658 | 728 | YY_RULE_SETUP |
1659 | 728 | { yylval->atom = new Atom(118); return ATOM_TOKEN; } |
1660 | 0 | YY_BREAK |
1661 | 0 | case 114: |
1662 | 0 | YY_RULE_SETUP |
1663 | 0 | { yylval->atom = new Atom(110); return ATOM_TOKEN; } |
1664 | 0 | YY_BREAK |
1665 | 0 | case 115: |
1666 | 0 | YY_RULE_SETUP |
1667 | 0 | { yylval->atom = new Atom(111); return ATOM_TOKEN; } |
1668 | 0 | YY_BREAK |
1669 | 0 | case 116: |
1670 | 0 | YY_RULE_SETUP |
1671 | 0 | { yylval->atom = new Atom(112); return ATOM_TOKEN; } |
1672 | 0 | YY_BREAK |
1673 | 1.47k | case 117: |
1674 | 1.47k | YY_RULE_SETUP |
1675 | 1.47k | { yylval->atom = new Atom(113); return ATOM_TOKEN; } |
1676 | 0 | YY_BREAK |
1677 | 0 | case 118: |
1678 | 0 | YY_RULE_SETUP |
1679 | 0 | { yylval->atom = new Atom(114); return ATOM_TOKEN; } |
1680 | 0 | YY_BREAK |
1681 | 0 | case 119: |
1682 | 0 | YY_RULE_SETUP |
1683 | 0 | { yylval->atom = new Atom(115); return ATOM_TOKEN; } |
1684 | 0 | YY_BREAK |
1685 | 0 | case 120: |
1686 | 0 | YY_RULE_SETUP |
1687 | 0 | { yylval->atom = new Atom(116); return ATOM_TOKEN; } |
1688 | 0 | YY_BREAK |
1689 | 0 | case 121: |
1690 | 0 | YY_RULE_SETUP |
1691 | 0 | { yylval->atom = new Atom(117); return ATOM_TOKEN; } |
1692 | 0 | YY_BREAK |
1693 | 0 | case 122: |
1694 | 0 | YY_RULE_SETUP |
1695 | 0 | { yylval->atom = new Atom(118); return ATOM_TOKEN; } |
1696 | 0 | YY_BREAK |
1697 | 17.3k | case 123: |
1698 | 17.3k | YY_RULE_SETUP |
1699 | 17.3k | { yylval->atom = new Atom(5);return ORGANIC_ATOM_TOKEN; } |
1700 | 0 | YY_BREAK |
1701 | 571k | case 124: |
1702 | 571k | YY_RULE_SETUP |
1703 | 571k | { yylval->atom = new Atom(6);return ORGANIC_ATOM_TOKEN; } |
1704 | 0 | YY_BREAK |
1705 | 3.92M | case 125: |
1706 | 3.92M | YY_RULE_SETUP |
1707 | 3.92M | { yylval->atom = new Atom(7);return ORGANIC_ATOM_TOKEN; } |
1708 | 0 | YY_BREAK |
1709 | 243k | case 126: |
1710 | 243k | YY_RULE_SETUP |
1711 | 243k | { yylval->atom = new Atom(8);return ORGANIC_ATOM_TOKEN; } |
1712 | 0 | YY_BREAK |
1713 | 5.48k | case 127: |
1714 | 5.48k | YY_RULE_SETUP |
1715 | 5.48k | { yylval->atom = new Atom(15);return ORGANIC_ATOM_TOKEN; } |
1716 | 0 | YY_BREAK |
1717 | 880k | case 128: |
1718 | 880k | YY_RULE_SETUP |
1719 | 880k | { yylval->atom = new Atom(16);return ORGANIC_ATOM_TOKEN; } |
1720 | 0 | YY_BREAK |
1721 | 3.92k | case 129: |
1722 | 3.92k | YY_RULE_SETUP |
1723 | 3.92k | { yylval->atom = new Atom(9);return ORGANIC_ATOM_TOKEN; } |
1724 | 0 | YY_BREAK |
1725 | 8.00k | case 130: |
1726 | 8.00k | YY_RULE_SETUP |
1727 | 8.00k | { yylval->atom = new Atom(17);return ORGANIC_ATOM_TOKEN; } |
1728 | 0 | YY_BREAK |
1729 | 1.97k | case 131: |
1730 | 1.97k | YY_RULE_SETUP |
1731 | 1.97k | { yylval->atom = new Atom(35);return ORGANIC_ATOM_TOKEN; } |
1732 | 0 | YY_BREAK |
1733 | 233k | case 132: |
1734 | 233k | YY_RULE_SETUP |
1735 | 233k | { yylval->atom = new Atom(53);return ORGANIC_ATOM_TOKEN; } |
1736 | 0 | YY_BREAK |
1737 | 19.2k | case 133: |
1738 | 19.2k | YY_RULE_SETUP |
1739 | 19.2k | { |
1740 | 19.2k | return H_TOKEN; |
1741 | 0 | } |
1742 | 0 | YY_BREAK |
1743 | 13.9k | case 134: |
1744 | 13.9k | YY_RULE_SETUP |
1745 | 13.9k | { yylval->atom = new Atom ( 5 ); |
1746 | 13.9k | yylval->atom->setIsAromatic(true); |
1747 | 13.9k | return AROMATIC_ATOM_TOKEN; |
1748 | 0 | } |
1749 | 0 | YY_BREAK |
1750 | 458k | case 135: |
1751 | 458k | YY_RULE_SETUP |
1752 | 458k | { yylval->atom = new Atom ( 6 ); |
1753 | 458k | yylval->atom->setIsAromatic(true); |
1754 | 458k | return AROMATIC_ATOM_TOKEN; |
1755 | 0 | } |
1756 | 0 | YY_BREAK |
1757 | 369k | case 136: |
1758 | 369k | YY_RULE_SETUP |
1759 | 369k | { yylval->atom = new Atom( 7 ); |
1760 | 369k | yylval->atom->setIsAromatic(true); |
1761 | 369k | return AROMATIC_ATOM_TOKEN; |
1762 | 0 | } |
1763 | 0 | YY_BREAK |
1764 | 22.2k | case 137: |
1765 | 22.2k | YY_RULE_SETUP |
1766 | 22.2k | { yylval->atom = new Atom( 8 ); |
1767 | 22.2k | yylval->atom->setIsAromatic(true); |
1768 | 22.2k | return AROMATIC_ATOM_TOKEN; |
1769 | 0 | } |
1770 | 0 | YY_BREAK |
1771 | 15.0k | case 138: |
1772 | 15.0k | YY_RULE_SETUP |
1773 | 15.0k | { yylval->atom = new Atom( 15 ); |
1774 | 15.0k | yylval->atom->setIsAromatic(true); |
1775 | 15.0k | return AROMATIC_ATOM_TOKEN; |
1776 | 0 | } |
1777 | 0 | YY_BREAK |
1778 | 908 | case 139: |
1779 | 908 | YY_RULE_SETUP |
1780 | 908 | { yylval->atom = new Atom( 16 ); |
1781 | 908 | yylval->atom->setIsAromatic(true); |
1782 | 908 | return AROMATIC_ATOM_TOKEN; |
1783 | 0 | } |
1784 | 0 | YY_BREAK |
1785 | 8 | case 140: |
1786 | 8 | YY_RULE_SETUP |
1787 | 8 | { yylval->atom = new Atom( 14 ); |
1788 | 8 | yylval->atom->setIsAromatic(true); |
1789 | 8 | return AROMATIC_ATOM_TOKEN; |
1790 | 0 | } |
1791 | 0 | YY_BREAK |
1792 | 0 | case 141: |
1793 | 0 | YY_RULE_SETUP |
1794 | 0 | { yylval->atom = new Atom( 33 ); |
1795 | 0 | yylval->atom->setIsAromatic(true); |
1796 | 0 | return AROMATIC_ATOM_TOKEN; |
1797 | 0 | } |
1798 | 0 | YY_BREAK |
1799 | 0 | case 142: |
1800 | 0 | YY_RULE_SETUP |
1801 | 0 | { yylval->atom = new Atom( 34 ); |
1802 | 0 | yylval->atom->setIsAromatic(true); |
1803 | 0 | return AROMATIC_ATOM_TOKEN; |
1804 | 0 | } |
1805 | 0 | YY_BREAK |
1806 | 0 | case 143: |
1807 | 0 | YY_RULE_SETUP |
1808 | 0 | { yylval->atom = new Atom( 52 ); |
1809 | 0 | yylval->atom->setIsAromatic(true); |
1810 | 0 | return AROMATIC_ATOM_TOKEN; |
1811 | 0 | } |
1812 | 0 | YY_BREAK |
1813 | 30.3k | case 144: |
1814 | 30.3k | YY_RULE_SETUP |
1815 | 30.3k | { yylval->atom = new Atom( 0 ); |
1816 | 30.3k | yylval->atom->setProp(common_properties::dummyLabel, |
1817 | 30.3k | std::string("*")); |
1818 | | // must be ORGANIC_ATOM_TOKEN because |
1819 | | // we aren't in square brackets: |
1820 | 30.3k | return ORGANIC_ATOM_TOKEN; |
1821 | 0 | } |
1822 | 0 | YY_BREAK |
1823 | 26.4k | case 145: |
1824 | 26.4k | YY_RULE_SETUP |
1825 | 26.4k | { return COLON_TOKEN; } |
1826 | 0 | YY_BREAK |
1827 | 1.61k | case 146: |
1828 | 1.61k | YY_RULE_SETUP |
1829 | 1.61k | { return HASH_TOKEN; } |
1830 | 0 | YY_BREAK |
1831 | | |
1832 | | // The next block is a workaround for a pathlogy in the SMILES produced |
1833 | | // by some Biovia tools |
1834 | | |
1835 | 0 | case 147: |
1836 | 0 | YY_RULE_SETUP |
1837 | 0 | { yylval->atom = new Atom(104); return ATOM_TOKEN; } |
1838 | 0 | YY_BREAK |
1839 | 0 | case 148: |
1840 | 0 | YY_RULE_SETUP |
1841 | 0 | { yylval->atom = new Atom(105); return ATOM_TOKEN; } |
1842 | 0 | YY_BREAK |
1843 | 0 | case 149: |
1844 | 0 | YY_RULE_SETUP |
1845 | 0 | { yylval->atom = new Atom(106); return ATOM_TOKEN; } |
1846 | 0 | YY_BREAK |
1847 | 0 | case 150: |
1848 | 0 | YY_RULE_SETUP |
1849 | 0 | { yylval->atom = new Atom(107); return ATOM_TOKEN; } |
1850 | 0 | YY_BREAK |
1851 | 0 | case 151: |
1852 | 0 | YY_RULE_SETUP |
1853 | 0 | { yylval->atom = new Atom(108); return ATOM_TOKEN; } |
1854 | 0 | YY_BREAK |
1855 | 0 | case 152: |
1856 | 0 | YY_RULE_SETUP |
1857 | 0 | { yylval->atom = new Atom(109); return ATOM_TOKEN; } |
1858 | 0 | YY_BREAK |
1859 | 0 | case 153: |
1860 | 0 | YY_RULE_SETUP |
1861 | 0 | { yylval->atom = new Atom(110); return ATOM_TOKEN; } |
1862 | 0 | YY_BREAK |
1863 | 0 | case 154: |
1864 | 0 | YY_RULE_SETUP |
1865 | 0 | { yylval->atom = new Atom(111); return ATOM_TOKEN; } |
1866 | 0 | YY_BREAK |
1867 | 0 | case 155: |
1868 | 0 | YY_RULE_SETUP |
1869 | 0 | { yylval->atom = new Atom(112); return ATOM_TOKEN; } |
1870 | 0 | YY_BREAK |
1871 | 0 | case 156: |
1872 | 0 | YY_RULE_SETUP |
1873 | 0 | { yylval->atom = new Atom(113); return ATOM_TOKEN; } |
1874 | 0 | YY_BREAK |
1875 | 0 | case 157: |
1876 | 0 | YY_RULE_SETUP |
1877 | 0 | { yylval->atom = new Atom(114); return ATOM_TOKEN; } |
1878 | 0 | YY_BREAK |
1879 | 0 | case 158: |
1880 | 0 | YY_RULE_SETUP |
1881 | 0 | { yylval->atom = new Atom(115); return ATOM_TOKEN; } |
1882 | 0 | YY_BREAK |
1883 | 21 | case 159: |
1884 | 21 | YY_RULE_SETUP |
1885 | 21 | { yylval->atom = new Atom(116); return ATOM_TOKEN; } |
1886 | 0 | YY_BREAK |
1887 | 0 | case 160: |
1888 | 0 | YY_RULE_SETUP |
1889 | 0 | { yylval->atom = new Atom(117); return ATOM_TOKEN; } |
1890 | 0 | YY_BREAK |
1891 | 67 | case 161: |
1892 | 67 | YY_RULE_SETUP |
1893 | 67 | { yylval->atom = new Atom(118); return ATOM_TOKEN; } |
1894 | 0 | YY_BREAK |
1895 | 197k | case 162: |
1896 | 197k | YY_RULE_SETUP |
1897 | 197k | { yylval->bond = new Bond(Bond::DOUBLE); |
1898 | 197k | return BOND_TOKEN; } |
1899 | 0 | YY_BREAK |
1900 | 4.42k | case 163: |
1901 | 4.42k | YY_RULE_SETUP |
1902 | 4.42k | { yylval->bond = new Bond(Bond::TRIPLE); |
1903 | 4.42k | return BOND_TOKEN; } |
1904 | 0 | YY_BREAK |
1905 | 12.1k | case 164: |
1906 | 12.1k | YY_RULE_SETUP |
1907 | 12.1k | { yylval->bond = new Bond(Bond::AROMATIC); |
1908 | 12.1k | yylval->bond->setIsAromatic(true); |
1909 | 12.1k | return BOND_TOKEN; } |
1910 | 0 | YY_BREAK |
1911 | 32.7k | case 165: |
1912 | 32.7k | YY_RULE_SETUP |
1913 | 32.7k | { yylval->bond = new Bond(Bond::QUADRUPLE); |
1914 | 32.7k | return BOND_TOKEN; } |
1915 | 0 | YY_BREAK |
1916 | 11 | case 166: |
1917 | 11 | YY_RULE_SETUP |
1918 | 11 | { yylval->bond = new Bond(Bond::DATIVER); |
1919 | 11 | return BOND_TOKEN; } |
1920 | 0 | YY_BREAK |
1921 | 0 | case 167: |
1922 | 0 | YY_RULE_SETUP |
1923 | 0 | { yylval->bond = new Bond(Bond::DATIVEL); |
1924 | 0 | return BOND_TOKEN; } |
1925 | 0 | YY_BREAK |
1926 | 2.90k | case 168: |
1927 | 2.90k | YY_RULE_SETUP |
1928 | 2.90k | { yylval->bond = new QueryBond(); |
1929 | 2.90k | yylval->bond->setQuery(makeBondNullQuery()); |
1930 | 2.90k | return BOND_TOKEN; } |
1931 | 0 | YY_BREAK |
1932 | 2.49k | case 169: |
1933 | 2.49k | YY_RULE_SETUP |
1934 | 2.49k | { yylval->bond = new Bond(Bond::UNSPECIFIED); |
1935 | 2.49k | yylval->bond->setProp(RDKit::common_properties::_unspecifiedOrder,1); |
1936 | 2.49k | yylval->bond->setBondDir(Bond::ENDDOWNRIGHT); |
1937 | 2.49k | return BOND_TOKEN; } |
1938 | 0 | YY_BREAK |
1939 | 153k | case 170: |
1940 | 153k | YY_RULE_SETUP |
1941 | 153k | { yylval->bond = new Bond(Bond::UNSPECIFIED); |
1942 | 153k | yylval->bond->setProp(RDKit::common_properties::_unspecifiedOrder,1); |
1943 | 153k | yylval->bond->setBondDir(Bond::ENDUPRIGHT); |
1944 | 153k | return BOND_TOKEN; } |
1945 | 0 | YY_BREAK |
1946 | 1.48k | case 171: |
1947 | 1.48k | YY_RULE_SETUP |
1948 | 1.48k | { return MINUS_TOKEN; } |
1949 | 0 | YY_BREAK |
1950 | 11.0k | case 172: |
1951 | 11.0k | YY_RULE_SETUP |
1952 | 11.0k | { return PLUS_TOKEN; } |
1953 | 0 | YY_BREAK |
1954 | 131k | case 173: |
1955 | 131k | YY_RULE_SETUP |
1956 | 131k | { return GROUP_OPEN_TOKEN; } |
1957 | 0 | YY_BREAK |
1958 | 127k | case 174: |
1959 | 127k | YY_RULE_SETUP |
1960 | 127k | { return GROUP_CLOSE_TOKEN; } |
1961 | 0 | YY_BREAK |
1962 | 1.19M | case 175: |
1963 | 1.19M | YY_RULE_SETUP |
1964 | 1.19M | { BEGIN IN_ATOM_STATE; return ATOM_OPEN_TOKEN; } |
1965 | 0 | YY_BREAK |
1966 | 91.8k | case 176: |
1967 | 91.8k | YY_RULE_SETUP |
1968 | 91.8k | { BEGIN INITIAL; return ATOM_CLOSE_TOKEN; } |
1969 | 0 | YY_BREAK |
1970 | 1.73M | case 177: |
1971 | 1.73M | YY_RULE_SETUP |
1972 | 1.73M | { return SEPARATOR_TOKEN; } |
1973 | 0 | YY_BREAK |
1974 | 4.04k | case 178: |
1975 | 4.04k | YY_RULE_SETUP |
1976 | 4.04k | { return PERCENT_TOKEN; } |
1977 | 0 | YY_BREAK |
1978 | 21.9k | case 179: |
1979 | 21.9k | YY_RULE_SETUP |
1980 | 21.9k | { yylval->ival = 0; return ZERO_TOKEN; } |
1981 | 0 | YY_BREAK |
1982 | 2.39M | case 180: |
1983 | 2.39M | YY_RULE_SETUP |
1984 | 2.39M | { yylval->ival = yytext[0] - '0'; return NONZERO_DIGIT_TOKEN; } |
1985 | 0 | YY_BREAK |
1986 | 2 | case 181: |
1987 | | /* rule 181 can match eol */ |
1988 | 2 | YY_RULE_SETUP |
1989 | 2 | return 0; |
1990 | 0 | YY_BREAK |
1991 | 200 | case YY_STATE_EOF(INITIAL): |
1992 | 211 | case YY_STATE_EOF(IN_ATOM_STATE): |
1993 | 211 | { return EOS_TOKEN; } |
1994 | 0 | YY_BREAK |
1995 | 5.86M | case 182: |
1996 | 5.86M | YY_RULE_SETUP |
1997 | 5.86M | return BAD_CHARACTER; |
1998 | 0 | YY_BREAK |
1999 | 0 | case 183: |
2000 | 0 | YY_RULE_SETUP |
2001 | 0 | YY_FATAL_ERROR( "flex scanner jammed" ); |
2002 | 0 | YY_BREAK |
2003 | | |
2004 | 6.42M | case YY_END_OF_BUFFER: |
2005 | 6.42M | { |
2006 | | /* Amount of text matched not including the EOB char. */ |
2007 | 6.42M | int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; |
2008 | | |
2009 | | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
2010 | 6.42M | *yy_cp = yyg->yy_hold_char; |
2011 | 6.42M | YY_RESTORE_YY_MORE_OFFSET |
2012 | | |
2013 | 6.42M | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
2014 | 214 | { |
2015 | | /* We're scanning a new file or input source. It's |
2016 | | * possible that this happened because the user |
2017 | | * just pointed yyin at a new source and called |
2018 | | * yylex(). If so, then we have to assure |
2019 | | * consistency between YY_CURRENT_BUFFER and our |
2020 | | * globals. Here is the right place to do so, because |
2021 | | * this is the first action (other than possibly a |
2022 | | * back-up) that will match for the new input source. |
2023 | | */ |
2024 | 214 | yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
2025 | 214 | YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; |
2026 | 214 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
2027 | 214 | } |
2028 | | |
2029 | | /* Note that here we test for yy_c_buf_p "<=" to the position |
2030 | | * of the first EOB in the buffer, since yy_c_buf_p will |
2031 | | * already have been incremented past the NUL character |
2032 | | * (since all states make transitions on EOB to the |
2033 | | * end-of-buffer state). Contrast this with the test |
2034 | | * in input(). |
2035 | | */ |
2036 | 6.42M | if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
2037 | 6.41M | { /* This was really a NUL. */ |
2038 | 6.41M | yy_state_type yy_next_state; |
2039 | | |
2040 | 6.41M | yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; |
2041 | | |
2042 | 6.41M | yy_current_state = yy_get_previous_state( yyscanner ); |
2043 | | |
2044 | | /* Okay, we're now positioned to make the NUL |
2045 | | * transition. We couldn't have |
2046 | | * yy_get_previous_state() go ahead and do it |
2047 | | * for us because it doesn't know how to deal |
2048 | | * with the possibility of jamming (and we don't |
2049 | | * want to build jamming into it because then it |
2050 | | * will run more slowly). |
2051 | | */ |
2052 | | |
2053 | 6.41M | yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); |
2054 | | |
2055 | 6.41M | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
2056 | | |
2057 | 6.41M | if ( yy_next_state ) |
2058 | 3.20M | { |
2059 | | /* Consume the NUL. */ |
2060 | 3.20M | yy_cp = ++yyg->yy_c_buf_p; |
2061 | 3.20M | yy_current_state = yy_next_state; |
2062 | 3.20M | goto yy_match; |
2063 | 3.20M | } |
2064 | | |
2065 | 3.20M | else |
2066 | 3.20M | { |
2067 | 3.20M | yy_cp = yyg->yy_last_accepting_cpos; |
2068 | 3.20M | yy_current_state = yyg->yy_last_accepting_state; |
2069 | 3.20M | goto yy_find_action; |
2070 | 3.20M | } |
2071 | 6.41M | } |
2072 | | |
2073 | 422 | else switch ( yy_get_next_buffer( yyscanner ) ) |
2074 | 422 | { |
2075 | 211 | case EOB_ACT_END_OF_FILE: |
2076 | 211 | { |
2077 | 211 | yyg->yy_did_buffer_switch_on_eof = 0; |
2078 | | |
2079 | 211 | if ( yywrap( yyscanner ) ) |
2080 | 211 | { |
2081 | | /* Note: because we've taken care in |
2082 | | * yy_get_next_buffer() to have set up |
2083 | | * yytext, we can now set up |
2084 | | * yy_c_buf_p so that if some total |
2085 | | * hoser (like flex itself) wants to |
2086 | | * call the scanner after we return the |
2087 | | * YY_NULL, it'll still work - another |
2088 | | * YY_NULL will get returned. |
2089 | | */ |
2090 | 211 | yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; |
2091 | | |
2092 | 211 | yy_act = YY_STATE_EOF(YY_START); |
2093 | 211 | goto do_action; |
2094 | 211 | } |
2095 | | |
2096 | 0 | else |
2097 | 0 | { |
2098 | 0 | if ( ! yyg->yy_did_buffer_switch_on_eof ) |
2099 | 0 | YY_NEW_FILE; |
2100 | 0 | } |
2101 | 0 | break; |
2102 | 211 | } |
2103 | | |
2104 | 0 | case EOB_ACT_CONTINUE_SCAN: |
2105 | 0 | yyg->yy_c_buf_p = |
2106 | 0 | yyg->yytext_ptr + yy_amount_of_matched_text; |
2107 | |
|
2108 | 0 | yy_current_state = yy_get_previous_state( yyscanner ); |
2109 | |
|
2110 | 0 | yy_cp = yyg->yy_c_buf_p; |
2111 | 0 | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
2112 | 0 | goto yy_match; |
2113 | | |
2114 | 211 | case EOB_ACT_LAST_MATCH: |
2115 | 211 | yyg->yy_c_buf_p = |
2116 | 211 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; |
2117 | | |
2118 | 211 | yy_current_state = yy_get_previous_state( yyscanner ); |
2119 | | |
2120 | 211 | yy_cp = yyg->yy_c_buf_p; |
2121 | 211 | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
2122 | 211 | goto yy_find_action; |
2123 | 422 | } |
2124 | 0 | break; |
2125 | 6.42M | } |
2126 | | |
2127 | 0 | default: |
2128 | 0 | YY_FATAL_ERROR( |
2129 | 25.6M | "fatal flex scanner internal error--no action found" ); |
2130 | 25.6M | } /* end of action switch */ |
2131 | 25.6M | } /* end of scanning one token */ |
2132 | 19.2M | } /* end of user's declarations */ |
2133 | 19.2M | } /* end of yylex */ |
2134 | | |
2135 | | /* yy_get_next_buffer - try to read in a new buffer |
2136 | | * |
2137 | | * Returns a code representing an action: |
2138 | | * EOB_ACT_LAST_MATCH - |
2139 | | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
2140 | | * EOB_ACT_END_OF_FILE - end of file |
2141 | | */ |
2142 | | static int yy_get_next_buffer (yyscan_t yyscanner) |
2143 | 422 | { |
2144 | 422 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2145 | 422 | char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
2146 | 422 | char *source = yyg->yytext_ptr; |
2147 | 422 | int number_to_move, i; |
2148 | 422 | int ret_val; |
2149 | | |
2150 | 422 | if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) |
2151 | 0 | YY_FATAL_ERROR( |
2152 | 422 | "fatal flex scanner internal error--end of buffer missed" ); |
2153 | | |
2154 | 422 | if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) |
2155 | 422 | { /* Don't try to fill the buffer, so this is an EOF. */ |
2156 | 422 | if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) |
2157 | 211 | { |
2158 | | /* We matched a single character, the EOB, so |
2159 | | * treat this as a final EOF. |
2160 | | */ |
2161 | 211 | return EOB_ACT_END_OF_FILE; |
2162 | 211 | } |
2163 | | |
2164 | 211 | else |
2165 | 211 | { |
2166 | | /* We matched some text prior to the EOB, first |
2167 | | * process it. |
2168 | | */ |
2169 | 211 | return EOB_ACT_LAST_MATCH; |
2170 | 211 | } |
2171 | 422 | } |
2172 | | |
2173 | | /* Try to read more data. */ |
2174 | | |
2175 | | /* First move last chars to start of buffer. */ |
2176 | 0 | number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); |
2177 | |
|
2178 | 0 | for ( i = 0; i < number_to_move; ++i ) |
2179 | 0 | *(dest++) = *(source++); |
2180 | |
|
2181 | 0 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
2182 | | /* don't do the read, it's not guaranteed to return an EOF, |
2183 | | * just force an EOF |
2184 | | */ |
2185 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; |
2186 | | |
2187 | 0 | else |
2188 | 0 | { |
2189 | 0 | int num_to_read = |
2190 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
2191 | |
|
2192 | 0 | while ( num_to_read <= 0 ) |
2193 | 0 | { /* Not enough room in the buffer - grow it. */ |
2194 | | |
2195 | | /* just a shorter name for the current buffer */ |
2196 | 0 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; |
2197 | |
|
2198 | 0 | int yy_c_buf_p_offset = |
2199 | 0 | (int) (yyg->yy_c_buf_p - b->yy_ch_buf); |
2200 | |
|
2201 | 0 | if ( b->yy_is_our_buffer ) |
2202 | 0 | { |
2203 | 0 | int new_size = b->yy_buf_size * 2; |
2204 | |
|
2205 | 0 | if ( new_size <= 0 ) |
2206 | 0 | b->yy_buf_size += b->yy_buf_size / 8; |
2207 | 0 | else |
2208 | 0 | b->yy_buf_size *= 2; |
2209 | |
|
2210 | 0 | b->yy_ch_buf = (char *) |
2211 | | /* Include room in for 2 EOB chars. */ |
2212 | 0 | yyrealloc( (void *) b->yy_ch_buf, |
2213 | 0 | (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
2214 | 0 | } |
2215 | 0 | else |
2216 | | /* Can't grow it, we don't own it. */ |
2217 | 0 | b->yy_ch_buf = NULL; |
2218 | |
|
2219 | 0 | if ( ! b->yy_ch_buf ) |
2220 | 0 | YY_FATAL_ERROR( |
2221 | 0 | "fatal error - scanner input buffer overflow" ); |
2222 | |
|
2223 | 0 | yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; |
2224 | |
|
2225 | 0 | num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
2226 | 0 | number_to_move - 1; |
2227 | |
|
2228 | 0 | } |
2229 | |
|
2230 | 0 | if ( num_to_read > YY_READ_BUF_SIZE ) |
2231 | 0 | num_to_read = YY_READ_BUF_SIZE; |
2232 | | |
2233 | | /* Read in more data. */ |
2234 | 0 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
2235 | 0 | yyg->yy_n_chars, num_to_read ); |
2236 | |
|
2237 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
2238 | 0 | } |
2239 | |
|
2240 | 0 | if ( yyg->yy_n_chars == 0 ) |
2241 | 0 | { |
2242 | 0 | if ( number_to_move == YY_MORE_ADJ ) |
2243 | 0 | { |
2244 | 0 | ret_val = EOB_ACT_END_OF_FILE; |
2245 | 0 | yyrestart( yyin , yyscanner); |
2246 | 0 | } |
2247 | | |
2248 | 0 | else |
2249 | 0 | { |
2250 | 0 | ret_val = EOB_ACT_LAST_MATCH; |
2251 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
2252 | 0 | YY_BUFFER_EOF_PENDING; |
2253 | 0 | } |
2254 | 0 | } |
2255 | | |
2256 | 0 | else |
2257 | 0 | ret_val = EOB_ACT_CONTINUE_SCAN; |
2258 | |
|
2259 | 0 | if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { |
2260 | | /* Extend the array by 50%, plus the number we really need. */ |
2261 | 0 | int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); |
2262 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( |
2263 | 0 | (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); |
2264 | 0 | if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
2265 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); |
2266 | | /* "- 2" to take care of EOB's */ |
2267 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); |
2268 | 0 | } |
2269 | |
|
2270 | 0 | yyg->yy_n_chars += number_to_move; |
2271 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; |
2272 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; |
2273 | |
|
2274 | 0 | yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
2275 | |
|
2276 | 0 | return ret_val; |
2277 | 422 | } |
2278 | | |
2279 | | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
2280 | | |
2281 | | static yy_state_type yy_get_previous_state (yyscan_t yyscanner) |
2282 | 6.41M | { |
2283 | 6.41M | yy_state_type yy_current_state; |
2284 | 6.41M | char *yy_cp; |
2285 | 6.41M | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2286 | | |
2287 | 6.41M | yy_current_state = yyg->yy_start; |
2288 | | |
2289 | 9.62M | for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) |
2290 | 3.21M | { |
2291 | 3.21M | YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
2292 | 3.21M | if ( yy_accept[yy_current_state] ) |
2293 | 17 | { |
2294 | 17 | yyg->yy_last_accepting_state = yy_current_state; |
2295 | 17 | yyg->yy_last_accepting_cpos = yy_cp; |
2296 | 17 | } |
2297 | 3.30M | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
2298 | 92.4k | { |
2299 | 92.4k | yy_current_state = (int) yy_def[yy_current_state]; |
2300 | 92.4k | if ( yy_current_state >= 247 ) |
2301 | 0 | yy_c = yy_meta[yy_c]; |
2302 | 92.4k | } |
2303 | 3.21M | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
2304 | 3.21M | } |
2305 | | |
2306 | 6.41M | return yy_current_state; |
2307 | 6.41M | } |
2308 | | |
2309 | | /* yy_try_NUL_trans - try to make a transition on the NUL character |
2310 | | * |
2311 | | * synopsis |
2312 | | * next_state = yy_try_NUL_trans( current_state ); |
2313 | | */ |
2314 | | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) |
2315 | 6.41M | { |
2316 | 6.41M | int yy_is_jam; |
2317 | 6.41M | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ |
2318 | 6.41M | char *yy_cp = yyg->yy_c_buf_p; |
2319 | | |
2320 | 6.41M | YY_CHAR yy_c = 1; |
2321 | 6.41M | if ( yy_accept[yy_current_state] ) |
2322 | 3.20M | { |
2323 | 3.20M | yyg->yy_last_accepting_state = yy_current_state; |
2324 | 3.20M | yyg->yy_last_accepting_cpos = yy_cp; |
2325 | 3.20M | } |
2326 | 9.72M | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
2327 | 3.30M | { |
2328 | 3.30M | yy_current_state = (int) yy_def[yy_current_state]; |
2329 | 3.30M | if ( yy_current_state >= 247 ) |
2330 | 0 | yy_c = yy_meta[yy_c]; |
2331 | 3.30M | } |
2332 | 6.41M | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
2333 | 6.41M | yy_is_jam = (yy_current_state == 246); |
2334 | | |
2335 | 6.41M | (void)yyg; |
2336 | 6.41M | return yy_is_jam ? 0 : yy_current_state; |
2337 | 6.41M | } |
2338 | | |
2339 | | #ifndef YY_NO_UNPUT |
2340 | | |
2341 | | static void yyunput (int c, char * yy_bp , yyscan_t yyscanner) |
2342 | 0 | { |
2343 | 0 | char *yy_cp; |
2344 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2345 | 0 |
|
2346 | 0 | yy_cp = yyg->yy_c_buf_p; |
2347 | 0 |
|
2348 | 0 | /* undo effects of setting up yytext */ |
2349 | 0 | *yy_cp = yyg->yy_hold_char; |
2350 | 0 |
|
2351 | 0 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
2352 | 0 | { /* need to shift things up to make room */ |
2353 | 0 | /* +2 for EOB chars. */ |
2354 | 0 | int number_to_move = yyg->yy_n_chars + 2; |
2355 | 0 | char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ |
2356 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; |
2357 | 0 | char *source = |
2358 | 0 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; |
2359 | 0 |
|
2360 | 0 | while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
2361 | 0 | *--dest = *--source; |
2362 | 0 |
|
2363 | 0 | yy_cp += (int) (dest - source); |
2364 | 0 | yy_bp += (int) (dest - source); |
2365 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = |
2366 | 0 | yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; |
2367 | 0 |
|
2368 | 0 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
2369 | 0 | YY_FATAL_ERROR( "flex scanner push-back overflow" ); |
2370 | 0 | } |
2371 | 0 |
|
2372 | 0 | *--yy_cp = (char) c; |
2373 | 0 |
|
2374 | 0 | yyg->yytext_ptr = yy_bp; |
2375 | 0 | yyg->yy_hold_char = *yy_cp; |
2376 | 0 | yyg->yy_c_buf_p = yy_cp; |
2377 | 0 | } |
2378 | | |
2379 | | #endif |
2380 | | |
2381 | | #ifndef YY_NO_INPUT |
2382 | | #ifdef __cplusplus |
2383 | | static int yyinput (yyscan_t yyscanner) |
2384 | | #else |
2385 | | static int input (yyscan_t yyscanner) |
2386 | | #endif |
2387 | | |
2388 | 0 | { |
2389 | 0 | int c; |
2390 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2391 | 0 |
|
2392 | 0 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
2393 | 0 |
|
2394 | 0 | if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) |
2395 | 0 | { |
2396 | 0 | /* yy_c_buf_p now points to the character we want to return. |
2397 | 0 | * If this occurs *before* the EOB characters, then it's a |
2398 | 0 | * valid NUL; if not, then we've hit the end of the buffer. |
2399 | 0 | */ |
2400 | 0 | if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
2401 | 0 | /* This was really a NUL. */ |
2402 | 0 | *yyg->yy_c_buf_p = '\0'; |
2403 | 0 |
|
2404 | 0 | else |
2405 | 0 | { /* need more input */ |
2406 | 0 | int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); |
2407 | 0 | ++yyg->yy_c_buf_p; |
2408 | 0 |
|
2409 | 0 | switch ( yy_get_next_buffer( yyscanner ) ) |
2410 | 0 | { |
2411 | 0 | case EOB_ACT_LAST_MATCH: |
2412 | 0 | /* This happens because yy_g_n_b() |
2413 | 0 | * sees that we've accumulated a |
2414 | 0 | * token and flags that we need to |
2415 | 0 | * try matching the token before |
2416 | 0 | * proceeding. But for input(), |
2417 | 0 | * there's no matching to consider. |
2418 | 0 | * So convert the EOB_ACT_LAST_MATCH |
2419 | 0 | * to EOB_ACT_END_OF_FILE. |
2420 | 0 | */ |
2421 | 0 |
|
2422 | 0 | /* Reset buffer status. */ |
2423 | 0 | yyrestart( yyin , yyscanner); |
2424 | 0 |
|
2425 | 0 | /*FALLTHROUGH*/ |
2426 | 0 |
|
2427 | 0 | case EOB_ACT_END_OF_FILE: |
2428 | 0 | { |
2429 | 0 | if ( yywrap( yyscanner ) ) |
2430 | 0 | return 0; |
2431 | 0 |
|
2432 | 0 | if ( ! yyg->yy_did_buffer_switch_on_eof ) |
2433 | 0 | YY_NEW_FILE; |
2434 | 0 | #ifdef __cplusplus |
2435 | 0 | return yyinput(yyscanner); |
2436 | 0 | #else |
2437 | 0 | return input(yyscanner); |
2438 | 0 | #endif |
2439 | 0 | } |
2440 | 0 |
|
2441 | 0 | case EOB_ACT_CONTINUE_SCAN: |
2442 | 0 | yyg->yy_c_buf_p = yyg->yytext_ptr + offset; |
2443 | 0 | break; |
2444 | 0 | } |
2445 | 0 | } |
2446 | 0 | } |
2447 | 0 |
|
2448 | 0 | c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ |
2449 | 0 | *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ |
2450 | 0 | yyg->yy_hold_char = *++yyg->yy_c_buf_p; |
2451 | 0 |
|
2452 | 0 | return c; |
2453 | 0 | } |
2454 | | #endif /* ifndef YY_NO_INPUT */ |
2455 | | |
2456 | | /** Immediately switch to a different input stream. |
2457 | | * @param input_file A readable stream. |
2458 | | * @param yyscanner The scanner object. |
2459 | | * @note This function does not reset the start condition to @c INITIAL . |
2460 | | */ |
2461 | | void yyrestart (FILE * input_file , yyscan_t yyscanner) |
2462 | 0 | { |
2463 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2464 | |
|
2465 | 0 | if ( ! YY_CURRENT_BUFFER ){ |
2466 | 0 | yyensure_buffer_stack (yyscanner); |
2467 | 0 | YY_CURRENT_BUFFER_LVALUE = |
2468 | 0 | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
2469 | 0 | } |
2470 | |
|
2471 | 0 | yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); |
2472 | 0 | yy_load_buffer_state( yyscanner ); |
2473 | 0 | } |
2474 | | |
2475 | | /** Switch to a different input buffer. |
2476 | | * @param new_buffer The new input buffer. |
2477 | | * @param yyscanner The scanner object. |
2478 | | */ |
2479 | | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
2480 | 223 | { |
2481 | 223 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2482 | | |
2483 | | /* TODO. We should be able to replace this entire function body |
2484 | | * with |
2485 | | * yypop_buffer_state(); |
2486 | | * yypush_buffer_state(new_buffer); |
2487 | | */ |
2488 | 223 | yyensure_buffer_stack (yyscanner); |
2489 | 223 | if ( YY_CURRENT_BUFFER == new_buffer ) |
2490 | 0 | return; |
2491 | | |
2492 | 223 | if ( YY_CURRENT_BUFFER ) |
2493 | 0 | { |
2494 | | /* Flush out information for old buffer. */ |
2495 | 0 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
2496 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
2497 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
2498 | 0 | } |
2499 | | |
2500 | 223 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
2501 | 223 | yy_load_buffer_state( yyscanner ); |
2502 | | |
2503 | | /* We don't actually know whether we did this switch during |
2504 | | * EOF (yywrap()) processing, but the only time this flag |
2505 | | * is looked at is after yywrap() is called, so it's safe |
2506 | | * to go ahead and always set it. |
2507 | | */ |
2508 | 223 | yyg->yy_did_buffer_switch_on_eof = 1; |
2509 | 223 | } |
2510 | | |
2511 | | static void yy_load_buffer_state (yyscan_t yyscanner) |
2512 | 446 | { |
2513 | 446 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2514 | 446 | yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
2515 | 446 | yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
2516 | 446 | yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
2517 | 446 | yyg->yy_hold_char = *yyg->yy_c_buf_p; |
2518 | 446 | } |
2519 | | |
2520 | | /** Allocate and initialize an input buffer state. |
2521 | | * @param file A readable stream. |
2522 | | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
2523 | | * @param yyscanner The scanner object. |
2524 | | * @return the allocated buffer state. |
2525 | | */ |
2526 | | YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) |
2527 | 0 | { |
2528 | 0 | YY_BUFFER_STATE b; |
2529 | | |
2530 | 0 | b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
2531 | 0 | if ( ! b ) |
2532 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
2533 | |
|
2534 | 0 | b->yy_buf_size = size; |
2535 | | |
2536 | | /* yy_ch_buf has to be 2 characters longer than the size given because |
2537 | | * we need to put in 2 end-of-buffer characters. |
2538 | | */ |
2539 | 0 | b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
2540 | 0 | if ( ! b->yy_ch_buf ) |
2541 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
2542 | |
|
2543 | 0 | b->yy_is_our_buffer = 1; |
2544 | |
|
2545 | 0 | yy_init_buffer( b, file , yyscanner); |
2546 | |
|
2547 | 0 | return b; |
2548 | 0 | } |
2549 | | |
2550 | | /** Destroy the buffer. |
2551 | | * @param b a buffer created with yy_create_buffer() |
2552 | | * @param yyscanner The scanner object. |
2553 | | */ |
2554 | | void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
2555 | 223 | { |
2556 | 223 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2557 | | |
2558 | 223 | if ( ! b ) |
2559 | 0 | return; |
2560 | | |
2561 | 223 | if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
2562 | 223 | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
2563 | | |
2564 | 223 | if ( b->yy_is_our_buffer ) |
2565 | 223 | yyfree( (void *) b->yy_ch_buf , yyscanner ); |
2566 | | |
2567 | 223 | yyfree( (void *) b , yyscanner ); |
2568 | 223 | } |
2569 | | |
2570 | | /* Initializes or reinitializes a buffer. |
2571 | | * This function is sometimes called more than once on the same buffer, |
2572 | | * such as during a yyrestart() or at EOF. |
2573 | | */ |
2574 | | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
2575 | | |
2576 | 0 | { |
2577 | 0 | int oerrno = errno; |
2578 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2579 | |
|
2580 | 0 | yy_flush_buffer( b , yyscanner); |
2581 | |
|
2582 | 0 | b->yy_input_file = file; |
2583 | 0 | b->yy_fill_buffer = 1; |
2584 | | |
2585 | | /* If b is the current buffer, then yy_init_buffer was _probably_ |
2586 | | * called from yyrestart() or through yy_get_next_buffer. |
2587 | | * In that case, we don't want to reset the lineno or column. |
2588 | | */ |
2589 | 0 | if (b != YY_CURRENT_BUFFER){ |
2590 | 0 | b->yy_bs_lineno = 1; |
2591 | 0 | b->yy_bs_column = 0; |
2592 | 0 | } |
2593 | |
|
2594 | 0 | b->yy_is_interactive = 0; |
2595 | | |
2596 | 0 | errno = oerrno; |
2597 | 0 | } |
2598 | | |
2599 | | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
2600 | | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
2601 | | * @param yyscanner The scanner object. |
2602 | | */ |
2603 | | void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
2604 | 0 | { |
2605 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2606 | 0 | if ( ! b ) |
2607 | 0 | return; |
2608 | | |
2609 | 0 | b->yy_n_chars = 0; |
2610 | | |
2611 | | /* We always need two end-of-buffer characters. The first causes |
2612 | | * a transition to the end-of-buffer state. The second causes |
2613 | | * a jam in that state. |
2614 | | */ |
2615 | 0 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
2616 | 0 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
2617 | |
|
2618 | 0 | b->yy_buf_pos = &b->yy_ch_buf[0]; |
2619 | |
|
2620 | 0 | b->yy_at_bol = 1; |
2621 | 0 | b->yy_buffer_status = YY_BUFFER_NEW; |
2622 | |
|
2623 | 0 | if ( b == YY_CURRENT_BUFFER ) |
2624 | 0 | yy_load_buffer_state( yyscanner ); |
2625 | 0 | } |
2626 | | |
2627 | | /** Pushes the new state onto the stack. The new state becomes |
2628 | | * the current state. This function will allocate the stack |
2629 | | * if necessary. |
2630 | | * @param new_buffer The new state. |
2631 | | * @param yyscanner The scanner object. |
2632 | | */ |
2633 | | void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
2634 | 0 | { |
2635 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2636 | 0 | if (new_buffer == NULL) |
2637 | 0 | return; |
2638 | | |
2639 | 0 | yyensure_buffer_stack(yyscanner); |
2640 | | |
2641 | | /* This block is copied from yy_switch_to_buffer. */ |
2642 | 0 | if ( YY_CURRENT_BUFFER ) |
2643 | 0 | { |
2644 | | /* Flush out information for old buffer. */ |
2645 | 0 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
2646 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
2647 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
2648 | 0 | } |
2649 | | |
2650 | | /* Only push if top exists. Otherwise, replace top. */ |
2651 | 0 | if (YY_CURRENT_BUFFER) |
2652 | 0 | yyg->yy_buffer_stack_top++; |
2653 | 0 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
2654 | | |
2655 | | /* copied from yy_switch_to_buffer. */ |
2656 | 0 | yy_load_buffer_state( yyscanner ); |
2657 | 0 | yyg->yy_did_buffer_switch_on_eof = 1; |
2658 | 0 | } |
2659 | | |
2660 | | /** Removes and deletes the top of the stack, if present. |
2661 | | * The next element becomes the new top. |
2662 | | * @param yyscanner The scanner object. |
2663 | | */ |
2664 | | void yypop_buffer_state (yyscan_t yyscanner) |
2665 | 223 | { |
2666 | 223 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2667 | 223 | if (!YY_CURRENT_BUFFER) |
2668 | 223 | return; |
2669 | | |
2670 | 0 | yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); |
2671 | 0 | YY_CURRENT_BUFFER_LVALUE = NULL; |
2672 | 0 | if (yyg->yy_buffer_stack_top > 0) |
2673 | 0 | --yyg->yy_buffer_stack_top; |
2674 | |
|
2675 | 0 | if (YY_CURRENT_BUFFER) { |
2676 | 0 | yy_load_buffer_state( yyscanner ); |
2677 | 0 | yyg->yy_did_buffer_switch_on_eof = 1; |
2678 | 0 | } |
2679 | 0 | } |
2680 | | |
2681 | | /* Allocates the stack if it does not exist. |
2682 | | * Guarantees space for at least one push. |
2683 | | */ |
2684 | | static void yyensure_buffer_stack (yyscan_t yyscanner) |
2685 | 223 | { |
2686 | 223 | yy_size_t num_to_alloc; |
2687 | 223 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2688 | | |
2689 | 223 | if (!yyg->yy_buffer_stack) { |
2690 | | |
2691 | | /* First allocation is just for 2 elements, since we don't know if this |
2692 | | * scanner will even need a stack. We use 2 instead of 1 to avoid an |
2693 | | * immediate realloc on the next call. |
2694 | | */ |
2695 | 223 | num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ |
2696 | 223 | yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc |
2697 | 223 | (num_to_alloc * sizeof(struct yy_buffer_state*) |
2698 | 223 | , yyscanner); |
2699 | 223 | if ( ! yyg->yy_buffer_stack ) |
2700 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
2701 | | |
2702 | 223 | memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
2703 | | |
2704 | 223 | yyg->yy_buffer_stack_max = num_to_alloc; |
2705 | 223 | yyg->yy_buffer_stack_top = 0; |
2706 | 223 | return; |
2707 | 223 | } |
2708 | | |
2709 | 0 | if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ |
2710 | | |
2711 | | /* Increase the buffer to prepare for a possible push. */ |
2712 | 0 | yy_size_t grow_size = 8 /* arbitrary grow size */; |
2713 | |
|
2714 | 0 | num_to_alloc = yyg->yy_buffer_stack_max + grow_size; |
2715 | 0 | yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc |
2716 | 0 | (yyg->yy_buffer_stack, |
2717 | 0 | num_to_alloc * sizeof(struct yy_buffer_state*) |
2718 | 0 | , yyscanner); |
2719 | 0 | if ( ! yyg->yy_buffer_stack ) |
2720 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
2721 | | |
2722 | | /* zero only the new slots.*/ |
2723 | 0 | memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); |
2724 | 0 | yyg->yy_buffer_stack_max = num_to_alloc; |
2725 | 0 | } |
2726 | 0 | } |
2727 | | |
2728 | | /** Setup the input buffer state to scan directly from a user-specified character buffer. |
2729 | | * @param base the character buffer |
2730 | | * @param size the size in bytes of the character buffer |
2731 | | * @param yyscanner The scanner object. |
2732 | | * @return the newly allocated buffer state object. |
2733 | | */ |
2734 | | YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) |
2735 | 223 | { |
2736 | 223 | YY_BUFFER_STATE b; |
2737 | | |
2738 | 223 | if ( size < 2 || |
2739 | 223 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
2740 | 223 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
2741 | | /* They forgot to leave room for the EOB's. */ |
2742 | 0 | return NULL; |
2743 | | |
2744 | 223 | b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
2745 | 223 | if ( ! b ) |
2746 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); |
2747 | | |
2748 | 223 | b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ |
2749 | 223 | b->yy_buf_pos = b->yy_ch_buf = base; |
2750 | 223 | b->yy_is_our_buffer = 0; |
2751 | 223 | b->yy_input_file = NULL; |
2752 | 223 | b->yy_n_chars = b->yy_buf_size; |
2753 | 223 | b->yy_is_interactive = 0; |
2754 | 223 | b->yy_at_bol = 1; |
2755 | 223 | b->yy_fill_buffer = 0; |
2756 | 223 | b->yy_buffer_status = YY_BUFFER_NEW; |
2757 | | |
2758 | 223 | yy_switch_to_buffer( b , yyscanner ); |
2759 | | |
2760 | 223 | return b; |
2761 | 223 | } |
2762 | | |
2763 | | /** Setup the input buffer state to scan a string. The next call to yylex() will |
2764 | | * scan from a @e copy of @a str. |
2765 | | * @param yystr a NUL-terminated string to scan |
2766 | | * @param yyscanner The scanner object. |
2767 | | * @return the newly allocated buffer state object. |
2768 | | * @note If you want to scan bytes that may contain NUL values, then use |
2769 | | * yy_scan_bytes() instead. |
2770 | | */ |
2771 | | YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) |
2772 | 0 | { |
2773 | | |
2774 | 0 | return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); |
2775 | 0 | } |
2776 | | |
2777 | | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
2778 | | * scan from a @e copy of @a bytes. |
2779 | | * @param yybytes the byte buffer to scan |
2780 | | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
2781 | | * @param yyscanner The scanner object. |
2782 | | * @return the newly allocated buffer state object. |
2783 | | */ |
2784 | | YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) |
2785 | 0 | { |
2786 | 0 | YY_BUFFER_STATE b; |
2787 | 0 | char *buf; |
2788 | 0 | yy_size_t n; |
2789 | 0 | int i; |
2790 | | |
2791 | | /* Get memory for full buffer, including space for trailing EOB's. */ |
2792 | 0 | n = (yy_size_t) (_yybytes_len + 2); |
2793 | 0 | buf = (char *) yyalloc( n , yyscanner ); |
2794 | 0 | if ( ! buf ) |
2795 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
2796 | |
|
2797 | 0 | for ( i = 0; i < _yybytes_len; ++i ) |
2798 | 0 | buf[i] = yybytes[i]; |
2799 | |
|
2800 | 0 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
2801 | |
|
2802 | 0 | b = yy_scan_buffer( buf, n , yyscanner); |
2803 | 0 | if ( ! b ) |
2804 | 0 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); |
2805 | | |
2806 | | /* It's okay to grow etc. this buffer, and we should throw it |
2807 | | * away when we're done. |
2808 | | */ |
2809 | 0 | b->yy_is_our_buffer = 1; |
2810 | |
|
2811 | 0 | return b; |
2812 | 0 | } |
2813 | | |
2814 | | #ifndef YY_EXIT_FAILURE |
2815 | | #define YY_EXIT_FAILURE 2 |
2816 | | #endif |
2817 | | |
2818 | | static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) |
2819 | 0 | { |
2820 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2821 | 0 | (void)yyg; |
2822 | 0 | fprintf( stderr, "%s\n", msg ); |
2823 | 0 | exit( YY_EXIT_FAILURE ); |
2824 | 0 | } |
2825 | | |
2826 | | /* Redefine yyless() so it works in section 3 code. */ |
2827 | | |
2828 | | #undef yyless |
2829 | | #define yyless(n) \ |
2830 | | do \ |
2831 | | { \ |
2832 | | /* Undo effects of setting up yytext. */ \ |
2833 | | int yyless_macro_arg = (n); \ |
2834 | | YY_LESS_LINENO(yyless_macro_arg);\ |
2835 | | yytext[yyleng] = yyg->yy_hold_char; \ |
2836 | | yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ |
2837 | | yyg->yy_hold_char = *yyg->yy_c_buf_p; \ |
2838 | | *yyg->yy_c_buf_p = '\0'; \ |
2839 | | yyleng = yyless_macro_arg; \ |
2840 | | } \ |
2841 | | while ( 0 ) |
2842 | | |
2843 | | /* Accessor methods (get/set functions) to struct members. */ |
2844 | | |
2845 | | /** Get the user-defined data for this scanner. |
2846 | | * @param yyscanner The scanner object. |
2847 | | */ |
2848 | | YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) |
2849 | 0 | { |
2850 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2851 | 0 | return yyextra; |
2852 | 0 | } |
2853 | | |
2854 | | /** Get the current line number. |
2855 | | * @param yyscanner The scanner object. |
2856 | | */ |
2857 | | int yyget_lineno (yyscan_t yyscanner) |
2858 | 0 | { |
2859 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2860 | |
|
2861 | 0 | if (! YY_CURRENT_BUFFER) |
2862 | 0 | return 0; |
2863 | | |
2864 | 0 | return yylineno; |
2865 | 0 | } |
2866 | | |
2867 | | /** Get the current column number. |
2868 | | * @param yyscanner The scanner object. |
2869 | | */ |
2870 | | int yyget_column (yyscan_t yyscanner) |
2871 | 0 | { |
2872 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2873 | |
|
2874 | 0 | if (! YY_CURRENT_BUFFER) |
2875 | 0 | return 0; |
2876 | | |
2877 | 0 | return yycolumn; |
2878 | 0 | } |
2879 | | |
2880 | | /** Get the input stream. |
2881 | | * @param yyscanner The scanner object. |
2882 | | */ |
2883 | | FILE *yyget_in (yyscan_t yyscanner) |
2884 | 0 | { |
2885 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2886 | 0 | return yyin; |
2887 | 0 | } |
2888 | | |
2889 | | /** Get the output stream. |
2890 | | * @param yyscanner The scanner object. |
2891 | | */ |
2892 | | FILE *yyget_out (yyscan_t yyscanner) |
2893 | 0 | { |
2894 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2895 | 0 | return yyout; |
2896 | 0 | } |
2897 | | |
2898 | | /** Get the length of the current token. |
2899 | | * @param yyscanner The scanner object. |
2900 | | */ |
2901 | | int yyget_leng (yyscan_t yyscanner) |
2902 | 0 | { |
2903 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2904 | 0 | return yyleng; |
2905 | 0 | } |
2906 | | |
2907 | | /** Get the current token. |
2908 | | * @param yyscanner The scanner object. |
2909 | | */ |
2910 | | |
2911 | | char *yyget_text (yyscan_t yyscanner) |
2912 | 0 | { |
2913 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2914 | 0 | return yytext; |
2915 | 0 | } |
2916 | | |
2917 | | /** Set the user-defined data. This data is never touched by the scanner. |
2918 | | * @param user_defined The data to be associated with this scanner. |
2919 | | * @param yyscanner The scanner object. |
2920 | | */ |
2921 | | void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) |
2922 | 0 | { |
2923 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2924 | 0 | yyextra = user_defined ; |
2925 | 0 | } |
2926 | | |
2927 | | /** Set the current line number. |
2928 | | * @param _line_number line number |
2929 | | * @param yyscanner The scanner object. |
2930 | | */ |
2931 | | void yyset_lineno (int _line_number , yyscan_t yyscanner) |
2932 | 0 | { |
2933 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2934 | | |
2935 | | /* lineno is only valid if an input buffer exists. */ |
2936 | 0 | if (! YY_CURRENT_BUFFER ) |
2937 | 0 | YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); |
2938 | | |
2939 | 0 | yylineno = _line_number; |
2940 | 0 | } |
2941 | | |
2942 | | /** Set the current column. |
2943 | | * @param _column_no column number |
2944 | | * @param yyscanner The scanner object. |
2945 | | */ |
2946 | | void yyset_column (int _column_no , yyscan_t yyscanner) |
2947 | 0 | { |
2948 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2949 | | |
2950 | | /* column is only valid if an input buffer exists. */ |
2951 | 0 | if (! YY_CURRENT_BUFFER ) |
2952 | 0 | YY_FATAL_ERROR( "yyset_column called with no buffer" ); |
2953 | | |
2954 | 0 | yycolumn = _column_no; |
2955 | 0 | } |
2956 | | |
2957 | | /** Set the input stream. This does not discard the current |
2958 | | * input buffer. |
2959 | | * @param _in_str A readable stream. |
2960 | | * @param yyscanner The scanner object. |
2961 | | * @see yy_switch_to_buffer |
2962 | | */ |
2963 | | void yyset_in (FILE * _in_str , yyscan_t yyscanner) |
2964 | 0 | { |
2965 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2966 | 0 | yyin = _in_str ; |
2967 | 0 | } |
2968 | | |
2969 | | void yyset_out (FILE * _out_str , yyscan_t yyscanner) |
2970 | 0 | { |
2971 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2972 | 0 | yyout = _out_str ; |
2973 | 0 | } |
2974 | | |
2975 | | int yyget_debug (yyscan_t yyscanner) |
2976 | 0 | { |
2977 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2978 | 0 | return yy_flex_debug; |
2979 | 0 | } |
2980 | | |
2981 | | void yyset_debug (int _bdebug , yyscan_t yyscanner) |
2982 | 0 | { |
2983 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2984 | 0 | yy_flex_debug = _bdebug ; |
2985 | 0 | } |
2986 | | |
2987 | | /* Accessor methods for yylval and yylloc */ |
2988 | | |
2989 | | YYSTYPE * yyget_lval (yyscan_t yyscanner) |
2990 | 0 | { |
2991 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2992 | 0 | return yylval; |
2993 | 0 | } |
2994 | | |
2995 | | void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) |
2996 | 0 | { |
2997 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2998 | 0 | yylval = yylval_param; |
2999 | 0 | } |
3000 | | |
3001 | | /* User-visible API */ |
3002 | | |
3003 | | /* yylex_init is special because it creates the scanner itself, so it is |
3004 | | * the ONLY reentrant function that doesn't take the scanner as the last argument. |
3005 | | * That's why we explicitly handle the declaration, instead of using our macros. |
3006 | | */ |
3007 | | int yylex_init(yyscan_t* ptr_yy_globals) |
3008 | 223 | { |
3009 | 223 | if (ptr_yy_globals == NULL){ |
3010 | 0 | errno = EINVAL; |
3011 | 0 | return 1; |
3012 | 0 | } |
3013 | | |
3014 | 223 | *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); |
3015 | | |
3016 | 223 | if (*ptr_yy_globals == NULL){ |
3017 | 0 | errno = ENOMEM; |
3018 | 0 | return 1; |
3019 | 0 | } |
3020 | | |
3021 | | /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ |
3022 | 223 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
3023 | | |
3024 | 223 | return yy_init_globals ( *ptr_yy_globals ); |
3025 | 223 | } |
3026 | | |
3027 | | /* yylex_init_extra has the same functionality as yylex_init, but follows the |
3028 | | * convention of taking the scanner as the last argument. Note however, that |
3029 | | * this is a *pointer* to a scanner, as it will be allocated by this call (and |
3030 | | * is the reason, too, why this function also must handle its own declaration). |
3031 | | * The user defined value in the first argument will be available to yyalloc in |
3032 | | * the yyextra field. |
3033 | | */ |
3034 | | int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) |
3035 | 0 | { |
3036 | 0 | struct yyguts_t dummy_yyguts; |
3037 | |
|
3038 | 0 | yyset_extra (yy_user_defined, &dummy_yyguts); |
3039 | |
|
3040 | 0 | if (ptr_yy_globals == NULL){ |
3041 | 0 | errno = EINVAL; |
3042 | 0 | return 1; |
3043 | 0 | } |
3044 | | |
3045 | 0 | *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); |
3046 | |
|
3047 | 0 | if (*ptr_yy_globals == NULL){ |
3048 | 0 | errno = ENOMEM; |
3049 | 0 | return 1; |
3050 | 0 | } |
3051 | | |
3052 | | /* By setting to 0xAA, we expose bugs in |
3053 | | yy_init_globals. Leave at 0x00 for releases. */ |
3054 | 0 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
3055 | |
|
3056 | 0 | yyset_extra (yy_user_defined, *ptr_yy_globals); |
3057 | |
|
3058 | 0 | return yy_init_globals ( *ptr_yy_globals ); |
3059 | 0 | } |
3060 | | |
3061 | | static int yy_init_globals (yyscan_t yyscanner) |
3062 | 446 | { |
3063 | 446 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3064 | | /* Initialization is the same as for the non-reentrant scanner. |
3065 | | * This function is called from yylex_destroy(), so don't allocate here. |
3066 | | */ |
3067 | | |
3068 | 446 | yyg->yy_buffer_stack = NULL; |
3069 | 446 | yyg->yy_buffer_stack_top = 0; |
3070 | 446 | yyg->yy_buffer_stack_max = 0; |
3071 | 446 | yyg->yy_c_buf_p = NULL; |
3072 | 446 | yyg->yy_init = 0; |
3073 | 446 | yyg->yy_start = 0; |
3074 | | |
3075 | 446 | yyg->yy_start_stack_ptr = 0; |
3076 | 446 | yyg->yy_start_stack_depth = 0; |
3077 | 446 | yyg->yy_start_stack = NULL; |
3078 | | |
3079 | | /* Defined in main.c */ |
3080 | | #ifdef YY_STDINIT |
3081 | | yyin = stdin; |
3082 | | yyout = stdout; |
3083 | | #else |
3084 | 446 | yyin = NULL; |
3085 | 446 | yyout = NULL; |
3086 | 446 | #endif |
3087 | | |
3088 | | /* For future reference: Set errno on error, since we are called by |
3089 | | * yylex_init() |
3090 | | */ |
3091 | 446 | return 0; |
3092 | 446 | } |
3093 | | |
3094 | | /* yylex_destroy is for both reentrant and non-reentrant scanners. */ |
3095 | | int yylex_destroy (yyscan_t yyscanner) |
3096 | 223 | { |
3097 | 223 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3098 | | |
3099 | | /* Pop the buffer stack, destroying each element. */ |
3100 | 446 | while(YY_CURRENT_BUFFER){ |
3101 | 223 | yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); |
3102 | 223 | YY_CURRENT_BUFFER_LVALUE = NULL; |
3103 | 223 | yypop_buffer_state(yyscanner); |
3104 | 223 | } |
3105 | | |
3106 | | /* Destroy the stack itself. */ |
3107 | 223 | yyfree(yyg->yy_buffer_stack , yyscanner); |
3108 | 223 | yyg->yy_buffer_stack = NULL; |
3109 | | |
3110 | | /* Destroy the start condition stack. */ |
3111 | 223 | yyfree( yyg->yy_start_stack , yyscanner ); |
3112 | 223 | yyg->yy_start_stack = NULL; |
3113 | | |
3114 | | /* Reset the globals. This is important in a non-reentrant scanner so the next time |
3115 | | * yylex() is called, initialization will occur. */ |
3116 | 223 | yy_init_globals( yyscanner); |
3117 | | |
3118 | | /* Destroy the main struct (reentrant only). */ |
3119 | 223 | yyfree ( yyscanner , yyscanner ); |
3120 | 223 | yyscanner = NULL; |
3121 | 223 | return 0; |
3122 | 223 | } |
3123 | | |
3124 | | /* |
3125 | | * Internal utility routines. |
3126 | | */ |
3127 | | |
3128 | | #ifndef yytext_ptr |
3129 | | static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) |
3130 | | { |
3131 | | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3132 | | (void)yyg; |
3133 | | |
3134 | | int i; |
3135 | | for ( i = 0; i < n; ++i ) |
3136 | | s1[i] = s2[i]; |
3137 | | } |
3138 | | #endif |
3139 | | |
3140 | | #ifdef YY_NEED_STRLEN |
3141 | | static int yy_flex_strlen (const char * s , yyscan_t yyscanner) |
3142 | | { |
3143 | | int n; |
3144 | | for ( n = 0; s[n]; ++n ) |
3145 | | ; |
3146 | | |
3147 | | return n; |
3148 | | } |
3149 | | #endif |
3150 | | |
3151 | | void *yyalloc (yy_size_t size , yyscan_t yyscanner) |
3152 | 892 | { |
3153 | 892 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3154 | 892 | (void)yyg; |
3155 | 892 | return malloc(size); |
3156 | 892 | } |
3157 | | |
3158 | | void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) |
3159 | 0 | { |
3160 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3161 | 0 | (void)yyg; |
3162 | | |
3163 | | /* The cast to (char *) in the following accommodates both |
3164 | | * implementations that use char* generic pointers, and those |
3165 | | * that use void* generic pointers. It works with the latter |
3166 | | * because both ANSI C and C++ allow castless assignment from |
3167 | | * any pointer type to void*, and deal with argument conversions |
3168 | | * as though doing an assignment. |
3169 | | */ |
3170 | 0 | return realloc(ptr, size); |
3171 | 0 | } |
3172 | | |
3173 | | void yyfree (void * ptr , yyscan_t yyscanner) |
3174 | 1.11k | { |
3175 | 1.11k | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
3176 | 1.11k | (void)yyg; |
3177 | 1.11k | free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ |
3178 | 1.11k | } |
3179 | | |
3180 | | #define YYTABLES_NAME "yytables" |
3181 | | |
3182 | | #undef yysmiles_wrap |
3183 | 0 | int yysmiles_wrap( void ) { return 1; } |
3184 | | |