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