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