Coverage Report

Created: 2025-07-07 10:01

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