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