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