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