nsgenbind
Loading...
Searching...
No Matches
nsgenbind-lexer.c
Go to the documentation of this file.
1#line 2 "build-x86_64-linux-gnu-x86_64-linux-gnu-release-binary/nsgenbind-lexer.c"
2
3#line 4 "build-x86_64-linux-gnu-x86_64-linux-gnu-release-binary/nsgenbind-lexer.c"
4
5#define YY_INT_ALIGNED short int
6
7/* A lexical scanner generated by flex */
8
9#define yy_create_buffer nsgenbind__create_buffer
10#define yy_delete_buffer nsgenbind__delete_buffer
11#define yy_scan_buffer nsgenbind__scan_buffer
12#define yy_scan_string nsgenbind__scan_string
13#define yy_scan_bytes nsgenbind__scan_bytes
14#define yy_init_buffer nsgenbind__init_buffer
15#define yy_flush_buffer nsgenbind__flush_buffer
16#define yy_load_buffer_state nsgenbind__load_buffer_state
17#define yy_switch_to_buffer nsgenbind__switch_to_buffer
18#define yypush_buffer_state nsgenbind_push_buffer_state
19#define yypop_buffer_state nsgenbind_pop_buffer_state
20#define yyensure_buffer_stack nsgenbind_ensure_buffer_stack
21#define yy_flex_debug nsgenbind__flex_debug
22#define yyin nsgenbind_in
23#define yyleng nsgenbind_leng
24#define yylex nsgenbind_lex
25#define yylineno nsgenbind_lineno
26#define yyout nsgenbind_out
27#define yyrestart nsgenbind_restart
28#define yytext nsgenbind_text
29#define yywrap nsgenbind_wrap
30#define yyalloc nsgenbind_alloc
31#define yyrealloc nsgenbind_realloc
32#define yyfree nsgenbind_free
33
34#define FLEX_SCANNER
35#define YY_FLEX_MAJOR_VERSION 2
36#define YY_FLEX_MINOR_VERSION 6
37#define YY_FLEX_SUBMINOR_VERSION 4
38#if YY_FLEX_SUBMINOR_VERSION > 0
39#define FLEX_BETA
40#endif
41
42#ifdef yy_create_buffer
43#define nsgenbind__create_buffer_ALREADY_DEFINED
44#else
45#define yy_create_buffer nsgenbind__create_buffer
46#endif
47
48#ifdef yy_delete_buffer
49#define nsgenbind__delete_buffer_ALREADY_DEFINED
50#else
51#define yy_delete_buffer nsgenbind__delete_buffer
52#endif
53
54#ifdef yy_scan_buffer
55#define nsgenbind__scan_buffer_ALREADY_DEFINED
56#else
57#define yy_scan_buffer nsgenbind__scan_buffer
58#endif
59
60#ifdef yy_scan_string
61#define nsgenbind__scan_string_ALREADY_DEFINED
62#else
63#define yy_scan_string nsgenbind__scan_string
64#endif
65
66#ifdef yy_scan_bytes
67#define nsgenbind__scan_bytes_ALREADY_DEFINED
68#else
69#define yy_scan_bytes nsgenbind__scan_bytes
70#endif
71
72#ifdef yy_init_buffer
73#define nsgenbind__init_buffer_ALREADY_DEFINED
74#else
75#define yy_init_buffer nsgenbind__init_buffer
76#endif
77
78#ifdef yy_flush_buffer
79#define nsgenbind__flush_buffer_ALREADY_DEFINED
80#else
81#define yy_flush_buffer nsgenbind__flush_buffer
82#endif
83
84#ifdef yy_load_buffer_state
85#define nsgenbind__load_buffer_state_ALREADY_DEFINED
86#else
87#define yy_load_buffer_state nsgenbind__load_buffer_state
88#endif
89
90#ifdef yy_switch_to_buffer
91#define nsgenbind__switch_to_buffer_ALREADY_DEFINED
92#else
93#define yy_switch_to_buffer nsgenbind__switch_to_buffer
94#endif
95
96#ifdef yypush_buffer_state
97#define nsgenbind_push_buffer_state_ALREADY_DEFINED
98#else
99#define yypush_buffer_state nsgenbind_push_buffer_state
100#endif
101
102#ifdef yypop_buffer_state
103#define nsgenbind_pop_buffer_state_ALREADY_DEFINED
104#else
105#define yypop_buffer_state nsgenbind_pop_buffer_state
106#endif
107
108#ifdef yyensure_buffer_stack
109#define nsgenbind_ensure_buffer_stack_ALREADY_DEFINED
110#else
111#define yyensure_buffer_stack nsgenbind_ensure_buffer_stack
112#endif
113
114#ifdef yylex
115#define nsgenbind_lex_ALREADY_DEFINED
116#else
117#define yylex nsgenbind_lex
118#endif
119
120#ifdef yyrestart
121#define nsgenbind_restart_ALREADY_DEFINED
122#else
123#define yyrestart nsgenbind_restart
124#endif
125
126#ifdef yylex_init
127#define nsgenbind_lex_init_ALREADY_DEFINED
128#else
129#define yylex_init nsgenbind_lex_init
130#endif
131
132#ifdef yylex_init_extra
133#define nsgenbind_lex_init_extra_ALREADY_DEFINED
134#else
135#define yylex_init_extra nsgenbind_lex_init_extra
136#endif
137
138#ifdef yylex_destroy
139#define nsgenbind_lex_destroy_ALREADY_DEFINED
140#else
141#define yylex_destroy nsgenbind_lex_destroy
142#endif
143
144#ifdef yyget_debug
145#define nsgenbind_get_debug_ALREADY_DEFINED
146#else
147#define yyget_debug nsgenbind_get_debug
148#endif
149
150#ifdef yyset_debug
151#define nsgenbind_set_debug_ALREADY_DEFINED
152#else
153#define yyset_debug nsgenbind_set_debug
154#endif
155
156#ifdef yyget_extra
157#define nsgenbind_get_extra_ALREADY_DEFINED
158#else
159#define yyget_extra nsgenbind_get_extra
160#endif
161
162#ifdef yyset_extra
163#define nsgenbind_set_extra_ALREADY_DEFINED
164#else
165#define yyset_extra nsgenbind_set_extra
166#endif
167
168#ifdef yyget_in
169#define nsgenbind_get_in_ALREADY_DEFINED
170#else
171#define yyget_in nsgenbind_get_in
172#endif
173
174#ifdef yyset_in
175#define nsgenbind_set_in_ALREADY_DEFINED
176#else
177#define yyset_in nsgenbind_set_in
178#endif
179
180#ifdef yyget_out
181#define nsgenbind_get_out_ALREADY_DEFINED
182#else
183#define yyget_out nsgenbind_get_out
184#endif
185
186#ifdef yyset_out
187#define nsgenbind_set_out_ALREADY_DEFINED
188#else
189#define yyset_out nsgenbind_set_out
190#endif
191
192#ifdef yyget_leng
193#define nsgenbind_get_leng_ALREADY_DEFINED
194#else
195#define yyget_leng nsgenbind_get_leng
196#endif
197
198#ifdef yyget_text
199#define nsgenbind_get_text_ALREADY_DEFINED
200#else
201#define yyget_text nsgenbind_get_text
202#endif
203
204#ifdef yyget_lineno
205#define nsgenbind_get_lineno_ALREADY_DEFINED
206#else
207#define yyget_lineno nsgenbind_get_lineno
208#endif
209
210#ifdef yyset_lineno
211#define nsgenbind_set_lineno_ALREADY_DEFINED
212#else
213#define yyset_lineno nsgenbind_set_lineno
214#endif
215
216#ifdef yywrap
217#define nsgenbind_wrap_ALREADY_DEFINED
218#else
219#define yywrap nsgenbind_wrap
220#endif
221
222#ifdef yyget_lval
223#define nsgenbind_get_lval_ALREADY_DEFINED
224#else
225#define yyget_lval nsgenbind_get_lval
226#endif
227
228#ifdef yyset_lval
229#define nsgenbind_set_lval_ALREADY_DEFINED
230#else
231#define yyset_lval nsgenbind_set_lval
232#endif
233
234#ifdef yyget_lloc
235#define nsgenbind_get_lloc_ALREADY_DEFINED
236#else
237#define yyget_lloc nsgenbind_get_lloc
238#endif
239
240#ifdef yyset_lloc
241#define nsgenbind_set_lloc_ALREADY_DEFINED
242#else
243#define yyset_lloc nsgenbind_set_lloc
244#endif
245
246#ifdef yyalloc
247#define nsgenbind_alloc_ALREADY_DEFINED
248#else
249#define yyalloc nsgenbind_alloc
250#endif
251
252#ifdef yyrealloc
253#define nsgenbind_realloc_ALREADY_DEFINED
254#else
255#define yyrealloc nsgenbind_realloc
256#endif
257
258#ifdef yyfree
259#define nsgenbind_free_ALREADY_DEFINED
260#else
261#define yyfree nsgenbind_free
262#endif
263
264#ifdef yytext
265#define nsgenbind_text_ALREADY_DEFINED
266#else
267#define yytext nsgenbind_text
268#endif
269
270#ifdef yyleng
271#define nsgenbind_leng_ALREADY_DEFINED
272#else
273#define yyleng nsgenbind_leng
274#endif
275
276#ifdef yyin
277#define nsgenbind_in_ALREADY_DEFINED
278#else
279#define yyin nsgenbind_in
280#endif
281
282#ifdef yyout
283#define nsgenbind_out_ALREADY_DEFINED
284#else
285#define yyout nsgenbind_out
286#endif
287
288#ifdef yy_flex_debug
289#define nsgenbind__flex_debug_ALREADY_DEFINED
290#else
291#define yy_flex_debug nsgenbind__flex_debug
292#endif
293
294#ifdef yylineno
295#define nsgenbind_lineno_ALREADY_DEFINED
296#else
297#define yylineno nsgenbind_lineno
298#endif
299
300/* First, we deal with platform-specific or compiler-specific issues. */
301
302/* begin standard C headers. */
303#include <stdio.h>
304#include <string.h>
305#include <errno.h>
306#include <stdlib.h>
307
308/* end standard C headers. */
309
310/* flex integer type definitions */
311
312#ifndef FLEXINT_H
313#define FLEXINT_H
314
315/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
316
317#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
318
319/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
320 * if you want the limit (max/min) macros for int types.
321 */
322#ifndef __STDC_LIMIT_MACROS
323#define __STDC_LIMIT_MACROS 1
324#endif
325
326#include <inttypes.h>
327typedef int8_t flex_int8_t;
328typedef uint8_t flex_uint8_t;
329typedef int16_t flex_int16_t;
330typedef uint16_t flex_uint16_t;
331typedef int32_t flex_int32_t;
332typedef uint32_t flex_uint32_t;
333#else
334typedef signed char flex_int8_t;
335typedef short int flex_int16_t;
336typedef int flex_int32_t;
337typedef unsigned char flex_uint8_t;
338typedef unsigned short int flex_uint16_t;
339typedef unsigned int flex_uint32_t;
340
341/* Limits of integral types. */
342#ifndef INT8_MIN
343#define INT8_MIN (-128)
344#endif
345#ifndef INT16_MIN
346#define INT16_MIN (-32767-1)
347#endif
348#ifndef INT32_MIN
349#define INT32_MIN (-2147483647-1)
350#endif
351#ifndef INT8_MAX
352#define INT8_MAX (127)
353#endif
354#ifndef INT16_MAX
355#define INT16_MAX (32767)
356#endif
357#ifndef INT32_MAX
358#define INT32_MAX (2147483647)
359#endif
360#ifndef UINT8_MAX
361#define UINT8_MAX (255U)
362#endif
363#ifndef UINT16_MAX
364#define UINT16_MAX (65535U)
365#endif
366#ifndef UINT32_MAX
367#define UINT32_MAX (4294967295U)
368#endif
369
370#ifndef SIZE_MAX
371#define SIZE_MAX (~(size_t)0)
372#endif
373
374#endif /* ! C99 */
375
376#endif /* ! FLEXINT_H */
377
378/* begin standard C++ headers. */
379
380/* TODO: this is always defined, so inline it */
381#define yyconst const
382
383#if defined(__GNUC__) && __GNUC__ >= 3
384#define yynoreturn __attribute__((__noreturn__))
385#else
386#define yynoreturn
387#endif
388
389/* Returned upon end-of-file. */
390#define YY_NULL 0
391
392/* Promotes a possibly negative, possibly signed char to an
393 * integer in range [0..255] for use as an array index.
394 */
395#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
396
397/* Enter a start condition. This macro really ought to take a parameter,
398 * but we do it the disgusting crufty way forced on us by the ()-less
399 * definition of BEGIN.
400 */
401#define BEGIN (yy_start) = 1 + 2 *
402/* Translate the current start state into a value that can be later handed
403 * to BEGIN to return to the state. The YYSTATE alias is for lex
404 * compatibility.
405 */
406#define YY_START (((yy_start) - 1) / 2)
407#define YYSTATE YY_START
408/* Action number for EOF rule of a given start state. */
409#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
410/* Special action meaning "start processing a new file". */
411#define YY_NEW_FILE yyrestart( yyin )
412#define YY_END_OF_BUFFER_CHAR 0
413
414/* Size of default input buffer. */
415#ifndef YY_BUF_SIZE
416#ifdef __ia64__
417/* On IA-64, the buffer size is 16k, not 8k.
418 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
419 * Ditto for the __ia64__ case accordingly.
420 */
421#define YY_BUF_SIZE 32768
422#else
423#define YY_BUF_SIZE 16384
424#endif /* __ia64__ */
425#endif
426
427/* The state buf must be large enough to hold one state per character in the main buffer.
428 */
429#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
430
431#ifndef YY_TYPEDEF_YY_BUFFER_STATE
432#define YY_TYPEDEF_YY_BUFFER_STATE
434#endif
435
436#ifndef YY_TYPEDEF_YY_SIZE_T
437#define YY_TYPEDEF_YY_SIZE_T
438typedef size_t yy_size_t;
439#endif
440
441extern int yyleng;
442
443extern FILE *yyin, *yyout;
444
445#define EOB_ACT_CONTINUE_SCAN 0
446#define EOB_ACT_END_OF_FILE 1
447#define EOB_ACT_LAST_MATCH 2
448
449 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
450 * access to the local variable yy_act. Since yyless() is a macro, it would break
451 * existing scanners that call yyless() from OUTSIDE yylex.
452 * One obvious solution it to make yy_act a global. I tried that, and saw
453 * a 5% performance hit in a non-yylineno scanner, because yy_act is
454 * normally declared as a register variable-- so it is not worth it.
455 */
456 #define YY_LESS_LINENO(n) \
457 do { \
458 int yyl;\
459 for ( yyl = n; yyl < yyleng; ++yyl )\
460 if ( yytext[yyl] == '\n' )\
461 --yylineno;\
462 }while(0)
463 #define YY_LINENO_REWIND_TO(dst) \
464 do {\
465 const char *p;\
466 for ( p = yy_cp-1; p >= (dst); --p)\
467 if ( *p == '\n' )\
468 --yylineno;\
469 }while(0)
470
471/* Return all but the first "n" matched characters back to the input stream. */
472#define yyless(n) \
473 do \
474 { \
475 /* Undo effects of setting up yytext. */ \
476 int yyless_macro_arg = (n); \
477 YY_LESS_LINENO(yyless_macro_arg);\
478 *yy_cp = (yy_hold_char); \
479 YY_RESTORE_YY_MORE_OFFSET \
480 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
481 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
482 } \
483 while ( 0 )
484#define unput(c) yyunput( c, (yytext_ptr) )
485
486#ifndef YY_STRUCT_YY_BUFFER_STATE
487#define YY_STRUCT_YY_BUFFER_STATE
489 {
491
492 char *yy_ch_buf; /* input buffer */
493 char *yy_buf_pos; /* current position in input buffer */
494
495 /* Size of input buffer in bytes, not including room for EOB
496 * characters.
497 */
499
500 /* Number of characters read into yy_ch_buf, not including EOB
501 * characters.
502 */
504
505 /* Whether we "own" the buffer - i.e., we know we created it,
506 * and can realloc() it to grow it, and should free() it to
507 * delete it.
508 */
510
511 /* Whether this is an "interactive" input source; if so, and
512 * if we're using stdio for input, then we want to use getc()
513 * instead of fread(), to make sure we stop fetching input after
514 * each newline.
515 */
517
518 /* Whether we're considered to be at the beginning of a line.
519 * If so, '^' rules will be active on the next match, otherwise
520 * not.
521 */
523
527 /* Whether to try to fill the input buffer when we reach the
528 * end of it.
529 */
531
533
534#define YY_BUFFER_NEW 0
535#define YY_BUFFER_NORMAL 1
536 /* When an EOF's been seen but there's still some text to process
537 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
538 * shouldn't try reading from the input source any more. We might
539 * still have a bunch of tokens to match, though, because of
540 * possible backing-up.
541 *
542 * When we actually see the EOF, we change the status to "new"
543 * (via yyrestart()), so that the user can continue scanning by
544 * just pointing yyin at a new input file.
545 */
546#define YY_BUFFER_EOF_PENDING 2
547
548 };
549#endif /* !YY_STRUCT_YY_BUFFER_STATE */
550
551/* Stack of input buffers. */
552static size_t yy_buffer_stack_top = 0;
553static size_t yy_buffer_stack_max = 0;
554static YY_BUFFER_STATE * yy_buffer_stack = NULL;
556/* We provide macros for accessing buffer states in case in the
557 * future we want to put the buffer states in a more general
558 * "scanner state".
559 *
560 * Returns the top of the stack, or NULL.
561 */
562#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
563 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
564 : NULL)
565/* Same as previous macro, but useful when we know that the buffer stack is not
566 * NULL or when we need an lvalue. For internal use only.
567 */
568#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
569
570/* yy_hold_char holds the character lost when yytext is formed. */
571static char yy_hold_char;
572static int yy_n_chars; /* number of characters read into yy_ch_buf */
574
575/* Points to current character in buffer. */
576static char *yy_c_buf_p = NULL;
577static int yy_init = 0; /* whether we need to initialize */
578static int yy_start = 0; /* start state number */
579
580/* Flag which is used to allow yywrap()'s to do buffer switches
581 * instead of setting up a fresh yyin. A bit of a hack ...
582 */
583static int yy_did_buffer_switch_on_eof;
584
585void yyrestart ( FILE *input_file );
587YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
591void yypop_buffer_state ( void );
592
593static void yyensure_buffer_stack ( void );
594static void yy_load_buffer_state ( void );
595static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
596#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
597
599YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
600YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
601
603void *yyrealloc ( void *, yy_size_t );
604void yyfree ( void * );
605
606#define yy_new_buffer yy_create_buffer
607#define yy_set_interactive(is_interactive) \
608 { \
609 if ( ! YY_CURRENT_BUFFER ){ \
610 yyensure_buffer_stack (); \
611 YY_CURRENT_BUFFER_LVALUE = \
612 yy_create_buffer( yyin, YY_BUF_SIZE ); \
613 } \
614 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
615 }
616#define yy_set_bol(at_bol) \
617 { \
618 if ( ! YY_CURRENT_BUFFER ){\
619 yyensure_buffer_stack (); \
620 YY_CURRENT_BUFFER_LVALUE = \
621 yy_create_buffer( yyin, YY_BUF_SIZE ); \
622 } \
623 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
624 }
625#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
626
627/* Begin user sect3 */
628
629#define nsgenbind_wrap() (/*CONSTCOND*/1)
630#define YY_SKIP_YYWRAP
632
633FILE *yyin = NULL, *yyout = NULL;
634
635typedef int yy_state_type;
636
637extern int yylineno;
638int yylineno = 1;
639
640extern char *yytext;
641#ifdef yytext_ptr
642#undef yytext_ptr
643#endif
644#define yytext_ptr yytext
645
646static yy_state_type yy_get_previous_state ( void );
647static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
648static int yy_get_next_buffer ( void );
649static void yynoreturn yy_fatal_error ( const char* msg );
650
651/* Done after the current pattern has been matched and before the
652 * corresponding action - sets up yytext.
653 */
654#define YY_DO_BEFORE_ACTION \
655 (yytext_ptr) = yy_bp; \
656 yyleng = (int) (yy_cp - yy_bp); \
657 (yy_hold_char) = *yy_cp; \
658 *yy_cp = '\0'; \
659 (yy_c_buf_p) = yy_cp;
660#define YY_NUM_RULES 41
661#define YY_END_OF_BUFFER 42
662/* This struct is not used in this scanner,
663 but its presence is necessary. */
669static const flex_int16_t yy_accept[215] =
670 { 0,
671 0, 0, 34, 34, 0, 0, 42, 32, 1, 2,
672 1, 2, 32, 32, 32, 33, 32, 28, 28, 28,
673 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
674 32, 32, 32, 32, 1, 1, 32, 32, 32, 32,
675 32, 34, 36, 38, 40, 39, 38, 37, 0, 29,
676 27, 0, 26, 28, 28, 28, 28, 28, 28, 28,
677 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
678 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
679 0, 0, 0, 1, 0, 0, 0, 0, 0, 34,
680 35, 38, 0, 37, 38, 0, 0, 28, 28, 28,
681
682 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
683 28, 28, 28, 28, 28, 28, 28, 1, 2, 0,
684 0, 0, 0, 0, 0, 1, 30, 28, 28, 28,
685 18, 28, 28, 17, 28, 28, 28, 28, 28, 28,
686 28, 28, 28, 28, 28, 13, 28, 28, 28, 28,
687 0, 0, 28, 9, 28, 12, 28, 28, 28, 28,
688 28, 28, 28, 28, 28, 28, 28, 28, 24, 28,
689 28, 28, 0, 28, 28, 20, 28, 19, 28, 28,
690 28, 28, 28, 28, 21, 15, 23, 28, 28, 4,
691 0, 3, 28, 28, 28, 5, 10, 28, 28, 28,
692
693 28, 28, 0, 7, 11, 8, 6, 16, 28, 14,
694 25, 31, 22, 0
695 } ;
696
697static const YY_CHAR yy_ec[256] =
698 { 0,
699 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
700 4, 4, 5, 1, 1, 1, 1, 1, 1, 1,
701 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
702 1, 6, 1, 7, 8, 1, 9, 1, 1, 1,
703 1, 10, 1, 1, 1, 1, 11, 12, 12, 12,
704 12, 12, 12, 12, 12, 12, 12, 13, 1, 1,
705 1, 1, 1, 1, 14, 14, 14, 14, 14, 14,
706 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
707 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
708 1, 15, 1, 1, 14, 1, 16, 17, 18, 19,
709
710 20, 21, 22, 23, 24, 14, 14, 25, 26, 27,
711 28, 29, 14, 30, 31, 32, 33, 34, 35, 14,
712 36, 14, 37, 1, 38, 1, 1, 39, 40, 41,
713 41, 41, 41, 41, 41, 41, 41, 41, 1, 1,
714 1, 42, 1, 1, 1, 1, 1, 1, 1, 1,
715 1, 1, 1, 43, 1, 1, 1, 1, 44, 45,
716 1, 1, 1, 1, 1, 1, 1, 46, 47, 1,
717 1, 1, 1, 1, 48, 1, 1, 1, 1, 1,
718 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
719 1, 1, 1, 49, 1, 1, 1, 1, 1, 1,
720
721 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
722 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
723 1, 1, 1, 1, 50, 51, 52, 1, 1, 1,
724 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
725 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
726 1, 1, 1, 1, 1
727 } ;
728
729static const YY_CHAR yy_meta[53] =
730 { 0,
731 1, 2, 3, 1, 4, 1, 2, 1, 5, 1,
732 1, 6, 1, 6, 4, 6, 6, 6, 6, 6,
733 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
734 6, 6, 6, 6, 6, 6, 1, 1, 1, 1,
735 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
736 1, 1
737 } ;
738
739static const flex_int16_t yy_base[222] =
740 { 0,
741 0, 51, 293, 292, 58, 60, 300, 303, 303, 303,
742 303, 303, 292, 261, 287, 303, 283, 0, 271, 269,
743 264, 44, 272, 264, 270, 26, 50, 253, 261, 267,
744 241, 29, 36, 246, 102, 0, 260, 238, 34, 41,
745 243, 0, 243, 0, 81, 303, 83, 303, 273, 303,
746 303, 269, 303, 0, 251, 261, 252, 248, 258, 241,
747 54, 240, 240, 71, 238, 253, 238, 238, 74, 249,
748 303, 226, 222, 72, 219, 223, 0, 237, 215, 49,
749 57, 220, 231, 0, 218, 214, 75, 211, 215, 0,
750 303, 0, 122, 303, 124, 243, 241, 232, 219, 224,
751
752 224, 225, 214, 213, 224, 220, 210, 220, 206, 107,
753 207, 208, 204, 216, 207, 110, 210, 303, 303, 194,
754 190, 101, 187, 191, 211, 0, 303, 204, 196, 198,
755 0, 194, 204, 0, 193, 194, 200, 204, 203, 190,
756 197, 188, 195, 194, 195, 0, 185, 195, 188, 190,
757 0, 183, 180, 0, 184, 0, 175, 177, 184, 186,
758 183, 168, 177, 168, 165, 166, 176, 162, 0, 163,
759 165, 166, 148, 158, 144, 0, 154, 0, 151, 130,
760 128, 114, 114, 109, 0, 0, 0, 124, 123, 0,
761 119, 0, 117, 110, 107, 0, 0, 105, 81, 80,
762
763 88, 74, 64, 0, 0, 0, 0, 0, 51, 0,
764 0, 303, 0, 303, 154, 160, 166, 52, 172, 178,
765 184
766 } ;
767
768static const flex_int16_t yy_def[222] =
769 { 0,
770 214, 1, 215, 215, 216, 216, 214, 214, 214, 214,
771 214, 214, 217, 214, 214, 214, 214, 218, 218, 218,
772 218, 218, 218, 218, 218, 218, 218, 218, 218, 218,
773 214, 214, 214, 214, 214, 35, 214, 214, 214, 214,
774 214, 219, 214, 220, 214, 214, 220, 214, 217, 214,
775 214, 221, 214, 218, 218, 218, 218, 218, 218, 218,
776 218, 218, 218, 218, 218, 218, 218, 218, 218, 218,
777 214, 214, 214, 214, 214, 214, 35, 214, 214, 214,
778 214, 214, 214, 35, 214, 214, 214, 214, 214, 219,
779 214, 220, 214, 214, 220, 221, 221, 218, 218, 218,
780
781 218, 218, 218, 218, 218, 218, 218, 218, 218, 218,
782 218, 218, 218, 218, 218, 218, 218, 214, 214, 214,
783 214, 214, 214, 214, 214, 35, 214, 218, 218, 218,
784 218, 218, 218, 218, 218, 218, 218, 218, 218, 218,
785 218, 218, 218, 218, 218, 218, 218, 218, 218, 218,
786 35, 214, 218, 218, 218, 218, 218, 218, 218, 218,
787 218, 218, 218, 218, 218, 218, 218, 218, 218, 218,
788 218, 218, 214, 218, 218, 218, 218, 218, 218, 218,
789 218, 218, 218, 218, 218, 218, 218, 218, 218, 218,
790 214, 218, 218, 218, 218, 218, 218, 218, 218, 218,
791
792 218, 218, 214, 218, 218, 218, 218, 218, 218, 218,
793 218, 214, 218, 0, 214, 214, 214, 214, 214, 214,
794 214
795 } ;
796
797static const flex_int16_t yy_nxt[356] =
798 { 0,
799 8, 9, 10, 11, 12, 9, 13, 8, 14, 8,
800 15, 16, 17, 18, 8, 18, 19, 20, 18, 21,
801 22, 23, 18, 24, 18, 25, 18, 18, 26, 18,
802 27, 28, 29, 18, 30, 18, 8, 8, 8, 8,
803 8, 8, 8, 8, 8, 8, 8, 8, 31, 32,
804 33, 34, 35, 63, 36, 64, 35, 54, 37, 45,
805 46, 45, 46, 47, 48, 47, 48, 58, 59, 65,
806 213, 72, 66, 73, 74, 75, 85, 104, 86, 87,
807 88, 67, 93, 212, 93, 105, 93, 94, 95, 94,
808 108, 120, 211, 121, 109, 122, 123, 115, 110, 38,
809
810 39, 40, 41, 77, 116, 77, 210, 77, 209, 78,
811 118, 118, 118, 126, 126, 126, 208, 119, 119, 118,
812 119, 119, 126, 93, 207, 93, 206, 93, 94, 95,
813 94, 140, 148, 149, 205, 141, 204, 203, 142, 151,
814 151, 151, 202, 201, 200, 199, 198, 197, 151, 196,
815 79, 80, 81, 82, 42, 42, 42, 42, 42, 42,
816 44, 44, 44, 44, 44, 44, 49, 49, 195, 194,
817 49, 49, 90, 90, 90, 90, 193, 90, 92, 192,
818 191, 92, 92, 92, 96, 96, 96, 96, 96, 96,
819 190, 189, 188, 187, 186, 185, 184, 183, 182, 181,
820
821 180, 179, 178, 177, 176, 175, 174, 173, 172, 171,
822 170, 169, 168, 167, 166, 165, 164, 163, 162, 161,
823 160, 159, 158, 157, 156, 155, 154, 153, 152, 151,
824 151, 151, 151, 150, 147, 146, 145, 144, 143, 139,
825 138, 137, 136, 135, 134, 133, 132, 131, 130, 129,
826 128, 127, 97, 126, 126, 126, 126, 125, 124, 77,
827 83, 118, 118, 118, 118, 117, 114, 113, 112, 111,
828 107, 106, 103, 102, 101, 100, 99, 98, 97, 50,
829 91, 89, 84, 83, 76, 71, 70, 69, 68, 62,
830 61, 60, 57, 56, 55, 53, 52, 51, 50, 214,
831
832 43, 43, 7, 214, 214, 214, 214, 214, 214, 214,
833 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
834 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
835 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
836 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
837 214, 214, 214, 214, 214
838 } ;
839
840static const flex_int16_t yy_chk[356] =
841 { 0,
842 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
843 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
844 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
845 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
846 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
847 1, 1, 2, 26, 2, 26, 2, 218, 2, 5,
848 5, 6, 6, 5, 5, 6, 6, 22, 22, 27,
849 209, 32, 27, 32, 33, 33, 39, 61, 39, 40,
850 40, 27, 45, 203, 47, 61, 45, 45, 47, 47,
851 64, 80, 202, 80, 64, 81, 81, 69, 64, 2,
852
853 2, 2, 2, 35, 69, 35, 201, 35, 200, 35,
854 74, 74, 74, 87, 87, 87, 199, 74, 74, 74,
855 87, 87, 87, 93, 198, 95, 195, 93, 93, 95,
856 95, 110, 116, 116, 194, 110, 193, 191, 110, 122,
857 122, 122, 189, 188, 184, 183, 182, 181, 122, 180,
858 35, 35, 35, 35, 215, 215, 215, 215, 215, 215,
859 216, 216, 216, 216, 216, 216, 217, 217, 179, 177,
860 217, 217, 219, 219, 219, 219, 175, 219, 220, 174,
861 173, 220, 220, 220, 221, 221, 221, 221, 221, 221,
862 172, 171, 170, 168, 167, 166, 165, 164, 163, 162,
863
864 161, 160, 159, 158, 157, 155, 153, 152, 150, 149,
865 148, 147, 145, 144, 143, 142, 141, 140, 139, 138,
866 137, 136, 135, 133, 132, 130, 129, 128, 125, 124,
867 123, 121, 120, 117, 115, 114, 113, 112, 111, 109,
868 108, 107, 106, 105, 104, 103, 102, 101, 100, 99,
869 98, 97, 96, 89, 88, 86, 85, 83, 82, 79,
870 78, 76, 75, 73, 72, 70, 68, 67, 66, 65,
871 63, 62, 60, 59, 58, 57, 56, 55, 52, 49,
872 43, 41, 38, 37, 34, 31, 30, 29, 28, 25,
873 24, 23, 21, 20, 19, 17, 15, 14, 13, 7,
874
875 4, 3, 214, 214, 214, 214, 214, 214, 214, 214,
876 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
877 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
878 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
879 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
880 214, 214, 214, 214, 214
881 } ;
882
883/* Table of booleans, true if rule could match eol. */
884static const flex_int32_t yy_rule_can_match_eol[42] =
885 { 0,
8860, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
887 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1,
888 0, 0, };
889
890static yy_state_type yy_last_accepting_state;
891static char *yy_last_accepting_cpos;
892
893extern int yy_flex_debug;
895
896/* The intent behind this definition is that it'll catch
897 * any uses of REJECT which flex missed.
898 */
899#define REJECT reject_used_but_not_detected
900#define yymore() yymore_used_but_not_detected
901#define YY_MORE_ADJ 0
902#define YY_RESTORE_YY_MORE_OFFSET
903char *yytext;
904#line 1 "src/nsgenbind-lexer.l"
905#line 2 "src/nsgenbind-lexer.l"
906
907/* lexer for the binding generation config file
908 *
909 * This file is part of nsgenbind.
910 * Licensed under the MIT License,
911 * http://www.opensource.org/licenses/mit-license.php
912 * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org>
913 */
914
915#include <stdbool.h>
916#include <stdio.h>
917#include <string.h>
918
919#include "nsgenbind-parser.h"
920#include "nsgenbind-ast.h"
921
922#define YY_USER_ACTION \
923 yylloc->first_line = yylloc->last_line = yylineno; \
924 yylloc->first_column = yylloc->last_column + 1; \
925 yylloc->last_column += yyleng;
926
927
928/* Ensure compatability with bison 2.6 and later */
929#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED && defined NSGENBIND_STYPE_IS_DECLARED
930#define YYSTYPE NSGENBIND_STYPE
931#endif
932
933#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED && defined NSGENBIND_LTYPE_IS_DECLARED
934#define YYLTYPE NSGENBIND_LTYPE
935#endif
936
937static struct YYLTYPE *locations = NULL;
938
939static struct YYLTYPE *push_location(struct YYLTYPE *head,
940 struct YYLTYPE *loc,
941 const char *filename)
942{
943 struct YYLTYPE *res;
944 res = calloc(1, sizeof(struct YYLTYPE));
945 /* copy current location and line number */
946 *res = *loc;
947 res->start_line = yylineno;
948 res->next = head;
949
950 /* reset current location */
951 loc->first_line = loc->last_line = 1;
952 loc->first_column = loc->last_column = 1;
953 loc->filename = strdup(filename);
954 yylineno = 1;
955
956 return res;
957}
958
959static struct YYLTYPE *pop_location(struct YYLTYPE *head, struct YYLTYPE *loc)
960{
961 struct YYLTYPE *res = NULL;
962
963 if (head != NULL) {
964 res = head->next;
965 *loc = *head;
966 free(head);
967
968 yylineno = loc->start_line;
969 }
970 return res;
971}
972
973
974#line 975 "build-x86_64-linux-gnu-x86_64-linux-gnu-release-binary/nsgenbind-lexer.c"
975/* lexer options */
976#define YY_NO_INPUT 1
977/* other Unicode “space separator” */
978/* non breaking space \u00A0 */
979/* Line separator \u2028 */
980/* paragraph separator \u2029 */
981/* used for #include directive */
982
983#line 984 "build-x86_64-linux-gnu-x86_64-linux-gnu-release-binary/nsgenbind-lexer.c"
984
985#define INITIAL 0
986#define cblock 1
987#define incl 2
988
989#ifndef YY_NO_UNISTD_H
990/* Special case for "unistd.h", since it is non-ANSI. We include it way
991 * down here because we want the user's section 1 to have been scanned first.
992 * The user has a chance to override it with an option.
993 */
994#include <unistd.h>
995#endif
996
997#ifndef YY_EXTRA_TYPE
998#define YY_EXTRA_TYPE void *
999#endif
1000
1001static int yy_init_globals ( void );
1002
1003/* Accessor methods to globals.
1004 These are made visible to non-reentrant scanners for convenience. */
1005
1006int yylex_destroy ( void );
1007
1008int yyget_debug ( void );
1009
1010void yyset_debug ( int debug_flag );
1011
1012YY_EXTRA_TYPE yyget_extra ( void );
1013
1014void yyset_extra ( YY_EXTRA_TYPE user_defined );
1015
1016FILE *yyget_in ( void );
1017
1018void yyset_in ( FILE * _in_str );
1019
1020FILE *yyget_out ( void );
1021
1022void yyset_out ( FILE * _out_str );
1023
1024 int yyget_leng ( void );
1025
1026char *yyget_text ( void );
1027
1028int yyget_lineno ( void );
1029
1030void yyset_lineno ( int _line_number );
1031
1032YYSTYPE * yyget_lval ( void );
1033
1034void yyset_lval ( YYSTYPE * yylval_param );
1035
1036 YYLTYPE *yyget_lloc ( void );
1037
1038 void yyset_lloc ( YYLTYPE * yylloc_param );
1039
1040/* Macros after this point can all be overridden by user definitions in
1041 * section 1.
1042 */
1043
1044#ifndef YY_SKIP_YYWRAP
1045#ifdef __cplusplus
1046extern "C" int yywrap ( void );
1047#else
1048extern int yywrap ( void );
1049#endif
1050#endif
1051
1052#ifndef YY_NO_UNPUT
1053
1054#endif
1055
1056#ifndef yytext_ptr
1057static void yy_flex_strncpy ( char *, const char *, int );
1058#endif
1059
1060#ifdef YY_NEED_STRLEN
1061static int yy_flex_strlen ( const char * );
1062#endif
1063
1064#ifndef YY_NO_INPUT
1065#ifdef __cplusplus
1066static int yyinput ( void );
1067#else
1068static int input ( void );
1069#endif
1070
1071#endif
1072
1073/* Amount of stuff to slurp up with each read. */
1074#ifndef YY_READ_BUF_SIZE
1075#ifdef __ia64__
1076/* On IA-64, the buffer size is 16k, not 8k */
1077#define YY_READ_BUF_SIZE 16384
1078#else
1079#define YY_READ_BUF_SIZE 8192
1080#endif /* __ia64__ */
1081#endif
1082
1083/* Copy whatever the last rule matched to the standard output. */
1084#ifndef ECHO
1085/* This used to be an fputs(), but since the string might contain NUL's,
1086 * we now use fwrite().
1087 */
1088#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1089#endif
1090
1091/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1092 * is returned in "result".
1093 */
1094#ifndef YY_INPUT
1095#define YY_INPUT(buf,result,max_size) \
1096 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1097 { \
1098 int c = '*'; \
1099 int n; \
1100 for ( n = 0; n < max_size && \
1101 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1102 buf[n] = (char) c; \
1103 if ( c == '\n' ) \
1104 buf[n++] = (char) c; \
1105 if ( c == EOF && ferror( yyin ) ) \
1106 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1107 result = n; \
1108 } \
1109 else \
1110 { \
1111 errno=0; \
1112 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1113 { \
1114 if( errno != EINTR) \
1115 { \
1116 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1117 break; \
1118 } \
1119 errno=0; \
1120 clearerr(yyin); \
1121 } \
1122 }\
1123\
1124
1125#endif
1126
1127/* No semi-colon after return; correct usage is to write "yyterminate();" -
1128 * we don't want an extra ';' after the "return" because that will cause
1129 * some compilers to complain about unreachable statements.
1130 */
1131#ifndef yyterminate
1132#define yyterminate() return YY_NULL
1133#endif
1134
1135/* Number of entries by which start-condition stack grows. */
1136#ifndef YY_START_STACK_INCR
1137#define YY_START_STACK_INCR 25
1138#endif
1139
1140/* Report a fatal error. */
1141#ifndef YY_FATAL_ERROR
1142#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1143#endif
1144
1145/* end tables serialization structures and prototypes */
1146
1147/* Default declaration of generated scanner - a define so the user can
1148 * easily add parameters.
1149 */
1150#ifndef YY_DECL
1151#define YY_DECL_IS_OURS 1
1152
1153extern int yylex \
1154 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param );
1155
1156#define YY_DECL int yylex \
1157 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param )
1158#endif /* !YY_DECL */
1159
1160/* Code executed at the beginning of each rule, after yytext and yyleng
1161 * have been set up.
1162 */
1163#ifndef YY_USER_ACTION
1164#define YY_USER_ACTION
1165#endif
1166
1167/* Code executed at the end of each rule. */
1168#ifndef YY_BREAK
1169#define YY_BREAK /*LINTED*/break;
1170#endif
1171
1172#define YY_RULE_SETUP \
1173 if ( yyleng > 0 ) \
1174 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1175 (yytext[yyleng - 1] == '\n'); \
1176 YY_USER_ACTION
1177
1181{
1182 yy_state_type yy_current_state;
1183 char *yy_cp, *yy_bp;
1185
1187
1189
1190 yylval = yylval_param;
1191
1192 yylloc = yylloc_param;
1193
1194 if ( !(yy_init) )
1195 {
1196 (yy_init) = 1;
1197
1198#ifdef YY_USER_INIT
1199 YY_USER_INIT;
1200#endif
1201
1202 if ( ! (yy_start) )
1203 (yy_start) = 1; /* first start state */
1204
1205 if ( ! yyin )
1206 yyin = stdin;
1207
1208 if ( ! yyout )
1209 yyout = stdout;
1210
1211 if ( ! YY_CURRENT_BUFFER ) {
1215 }
1216
1218 }
1219
1220 {
1221#line 121 "src/nsgenbind-lexer.l"
1222
1223
1224#line 1225 "build-x86_64-linux-gnu-x86_64-linux-gnu-release-binary/nsgenbind-lexer.c"
1225
1226 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1227 {
1228 yy_cp = (yy_c_buf_p);
1229
1230 /* Support of yytext. */
1231 *yy_cp = (yy_hold_char);
1232
1233 /* yy_bp points to the position in yy_ch_buf of the start of
1234 * the current run.
1235 */
1236 yy_bp = yy_cp;
1237
1238 yy_current_state = (yy_start);
1239 yy_current_state += YY_AT_BOL();
1240yy_match:
1241 do
1242 {
1243 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1244 if ( yy_accept[yy_current_state] )
1245 {
1246 (yy_last_accepting_state) = yy_current_state;
1247 (yy_last_accepting_cpos) = yy_cp;
1248 }
1249 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1250 {
1251 yy_current_state = (int) yy_def[yy_current_state];
1252 if ( yy_current_state >= 215 )
1253 yy_c = yy_meta[yy_c];
1254 }
1255 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1256 ++yy_cp;
1257 }
1258 while ( yy_current_state != 214 );
1259 yy_cp = (yy_last_accepting_cpos);
1260 yy_current_state = (yy_last_accepting_state);
1261
1262yy_find_action:
1263 yy_act = yy_accept[yy_current_state];
1264
1266
1267 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1268 {
1269 int yyl;
1270 for ( yyl = 0; yyl < yyleng; ++yyl )
1271 if ( yytext[yyl] == '\n' )
1272
1273 yylineno++;
1274;
1275 }
1276
1277do_action: /* This label is used only to access EOF actions. */
1278
1279 switch ( yy_act )
1280 { /* beginning of action switch */
1281 case 0: /* must back up */
1282 /* undo the effects of YY_DO_BEFORE_ACTION */
1283 *yy_cp = (yy_hold_char);
1284 yy_cp = (yy_last_accepting_cpos);
1285 yy_current_state = (yy_last_accepting_state);
1286 goto yy_find_action;
1287
1288case 1:
1290#line 123 "src/nsgenbind-lexer.l"
1291++yylloc->last_column;/* nothing */
1292 YY_BREAK
1293case 2:
1294/* rule 2 can match eol */
1296#line 125 "src/nsgenbind-lexer.l"
1297if (yytext[0] != '\r') {
1298 /* update position counts */
1299 ++yylloc->last_line;
1300 yylloc->last_column = 0;
1301 }
1302 YY_BREAK
1303/* binding terminals */
1304case 3:
1306#line 133 "src/nsgenbind-lexer.l"
1307return TOK_BINDING;
1308 YY_BREAK
1309case 4:
1311#line 134 "src/nsgenbind-lexer.l"
1312return TOK_WEBIDL;
1313 YY_BREAK
1314case 5:
1316#line 135 "src/nsgenbind-lexer.l"
1317return TOK_PREFACE;
1318 YY_BREAK
1319case 6:
1321#line 136 "src/nsgenbind-lexer.l"
1322return TOK_PROLOGUE;
1323 YY_BREAK
1324case 7:
1326#line 137 "src/nsgenbind-lexer.l"
1327return TOK_EPILOGUE;
1328 YY_BREAK
1329case 8:
1331#line 138 "src/nsgenbind-lexer.l"
1332return TOK_POSTFACE;
1333 YY_BREAK
1334/* class member terminals */
1335case 9:
1337#line 143 "src/nsgenbind-lexer.l"
1338return TOK_CLASS;
1339 YY_BREAK
1340case 10:
1342#line 144 "src/nsgenbind-lexer.l"
1343return TOK_PRIVATE;
1344 YY_BREAK
1345case 11:
1347#line 145 "src/nsgenbind-lexer.l"
1348return TOK_INTERNAL;
1349 YY_BREAK
1350case 12:
1352#line 146 "src/nsgenbind-lexer.l"
1353return TOK_FLAGS;
1354 YY_BREAK
1355case 13:
1357#line 147 "src/nsgenbind-lexer.l"
1358return TOK_TYPE;
1359 YY_BREAK
1360case 14:
1362#line 148 "src/nsgenbind-lexer.l"
1363return TOK_UNSHARED;
1364 YY_BREAK
1365case 15:
1367#line 149 "src/nsgenbind-lexer.l"
1368return TOK_SHARED;
1369 YY_BREAK
1370case 16:
1372#line 150 "src/nsgenbind-lexer.l"
1373return TOK_PROPERTY;
1374 YY_BREAK
1375/* implementation terminals */
1376case 17:
1378#line 154 "src/nsgenbind-lexer.l"
1379return TOK_INIT;
1380 YY_BREAK
1381case 18:
1383#line 155 "src/nsgenbind-lexer.l"
1384return TOK_FINI;
1385 YY_BREAK
1386case 19:
1388#line 156 "src/nsgenbind-lexer.l"
1389return TOK_METHOD;
1390 YY_BREAK
1391case 20:
1393#line 157 "src/nsgenbind-lexer.l"
1394return TOK_GETTER;
1395 YY_BREAK
1396case 21:
1398#line 158 "src/nsgenbind-lexer.l"
1399return TOK_SETTER;
1400 YY_BREAK
1401case 22:
1403#line 159 "src/nsgenbind-lexer.l"
1404return TOK_PROTOTYPE;
1405 YY_BREAK
1406/* c type terminals */
1407case 23:
1409#line 163 "src/nsgenbind-lexer.l"
1410return TOK_STRUCT;
1411 YY_BREAK
1412case 24:
1414#line 164 "src/nsgenbind-lexer.l"
1415return TOK_UNION;
1416 YY_BREAK
1417case 25:
1419#line 165 "src/nsgenbind-lexer.l"
1420return TOK_UNSIGNED;
1421 YY_BREAK
1422/* other terminals */
1423case 26:
1425#line 169 "src/nsgenbind-lexer.l"
1426return TOK_DBLCOLON;
1427 YY_BREAK
1428case 27:
1430#line 171 "src/nsgenbind-lexer.l"
1431BEGIN(cblock);
1432 YY_BREAK
1433case 28:
1435#line 173 "src/nsgenbind-lexer.l"
1436{
1437 /* A leading "_" is used to escape an identifier from
1438 * looking like a reserved word terminal.
1439 */
1440 yylval->text = (yytext[0] == '_') ? strdup(yytext + 1) : strdup(yytext);
1441 return TOK_IDENTIFIER;
1442 }
1443 YY_BREAK
1444case 29:
1446#line 181 "src/nsgenbind-lexer.l"
1447yylval->text = strndup(yytext + 1, yyleng - 2 ); return TOK_STRING_LITERAL;
1448 YY_BREAK
1449case 30:
1450/* rule 30 can match eol */
1452#line 183 "src/nsgenbind-lexer.l"
1453/* nothing */
1454 YY_BREAK
1455case 31:
1457#line 185 "src/nsgenbind-lexer.l"
1458BEGIN(incl);
1459 YY_BREAK
1460case 32:
1462#line 187 "src/nsgenbind-lexer.l"
1463return (int) yytext[0];
1464 YY_BREAK
1465case 33:
1467#line 189 "src/nsgenbind-lexer.l"
1468/* nothing */
1469 YY_BREAK
1470case 34:
1471/* rule 34 can match eol */
1473#line 191 "src/nsgenbind-lexer.l"
1474yylval->text = strdup(yytext); return TOK_CCODE_LITERAL;
1475 YY_BREAK
1476case 35:
1478#line 192 "src/nsgenbind-lexer.l"
1479BEGIN(INITIAL);
1480 YY_BREAK
1481case 36:
1483#line 193 "src/nsgenbind-lexer.l"
1484yylval->text = strdup(yytext); return TOK_CCODE_LITERAL;
1485 YY_BREAK
1486case 37:
1488#line 196 "src/nsgenbind-lexer.l"
1489/* eat the whitespace and open quotes */
1490 YY_BREAK
1491case 38:
1493#line 198 "src/nsgenbind-lexer.l"
1494{
1495 /* got the include file name */
1497
1498 if (! yyin) {
1499 fprintf(stderr, "Unable to open include %s\n", yytext);
1500 exit(3);
1501 }
1502
1503 locations = push_location(locations, yylloc, yytext);
1504
1506 BEGIN(INITIAL);
1507 }
1508 YY_BREAK
1509case 39:
1510/* rule 39 can match eol */
1512#line 213 "src/nsgenbind-lexer.l"
1513BEGIN(INITIAL);
1514 YY_BREAK
1515case 40:
1517#line 215 "src/nsgenbind-lexer.l"
1518/* nothing */
1519 YY_BREAK
1520case YY_STATE_EOF(INITIAL):
1521case YY_STATE_EOF(cblock):
1522case YY_STATE_EOF(incl):
1523#line 217 "src/nsgenbind-lexer.l"
1524{
1526
1527 if ( !YY_CURRENT_BUFFER ) {
1528 yyterminate();
1529 } else {
1530 locations = pop_location(locations, yylloc);
1531 BEGIN(incl);
1532 }
1533
1534 }
1535 YY_BREAK
1536case 41:
1538#line 229 "src/nsgenbind-lexer.l"
1539YY_FATAL_ERROR( "flex scanner jammed" );
1540 YY_BREAK
1541#line 1542 "build-x86_64-linux-gnu-x86_64-linux-gnu-release-binary/nsgenbind-lexer.c"
1542
1543 case YY_END_OF_BUFFER:
1544 {
1545 /* Amount of text matched not including the EOB char. */
1546 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1547
1548 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1549 *yy_cp = (yy_hold_char);
1551
1552 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1553 {
1554 /* We're scanning a new file or input source. It's
1555 * possible that this happened because the user
1556 * just pointed yyin at a new source and called
1557 * yylex(). If so, then we have to assure
1558 * consistency between YY_CURRENT_BUFFER and our
1559 * globals. Here is the right place to do so, because
1560 * this is the first action (other than possibly a
1561 * back-up) that will match for the new input source.
1562 */
1563 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1564 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1565 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1566 }
1567
1568 /* Note that here we test for yy_c_buf_p "<=" to the position
1569 * of the first EOB in the buffer, since yy_c_buf_p will
1570 * already have been incremented past the NUL character
1571 * (since all states make transitions on EOB to the
1572 * end-of-buffer state). Contrast this with the test
1573 * in input().
1574 */
1575 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1576 { /* This was really a NUL. */
1577 yy_state_type yy_next_state;
1578
1579 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1580
1581 yy_current_state = yy_get_previous_state( );
1582
1583 /* Okay, we're now positioned to make the NUL
1584 * transition. We couldn't have
1585 * yy_get_previous_state() go ahead and do it
1586 * for us because it doesn't know how to deal
1587 * with the possibility of jamming (and we don't
1588 * want to build jamming into it because then it
1589 * will run more slowly).
1590 */
1591
1592 yy_next_state = yy_try_NUL_trans( yy_current_state );
1593
1595
1596 if ( yy_next_state )
1597 {
1598 /* Consume the NUL. */
1599 yy_cp = ++(yy_c_buf_p);
1600 yy_current_state = yy_next_state;
1601 goto yy_match;
1602 }
1603
1604 else
1605 {
1606 yy_cp = (yy_last_accepting_cpos);
1607 yy_current_state = (yy_last_accepting_state);
1608 goto yy_find_action;
1609 }
1610 }
1611
1612 else switch ( yy_get_next_buffer( ) )
1613 {
1615 {
1616 (yy_did_buffer_switch_on_eof) = 0;
1617
1618 if ( yywrap( ) )
1619 {
1620 /* Note: because we've taken care in
1621 * yy_get_next_buffer() to have set up
1622 * yytext, we can now set up
1623 * yy_c_buf_p so that if some total
1624 * hoser (like flex itself) wants to
1625 * call the scanner after we return the
1626 * YY_NULL, it'll still work - another
1627 * YY_NULL will get returned.
1628 */
1629 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1630
1632 goto do_action;
1633 }
1634
1635 else
1636 {
1637 if ( ! (yy_did_buffer_switch_on_eof) )
1639 }
1640 break;
1641 }
1642
1644 (yy_c_buf_p) =
1645 (yytext_ptr) + yy_amount_of_matched_text;
1646
1647 yy_current_state = yy_get_previous_state( );
1648
1649 yy_cp = (yy_c_buf_p);
1651 goto yy_match;
1652
1653 case EOB_ACT_LAST_MATCH:
1654 (yy_c_buf_p) =
1655 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1656
1657 yy_current_state = yy_get_previous_state( );
1658
1659 yy_cp = (yy_c_buf_p);
1661 goto yy_find_action;
1662 }
1663 break;
1664 }
1665
1666 default:
1668 "fatal flex scanner internal error--no action found" );
1669 } /* end of action switch */
1670 } /* end of scanning one token */
1671 } /* end of user's declarations */
1672} /* end of yylex */
1673
1674/* yy_get_next_buffer - try to read in a new buffer
1675 *
1676 * Returns a code representing an action:
1677 * EOB_ACT_LAST_MATCH -
1678 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1679 * EOB_ACT_END_OF_FILE - end of file
1680 */
1681static int yy_get_next_buffer (void)
1682{
1683 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1684 char *source = (yytext_ptr);
1685 int number_to_move, i;
1686 int ret_val;
1687
1688 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1690 "fatal flex scanner internal error--end of buffer missed" );
1691
1692 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1693 { /* Don't try to fill the buffer, so this is an EOF. */
1694 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1695 {
1696 /* We matched a single character, the EOB, so
1697 * treat this as a final EOF.
1698 */
1699 return EOB_ACT_END_OF_FILE;
1700 }
1701
1702 else
1703 {
1704 /* We matched some text prior to the EOB, first
1705 * process it.
1706 */
1707 return EOB_ACT_LAST_MATCH;
1708 }
1709 }
1710
1711 /* Try to read more data. */
1712
1713 /* First move last chars to start of buffer. */
1714 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1715
1716 for ( i = 0; i < number_to_move; ++i )
1717 *(dest++) = *(source++);
1718
1719 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1720 /* don't do the read, it's not guaranteed to return an EOF,
1721 * just force an EOF
1722 */
1723 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1724
1725 else
1726 {
1727 int num_to_read =
1728 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1729
1730 while ( num_to_read <= 0 )
1731 { /* Not enough room in the buffer - grow it. */
1732
1733 /* just a shorter name for the current buffer */
1735
1736 int yy_c_buf_p_offset =
1737 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1738
1739 if ( b->yy_is_our_buffer )
1740 {
1741 int new_size = b->yy_buf_size * 2;
1742
1743 if ( new_size <= 0 )
1744 b->yy_buf_size += b->yy_buf_size / 8;
1745 else
1746 b->yy_buf_size *= 2;
1747
1748 b->yy_ch_buf = (char *)
1749 /* Include room in for 2 EOB chars. */
1750 yyrealloc( (void *) b->yy_ch_buf,
1751 (yy_size_t) (b->yy_buf_size + 2) );
1752 }
1753 else
1754 /* Can't grow it, we don't own it. */
1755 b->yy_ch_buf = NULL;
1756
1757 if ( ! b->yy_ch_buf )
1759 "fatal error - scanner input buffer overflow" );
1760
1761 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1762
1763 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1764 number_to_move - 1;
1765
1766 }
1767
1768 if ( num_to_read > YY_READ_BUF_SIZE )
1769 num_to_read = YY_READ_BUF_SIZE;
1770
1771 /* Read in more data. */
1772 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1773 (yy_n_chars), num_to_read );
1774
1775 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1776 }
1777
1778 if ( (yy_n_chars) == 0 )
1779 {
1780 if ( number_to_move == YY_MORE_ADJ )
1781 {
1782 ret_val = EOB_ACT_END_OF_FILE;
1783 yyrestart( yyin );
1784 }
1785
1786 else
1787 {
1788 ret_val = EOB_ACT_LAST_MATCH;
1789 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1791 }
1792 }
1793
1794 else
1795 ret_val = EOB_ACT_CONTINUE_SCAN;
1796
1797 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1798 /* Extend the array by 50%, plus the number we really need. */
1799 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1800 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1801 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
1802 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1803 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1804 /* "- 2" to take care of EOB's */
1805 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1806 }
1807
1808 (yy_n_chars) += number_to_move;
1809 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1810 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1811
1812 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1813
1814 return ret_val;
1815}
1816
1817/* yy_get_previous_state - get the state just before the EOB char was reached */
1818
1819 static yy_state_type yy_get_previous_state (void)
1820{
1821 yy_state_type yy_current_state;
1822 char *yy_cp;
1823
1824 yy_current_state = (yy_start);
1825 yy_current_state += YY_AT_BOL();
1826
1827 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1828 {
1829 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1830 if ( yy_accept[yy_current_state] )
1831 {
1832 (yy_last_accepting_state) = yy_current_state;
1833 (yy_last_accepting_cpos) = yy_cp;
1834 }
1835 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1836 {
1837 yy_current_state = (int) yy_def[yy_current_state];
1838 if ( yy_current_state >= 215 )
1839 yy_c = yy_meta[yy_c];
1840 }
1841 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1842 }
1843
1844 return yy_current_state;
1845}
1846
1847/* yy_try_NUL_trans - try to make a transition on the NUL character
1848 *
1849 * synopsis
1850 * next_state = yy_try_NUL_trans( current_state );
1851 */
1852 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1853{
1854 int yy_is_jam;
1855 char *yy_cp = (yy_c_buf_p);
1856
1857 YY_CHAR yy_c = 1;
1858 if ( yy_accept[yy_current_state] )
1859 {
1860 (yy_last_accepting_state) = yy_current_state;
1861 (yy_last_accepting_cpos) = yy_cp;
1862 }
1863 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1864 {
1865 yy_current_state = (int) yy_def[yy_current_state];
1866 if ( yy_current_state >= 215 )
1867 yy_c = yy_meta[yy_c];
1868 }
1869 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1870 yy_is_jam = (yy_current_state == 214);
1871
1872 return yy_is_jam ? 0 : yy_current_state;
1873}
1874
1875#ifndef YY_NO_UNPUT
1876
1877#endif
1878
1879#ifndef YY_NO_INPUT
1880#ifdef __cplusplus
1881 static int yyinput (void)
1882#else
1883 static int input (void)
1884#endif
1885
1886{
1887 int c;
1888
1889 *(yy_c_buf_p) = (yy_hold_char);
1890
1891 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1892 {
1893 /* yy_c_buf_p now points to the character we want to return.
1894 * If this occurs *before* the EOB characters, then it's a
1895 * valid NUL; if not, then we've hit the end of the buffer.
1896 */
1897 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1898 /* This was really a NUL. */
1899 *(yy_c_buf_p) = '\0';
1900
1901 else
1902 { /* need more input */
1903 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1904 ++(yy_c_buf_p);
1905
1906 switch ( yy_get_next_buffer( ) )
1907 {
1908 case EOB_ACT_LAST_MATCH:
1909 /* This happens because yy_g_n_b()
1910 * sees that we've accumulated a
1911 * token and flags that we need to
1912 * try matching the token before
1913 * proceeding. But for input(),
1914 * there's no matching to consider.
1915 * So convert the EOB_ACT_LAST_MATCH
1916 * to EOB_ACT_END_OF_FILE.
1917 */
1918
1919 /* Reset buffer status. */
1920 yyrestart( yyin );
1921
1922 /*FALLTHROUGH*/
1923
1925 {
1926 if ( yywrap( ) )
1927 return 0;
1928
1929 if ( ! (yy_did_buffer_switch_on_eof) )
1931#ifdef __cplusplus
1932 return yyinput();
1933#else
1934 return input();
1935#endif
1936 }
1937
1939 (yy_c_buf_p) = (yytext_ptr) + offset;
1940 break;
1941 }
1942 }
1943 }
1944
1945 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1946 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1947 (yy_hold_char) = *++(yy_c_buf_p);
1948
1949 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1950 if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
1951
1952 yylineno++;
1953;
1954
1955 return c;
1956}
1957#endif /* ifndef YY_NO_INPUT */
1958
1964 void yyrestart (FILE * input_file )
1965{
1966
1967 if ( ! YY_CURRENT_BUFFER ){
1971 }
1972
1973 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1975}
1976
1981 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1982{
1983
1984 /* TODO. We should be able to replace this entire function body
1985 * with
1986 * yypop_buffer_state();
1987 * yypush_buffer_state(new_buffer);
1988 */
1990 if ( YY_CURRENT_BUFFER == new_buffer )
1991 return;
1992
1993 if ( YY_CURRENT_BUFFER )
1994 {
1995 /* Flush out information for old buffer. */
1996 *(yy_c_buf_p) = (yy_hold_char);
1997 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1998 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1999 }
2000
2001 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2003
2004 /* We don't actually know whether we did this switch during
2005 * EOF (yywrap()) processing, but the only time this flag
2006 * is looked at is after yywrap() is called, so it's safe
2007 * to go ahead and always set it.
2008 */
2009 (yy_did_buffer_switch_on_eof) = 1;
2010}
2011
2012static void yy_load_buffer_state (void)
2013{
2014 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2015 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2016 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2017 (yy_hold_char) = *(yy_c_buf_p);
2018}
2019
2026 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2027{
2029
2030 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
2031 if ( ! b )
2032 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2033
2034 b->yy_buf_size = size;
2035
2036 /* yy_ch_buf has to be 2 characters longer than the size given because
2037 * we need to put in 2 end-of-buffer characters.
2038 */
2039 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
2040 if ( ! b->yy_ch_buf )
2041 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2042
2043 b->yy_is_our_buffer = 1;
2044
2045 yy_init_buffer( b, file );
2046
2047 return b;
2048}
2049
2055{
2056
2057 if ( ! b )
2058 return;
2059
2060 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2062
2063 if ( b->yy_is_our_buffer )
2064 yyfree( (void *) b->yy_ch_buf );
2065
2066 yyfree( (void *) b );
2067}
2068
2069/* Initializes or reinitializes a buffer.
2070 * This function is sometimes called more than once on the same buffer,
2071 * such as during a yyrestart() or at EOF.
2072 */
2073 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2074
2075{
2076 int oerrno = errno;
2077
2078 yy_flush_buffer( b );
2079
2080 b->yy_input_file = file;
2081 b->yy_fill_buffer = 1;
2082
2083 /* If b is the current buffer, then yy_init_buffer was _probably_
2084 * called from yyrestart() or through yy_get_next_buffer.
2085 * In that case, we don't want to reset the lineno or column.
2086 */
2087 if (b != YY_CURRENT_BUFFER){
2088 b->yy_bs_lineno = 1;
2089 b->yy_bs_column = 0;
2090 }
2091
2092 b->yy_is_interactive = 0;
2093
2094 errno = oerrno;
2095}
2096
2102{
2103 if ( ! b )
2104 return;
2105
2106 b->yy_n_chars = 0;
2107
2108 /* We always need two end-of-buffer characters. The first causes
2109 * a transition to the end-of-buffer state. The second causes
2110 * a jam in that state.
2111 */
2114
2115 b->yy_buf_pos = &b->yy_ch_buf[0];
2116
2117 b->yy_at_bol = 1;
2119
2120 if ( b == YY_CURRENT_BUFFER )
2122}
2123
2130void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2131{
2132 if (new_buffer == NULL)
2133 return;
2134
2136
2137 /* This block is copied from yy_switch_to_buffer. */
2138 if ( YY_CURRENT_BUFFER )
2139 {
2140 /* Flush out information for old buffer. */
2141 *(yy_c_buf_p) = (yy_hold_char);
2142 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2143 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2144 }
2145
2146 /* Only push if top exists. Otherwise, replace top. */
2148 (yy_buffer_stack_top)++;
2149 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2150
2151 /* copied from yy_switch_to_buffer. */
2153 (yy_did_buffer_switch_on_eof) = 1;
2154}
2155
2160void yypop_buffer_state (void)
2161{
2162 if (!YY_CURRENT_BUFFER)
2163 return;
2164
2167 if ((yy_buffer_stack_top) > 0)
2168 --(yy_buffer_stack_top);
2169
2170 if (YY_CURRENT_BUFFER) {
2172 (yy_did_buffer_switch_on_eof) = 1;
2173 }
2174}
2175
2176/* Allocates the stack if it does not exist.
2177 * Guarantees space for at least one push.
2178 */
2179static void yyensure_buffer_stack (void)
2180{
2181 yy_size_t num_to_alloc;
2182
2183 if (!(yy_buffer_stack)) {
2184
2185 /* First allocation is just for 2 elements, since we don't know if this
2186 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2187 * immediate realloc on the next call.
2188 */
2189 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2190 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2191 (num_to_alloc * sizeof(struct yy_buffer_state*)
2192 );
2193 if ( ! (yy_buffer_stack) )
2194 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2195
2196 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2197
2198 (yy_buffer_stack_max) = num_to_alloc;
2199 (yy_buffer_stack_top) = 0;
2200 return;
2201 }
2202
2203 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2204
2205 /* Increase the buffer to prepare for a possible push. */
2206 yy_size_t grow_size = 8 /* arbitrary grow size */;
2207
2208 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2209 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2210 ((yy_buffer_stack),
2211 num_to_alloc * sizeof(struct yy_buffer_state*)
2212 );
2213 if ( ! (yy_buffer_stack) )
2214 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2215
2216 /* zero only the new slots.*/
2217 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2218 (yy_buffer_stack_max) = num_to_alloc;
2219 }
2220}
2221
2228YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2229{
2231
2232 if ( size < 2 ||
2233 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2234 base[size-1] != YY_END_OF_BUFFER_CHAR )
2235 /* They forgot to leave room for the EOB's. */
2236 return NULL;
2237
2238 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
2239 if ( ! b )
2240 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2241
2242 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
2243 b->yy_buf_pos = b->yy_ch_buf = base;
2244 b->yy_is_our_buffer = 0;
2245 b->yy_input_file = NULL;
2246 b->yy_n_chars = b->yy_buf_size;
2247 b->yy_is_interactive = 0;
2248 b->yy_at_bol = 1;
2249 b->yy_fill_buffer = 0;
2251
2253
2254 return b;
2255}
2256
2265YY_BUFFER_STATE yy_scan_string (const char * yystr )
2266{
2267
2268 return yy_scan_bytes( yystr, (int) strlen(yystr) );
2269}
2270
2278YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
2279{
2281 char *buf;
2282 yy_size_t n;
2283 int i;
2284
2285 /* Get memory for full buffer, including space for trailing EOB's. */
2286 n = (yy_size_t) (_yybytes_len + 2);
2287 buf = (char *) yyalloc( n );
2288 if ( ! buf )
2289 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2290
2291 for ( i = 0; i < _yybytes_len; ++i )
2292 buf[i] = yybytes[i];
2293
2294 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2295
2296 b = yy_scan_buffer( buf, n );
2297 if ( ! b )
2298 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2299
2300 /* It's okay to grow etc. this buffer, and we should throw it
2301 * away when we're done.
2302 */
2303 b->yy_is_our_buffer = 1;
2304
2305 return b;
2306}
2307
2308#ifndef YY_EXIT_FAILURE
2309#define YY_EXIT_FAILURE 2
2310#endif
2311
2312static void yynoreturn yy_fatal_error (const char* msg )
2313{
2314 fprintf( stderr, "%s\n", msg );
2315 exit( YY_EXIT_FAILURE );
2316}
2317
2318/* Redefine yyless() so it works in section 3 code. */
2319
2320#undef yyless
2321#define yyless(n) \
2322 do \
2323 { \
2324 /* Undo effects of setting up yytext. */ \
2325 int yyless_macro_arg = (n); \
2326 YY_LESS_LINENO(yyless_macro_arg);\
2327 yytext[yyleng] = (yy_hold_char); \
2328 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2329 (yy_hold_char) = *(yy_c_buf_p); \
2330 *(yy_c_buf_p) = '\0'; \
2331 yyleng = yyless_macro_arg; \
2332 } \
2333 while ( 0 )
2334
2335/* Accessor methods (get/set functions) to struct members. */
2336
2340int yyget_lineno (void)
2341{
2342
2343 return yylineno;
2344}
2345
2349FILE *yyget_in (void)
2350{
2351 return yyin;
2352}
2353
2357FILE *yyget_out (void)
2358{
2359 return yyout;
2360}
2361
2365int yyget_leng (void)
2366{
2367 return yyleng;
2368}
2369
2374char *yyget_text (void)
2375{
2376 return yytext;
2377}
2378
2383void yyset_lineno (int _line_number )
2384{
2385
2386 yylineno = _line_number;
2387}
2388
2395void yyset_in (FILE * _in_str )
2396{
2397 yyin = _in_str ;
2398}
2399
2400void yyset_out (FILE * _out_str )
2401{
2402 yyout = _out_str ;
2403}
2404
2405int yyget_debug (void)
2406{
2407 return yy_flex_debug;
2408}
2409
2410void yyset_debug (int _bdebug )
2411{
2412 yy_flex_debug = _bdebug ;
2413}
2414
2415static int yy_init_globals (void)
2416{
2417 /* Initialization is the same as for the non-reentrant scanner.
2418 * This function is called from yylex_destroy(), so don't allocate here.
2419 */
2420
2421 /* We do not touch yylineno unless the option is enabled. */
2422 yylineno = 1;
2423
2424 (yy_buffer_stack) = NULL;
2425 (yy_buffer_stack_top) = 0;
2426 (yy_buffer_stack_max) = 0;
2427 (yy_c_buf_p) = NULL;
2428 (yy_init) = 0;
2429 (yy_start) = 0;
2430
2431/* Defined in main.c */
2432#ifdef YY_STDINIT
2433 yyin = stdin;
2434 yyout = stdout;
2435#else
2436 yyin = NULL;
2437 yyout = NULL;
2438#endif
2439
2440 /* For future reference: Set errno on error, since we are called by
2441 * yylex_init()
2442 */
2443 return 0;
2444}
2445
2446/* yylex_destroy is for both reentrant and non-reentrant scanners. */
2447int yylex_destroy (void)
2448{
2449
2450 /* Pop the buffer stack, destroying each element. */
2451 while(YY_CURRENT_BUFFER){
2455 }
2456
2457 /* Destroy the stack itself. */
2458 yyfree((yy_buffer_stack) );
2459 (yy_buffer_stack) = NULL;
2460
2461 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2462 * yylex() is called, initialization will occur. */
2463 yy_init_globals( );
2464
2465 return 0;
2466}
2467
2468/*
2469 * Internal utility routines.
2470 */
2471
2472#ifndef yytext_ptr
2473static void yy_flex_strncpy (char* s1, const char * s2, int n )
2474{
2475
2476 int i;
2477 for ( i = 0; i < n; ++i )
2478 s1[i] = s2[i];
2479}
2480#endif
2481
2482#ifdef YY_NEED_STRLEN
2483static int yy_flex_strlen (const char * s )
2484{
2485 int n;
2486 for ( n = 0; s[n]; ++n )
2487 ;
2488
2489 return n;
2490}
2491#endif
2492
2493void *yyalloc (yy_size_t size )
2494{
2495 return malloc(size);
2496}
2497
2498void *yyrealloc (void * ptr, yy_size_t size )
2499{
2500
2501 /* The cast to (char *) in the following accommodates both
2502 * implementations that use char* generic pointers, and those
2503 * that use void* generic pointers. It works with the latter
2504 * because both ANSI C and C++ allow castless assignment from
2505 * any pointer type to void*, and deal with argument conversions
2506 * as though doing an assignment.
2507 */
2508 return realloc(ptr, size);
2509}
2510
2511void yyfree (void * ptr )
2512{
2513 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2514}
2515
2516#define YYTABLES_NAME "yytables"
2517
2518#line 229 "src/nsgenbind-lexer.l"
2519
2520
WindowProxy or MessagePort source
Definition html.idl:1810
DOMString filename
Definition html.idl:1561
FILE * genbindopen(const char *filename)
#define yylex_destroy
#define YY_NEW_FILE
#define yyget_extra
#define yyset_extra
#define yyget_leng
unsigned char flex_uint8_t
#define yyset_lineno
#define yyset_lval
#define yyleng
#define yyrestart
#define yyset_debug
#define YY_EXTRA_TYPE
#define yyget_lval
#define yyout
#define YYSTYPE
short int flex_int16_t
#define yytext
unsigned int flex_uint32_t
#define yy_scan_bytes
#define YY_BREAK
#define yynoreturn
#define yyget_text
int yy_act
#define yypush_buffer_state
struct yy_buffer_state * YY_BUFFER_STATE
#define yyfree
#define YY_BUFFER_NEW
#define yylex
#define YY_RESTORE_YY_MORE_OFFSET
#define yyget_lineno
#define yywrap
#define yylineno
#define YY_BUFFER_NORMAL
char * yy_cp
#define yy_scan_buffer
#define YY_MORE_ADJ
#define YY_RULE_SETUP
#define yy_scan_string
#define YY_AT_BOL()
#define yy_flex_debug
#define cblock
#define yytext_ptr
YYLTYPE * yylloc
signed char flex_int8_t
#define EOB_ACT_END_OF_FILE
#define yyalloc
#define YY_CURRENT_BUFFER_LVALUE
#define yyget_debug
int flex_int32_t
#define yyin
#define YY_START
#define yyensure_buffer_stack
#define yy_switch_to_buffer
int yy_state_type
#define YY_CURRENT_BUFFER
#define yy_init_buffer
#define yyset_lloc
#define INITIAL
#define yypop_buffer_state
#define yyget_in
char * yy_bp
#define YY_READ_BUF_SIZE
#define YY_INPUT(buf, result, max_size)
#define yy_flush_buffer
#define yyrealloc
#define YY_END_OF_BUFFER
#define YY_STATE_EOF(state)
#define BEGIN
#define YY_END_OF_BUFFER_CHAR
#define incl
#define YY_FATAL_ERROR(msg)
#define yyget_lloc
#define yyget_out
#define yyterminate()
unsigned short int flex_uint16_t
#define yy_create_buffer
flex_uint8_t YY_CHAR
#define YY_DO_BEFORE_ACTION
#define yy_delete_buffer
#define EOB_ACT_LAST_MATCH
size_t yy_size_t
#define YY_BUFFER_EOF_PENDING
#define yyset_out
#define EOB_ACT_CONTINUE_SCAN
#define YY_DECL
#define YY_BUF_SIZE
#define YY_EXIT_FAILURE
#define YY_SC_TO_UI(c)
#define yy_load_buffer_state
YYSTYPE * yylval
#define yyset_in
void * malloc(YYSIZE_T)
void free(void *)
@ TOK_POSTFACE
@ TOK_IDENTIFIER
@ TOK_STRING_LITERAL
@ TOK_STRUCT
@ TOK_PREFACE
@ TOK_PROLOGUE
@ TOK_UNSIGNED
@ TOK_PROPERTY
@ TOK_DBLCOLON
@ TOK_TYPE
@ TOK_PROTOTYPE
@ TOK_UNION
@ TOK_UNSHARED
@ TOK_INIT
@ TOK_FLAGS
@ TOK_SHARED
@ TOK_WEBIDL
@ TOK_BINDING
@ TOK_GETTER
@ TOK_CCODE_LITERAL
@ TOK_METHOD
@ TOK_PRIVATE
@ TOK_FINI
@ TOK_EPILOGUE
@ TOK_SETTER
@ TOK_CLASS
@ TOK_INTERNAL
struct YYLTYPE * next
char * filename
flex_int32_t yy_verify
flex_int32_t yy_nxt
int flex_int32_t