lowscanner.hpp
1#ifndef yyHEADER_H
2#define yyHEADER_H 1
3#define yyIN_HEADER 1
4
5#line 2 "/Users/kniz/repo/byeolang/byeol/module/core/worker/bison/lowscanner.l"
6/* ============================================================================================
7 | PROLOGUE |
8 ============================================================================================ */
9#include "core/worker/bison/lowparser.hpp"
11BY_WARN_PUSH
12BY_WARN_IGNORE_UNUSED_FUNCTION
13#include <iostream>
14#ifdef BY_BUILD_PLATFORM_IS_WINDOWS
15# define YY_NO_UNISTD_H 1
16#endif
17namespace {
18 static constexpr int TAB_WIDTH = 4;
19 char unescape(const char* seq);
20 void append(YYSTYPE* val, const char* new1);
21 void append(YYSTYPE* val, char new1);
22}
23
24#define YY_DECL int yylexOrigin(YYSTYPE* yylval_param, YYLTYPE* yylloc_param, yyscan_t yyscanner)
25#define YY_USER_ACTION yylloc->start.row = yylloc->end.row = yyget_lineno(yyscanner); \
26 yylloc->start.col = yylloc->colcnt; yylloc->end.col = yylloc->colcnt+yyleng-1; \
27 yylloc->colcnt += yyleng;
28#define PS (*yyget_extra(yyscanner))
29
30
31
32#define YY_INT_ALIGNED short int
33
34/* A lexical scanner generated by flex */
35
36
37
38
39
40
41
42
43/* %not-for-header */
44
45
46#define FLEX_SCANNER
47#define YY_FLEX_MAJOR_VERSION 2
48#define YY_FLEX_MINOR_VERSION 6
49#define YY_FLEX_SUBMINOR_VERSION 4
50#if YY_FLEX_SUBMINOR_VERSION > 0
51#define FLEX_BETA
52#endif
53
54
55
56
57
58
59
60
61
62
63
64
65
66/* %if-c++-only */
67/* %endif */
68
69/* %if-c-only */
70
71/* %endif */
72
73
74
75#ifdef yyget_lval
76#define yyget_lval_ALREADY_DEFINED
77#else
78#define yyget_lval yyget_lval
79#endif
80
81
82#ifdef yyset_lval
83#define yyset_lval_ALREADY_DEFINED
84#else
85#define yyset_lval yyset_lval
86#endif
87
88
89
90
91
92#ifdef yyget_lloc
93#define yyget_lloc_ALREADY_DEFINED
94#else
95#define yyget_lloc yyget_lloc
96#endif
97
98
99#ifdef yyset_lloc
100#define yyset_lloc_ALREADY_DEFINED
101#else
102#define yyset_lloc yyset_lloc
103#endif
104
105
106
107
108
109
110/* %if-c-only */
111
112/* %endif */
113
114
115
116
117/* First, we deal with platform-specific or compiler-specific issues. */
118
119/* begin standard C headers. */
120/* %if-c-only */
121#include <stdio.h>
122#include <string.h>
123#include <errno.h>
124#include <stdlib.h>
125/* %endif */
126
127/* %if-tables-serialization */
128/* %endif */
129/* end standard C headers. */
130
131/* %if-c-or-c++ */
132/* flex integer type definitions */
133
134#ifndef FLEXINT_H
135#define FLEXINT_H
136
137/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
138
139#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
140
141/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
142 * if you want the limit (max/min) macros for int types.
143 */
144#ifndef __STDC_LIMIT_MACROS
145#define __STDC_LIMIT_MACROS 1
146#endif
147
148#include <inttypes.h>
149typedef int8_t flex_int8_t;
150typedef uint8_t flex_uint8_t;
151typedef int16_t flex_int16_t;
152typedef uint16_t flex_uint16_t;
153typedef int32_t flex_int32_t;
154typedef uint32_t flex_uint32_t;
155typedef uint64_t flex_uint64_t;
156#else
157typedef signed char flex_int8_t;
158typedef short int flex_int16_t;
159typedef int flex_int32_t;
160typedef unsigned char flex_uint8_t;
161typedef unsigned short int flex_uint16_t;
162typedef unsigned int flex_uint32_t;
163
164/* Limits of integral types. */
165#ifndef INT8_MIN
166#define INT8_MIN (-128)
167#endif
168#ifndef INT16_MIN
169#define INT16_MIN (-32767-1)
170#endif
171#ifndef INT32_MIN
172#define INT32_MIN (-2147483647-1)
173#endif
174#ifndef INT8_MAX
175#define INT8_MAX (127)
176#endif
177#ifndef INT16_MAX
178#define INT16_MAX (32767)
179#endif
180#ifndef INT32_MAX
181#define INT32_MAX (2147483647)
182#endif
183#ifndef UINT8_MAX
184#define UINT8_MAX (255U)
185#endif
186#ifndef UINT16_MAX
187#define UINT16_MAX (65535U)
188#endif
189#ifndef UINT32_MAX
190#define UINT32_MAX (4294967295U)
191#endif
192
193#ifndef SIZE_MAX
194#define SIZE_MAX (~(size_t)0)
195#endif
196
197#endif /* ! C99 */
198
199#endif /* ! FLEXINT_H */
200
201/* %endif */
202
203/* begin standard C++ headers. */
204/* %if-c++-only */
205/* %endif */
206
207/* TODO: this is always defined, so inline it */
208#define yyconst const
209
210#if defined(__GNUC__) && __GNUC__ >= 3
211#define yynoreturn __attribute__((__noreturn__))
212#else
213#define yynoreturn
214#endif
215
216/* %not-for-header */
217
218
219/* %not-for-header */
220
221
222
223
224/* %if-reentrant */
225
226/* An opaque pointer. */
227#ifndef YY_TYPEDEF_YY_SCANNER_T
228#define YY_TYPEDEF_YY_SCANNER_T
229typedef void* yyscan_t;
230#endif
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248/* For convenience, these vars (plus the bison vars far below)
249 are macros in the reentrant scanner. */
250#define yyin yyg->yyin_r
251#define yyout yyg->yyout_r
252#define yyextra yyg->yyextra_r
253#define yyleng yyg->yyleng_r
254#define yytext yyg->yytext_r
255#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
256#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
257#define yy_flex_debug yyg->yy_flex_debug_r
258
259
260
261/* %endif */
262
263
264
265/* %if-not-reentrant */
266/* %endif */
267
268
269
270
271
272
273
274
275/* Size of default input buffer. */
276#ifndef YY_BUF_SIZE
277#ifdef __ia64__
278/* On IA-64, the buffer size is 16k, not 8k.
279 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
280 * Ditto for the __ia64__ case accordingly.
281 */
282#define YY_BUF_SIZE 32768
283#else
284#define YY_BUF_SIZE 16384
285#endif /* __ia64__ */
286#endif
287
288
289
290
291#ifndef YY_TYPEDEF_YY_BUFFER_STATE
292#define YY_TYPEDEF_YY_BUFFER_STATE
293typedef struct yy_buffer_state *YY_BUFFER_STATE;
294#endif
295
296#ifndef YY_TYPEDEF_YY_SIZE_T
297#define YY_TYPEDEF_YY_SIZE_T
298typedef size_t yy_size_t;
299#endif
300
301/* %if-not-reentrant */
302/* %endif */
303
304/* %if-c-only */
305/* %if-not-reentrant */
306/* %endif */
307/* %endif */
308
309
310
311#ifndef YY_STRUCT_YY_BUFFER_STATE
312#define YY_STRUCT_YY_BUFFER_STATE
313struct yy_buffer_state
314 {
315/* %if-c-only */
316 FILE *yy_input_file;
317/* %endif */
318
319/* %if-c++-only */
320/* %endif */
321
322
323 char *yy_ch_buf; /* input buffer */
324 char *yy_buf_pos; /* current position in input buffer */
325
326 /* Size of input buffer in bytes, not including room for EOB
327 * characters.
328 */
329 int yy_buf_size;
330
331 /* Number of characters read into yy_ch_buf, not including EOB
332 * characters.
333 */
334 yy_size_t yy_n_chars;
335
336 /* Whether we "own" the buffer - i.e., we know we created it,
337 * and can realloc() it to grow it, and should free() it to
338 * delete it.
339 */
340 int yy_is_our_buffer;
341
342 /* Whether this is an "interactive" input source; if so, and
343 * if we're using stdio for input, then we want to use getc()
344 * instead of fread(), to make sure we stop fetching input after
345 * each newline.
346 */
347 int yy_is_interactive;
348
349 /* Whether we're considered to be at the beginning of a line.
350 * If so, '^' rules will be active on the next match, otherwise
351 * not.
352 */
353 int yy_at_bol;
354
355 int yy_bs_lineno;
356 int yy_bs_column;
359 /* Whether to try to fill the input buffer when we reach the
360 * end of it.
361 */
362 int yy_fill_buffer;
363
364 int yy_buffer_status;
365
366 };
367#endif /* !YY_STRUCT_YY_BUFFER_STATE */
368
369/* %if-c-only Standard (non-C++) definition */
370/* %not-for-header */
371
372/* %endif */
373
374
375
376/* %if-c-only Standard (non-C++) definition */
377
378/* %if-not-reentrant */
379/* %not-for-header */
380
381/* %endif */
382
383void yyrestart ( FILE *input_file , yyscan_t yyscanner );
384void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
385YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
386void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
387void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
388void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
389void yypop_buffer_state ( yyscan_t yyscanner );
390
391
392
393YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
394YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
395YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner );
396
397/* %endif */
398
399void *yyalloc ( yy_size_t , yyscan_t yyscanner );
400void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
401void yyfree ( void * , yyscan_t yyscanner );
402
403
404
405/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
406/* Begin user sect3 */
407
408#define yywrap(yyscanner) (/*CONSTCOND*/1)
409#define YY_SKIP_YYWRAP
410
411#define FLEX_DEBUG
412
413
414
415#define yytext_ptr yytext_r
416
417
418
419/* %if-c-only Standard (non-C++) definition */
420
421
422
423/* %endif */
424
425
426
427#ifdef YY_HEADER_EXPORT_START_CONDITIONS
428#define INITIAL 0
429#define stateBlockComment 1
430#define stateComment 2
431#define stateString 3
432
433#endif
434
435
436#ifndef YY_NO_UNISTD_H
437/* Special case for "unistd.h", since it is non-ANSI. We include it way
438 * down here because we want the user's section 1 to have been scanned first.
439 * The user has a chance to override it with an option.
440 */
441/* %if-c-only */
442#include <unistd.h>
443/* %endif */
444/* %if-c++-only */
445/* %endif */
446#endif
447
448
449
450#define YY_EXTRA_TYPE by::parser*
451
452
453/* %if-c-only Reentrant structure and macros (non-C++). */
454/* %if-reentrant */
455
456
457
458
459/* %if-c-only */
460
461/* %endif */
462
463/* %if-reentrant */
464
465
466
467int yylex_init (yyscan_t* scanner);
468
469int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
470
471/* %endif */
472
473/* %endif End reentrant structures and macros. */
474
475/* Accessor methods to globals.
476 These are made visible to non-reentrant scanners for convenience. */
477
478
479int yylex_destroy ( yyscan_t yyscanner );
480
481
482
483int yyget_debug ( yyscan_t yyscanner );
484
485
486
487void yyset_debug ( int debug_flag , yyscan_t yyscanner );
488
489
490
491YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
492
493
494
495void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
496
497
498
499FILE *yyget_in ( yyscan_t yyscanner );
500
501
502
503void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
504
505
506
507FILE *yyget_out ( yyscan_t yyscanner );
508
509
510
511void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
512
513
514
515 yy_size_t yyget_leng ( yyscan_t yyscanner );
516
517
518
519char *yyget_text ( yyscan_t yyscanner );
520
521
522
523int yyget_lineno ( yyscan_t yyscanner );
524
525
526
527void yyset_lineno ( int _line_number , yyscan_t yyscanner );
528
529
530
531
532int yyget_column ( yyscan_t yyscanner );
533
534
535
536
537
538void yyset_column ( int _column_no , yyscan_t yyscanner );
539
540
541
542/* %if-bison-bridge */
543
544YYSTYPE * yyget_lval ( yyscan_t yyscanner );
545
546
547void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
548
549
550
551 YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
552
553
554
555 void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
556
557
558/* %endif */
559
560/* Macros after this point can all be overridden by user definitions in
561 * section 1.
562 */
563
564#ifndef YY_SKIP_YYWRAP
565#ifdef __cplusplus
566extern "C" int yywrap ( yyscan_t yyscanner );
567#else
568extern int yywrap ( yyscan_t yyscanner );
569#endif
570#endif
571
572/* %not-for-header */
573
574/* %endif */
575
576#ifndef yytext_ptr
577static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
578#endif
579
580#ifdef YY_NEED_STRLEN
581static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
582#endif
583
584#ifndef YY_NO_INPUT
585/* %if-c-only Standard (non-C++) definition */
586/* %not-for-header */
587
588/* %endif */
589#endif
590
591
592/* %if-c-only */
593
594
595
596
597
598/* %endif */
599
600/* Amount of stuff to slurp up with each read. */
601#ifndef YY_READ_BUF_SIZE
602#ifdef __ia64__
603/* On IA-64, the buffer size is 16k, not 8k */
604#define YY_READ_BUF_SIZE 16384
605#else
606#define YY_READ_BUF_SIZE 8192
607#endif /* __ia64__ */
608#endif
609
610
611
612
613
614
615
616/* Number of entries by which start-condition stack grows. */
617#ifndef YY_START_STACK_INCR
618#define YY_START_STACK_INCR 25
619#endif
620
621
622
623/* %if-tables-serialization structures and prototypes */
624/* %not-for-header */
625
626/* %not-for-header */
627
628
629/* Default declaration of generated scanner - a define so the user can
630 * easily add parameters.
631 */
632#ifndef YY_DECL
633#define YY_DECL_IS_OURS 1
634/* %if-c-only Standard (non-C++) definition */
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652extern int yylex \
653 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
654
655#define YY_DECL int yylex \
656 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
657/* %endif */
658/* %if-c++-only C++ definition */
659/* %endif */
660#endif /* !YY_DECL */
661
662
663
664
665
666
667
668/* %not-for-header */
669
670
671/* %if-c++-only */
672/* %not-for-header */
673
674/* %endif */
675
676
677
678/* yy_get_previous_state - get the state just before the EOB char was reached */
679
680/* %if-c-only */
681/* %not-for-header */
682
683
684#undef YY_NEW_FILE
685#undef YY_FLUSH_BUFFER
686#undef yy_set_bol
687#undef yy_new_buffer
688#undef yy_set_interactive
689#undef YY_DO_BEFORE_ACTION
690
691#ifdef YY_DECL_IS_OURS
692#undef YY_DECL_IS_OURS
693#undef YY_DECL
694#endif
695
696#ifndef yy_create_buffer_ALREADY_DEFINED
697#undef yy_create_buffer
698#endif
699#ifndef yy_delete_buffer_ALREADY_DEFINED
700#undef yy_delete_buffer
701#endif
702#ifndef yy_scan_buffer_ALREADY_DEFINED
703#undef yy_scan_buffer
704#endif
705#ifndef yy_scan_string_ALREADY_DEFINED
706#undef yy_scan_string
707#endif
708#ifndef yy_scan_bytes_ALREADY_DEFINED
709#undef yy_scan_bytes
710#endif
711#ifndef yy_init_buffer_ALREADY_DEFINED
712#undef yy_init_buffer
713#endif
714#ifndef yy_flush_buffer_ALREADY_DEFINED
715#undef yy_flush_buffer
716#endif
717#ifndef yy_load_buffer_state_ALREADY_DEFINED
718#undef yy_load_buffer_state
719#endif
720#ifndef yy_switch_to_buffer_ALREADY_DEFINED
721#undef yy_switch_to_buffer
722#endif
723#ifndef yypush_buffer_state_ALREADY_DEFINED
724#undef yypush_buffer_state
725#endif
726#ifndef yypop_buffer_state_ALREADY_DEFINED
727#undef yypop_buffer_state
728#endif
729#ifndef yyensure_buffer_stack_ALREADY_DEFINED
730#undef yyensure_buffer_stack
731#endif
732#ifndef yylex_ALREADY_DEFINED
733#undef yylex
734#endif
735#ifndef yyrestart_ALREADY_DEFINED
736#undef yyrestart
737#endif
738#ifndef yylex_init_ALREADY_DEFINED
739#undef yylex_init
740#endif
741#ifndef yylex_init_extra_ALREADY_DEFINED
742#undef yylex_init_extra
743#endif
744#ifndef yylex_destroy_ALREADY_DEFINED
745#undef yylex_destroy
746#endif
747#ifndef yyget_debug_ALREADY_DEFINED
748#undef yyget_debug
749#endif
750#ifndef yyset_debug_ALREADY_DEFINED
751#undef yyset_debug
752#endif
753#ifndef yyget_extra_ALREADY_DEFINED
754#undef yyget_extra
755#endif
756#ifndef yyset_extra_ALREADY_DEFINED
757#undef yyset_extra
758#endif
759#ifndef yyget_in_ALREADY_DEFINED
760#undef yyget_in
761#endif
762#ifndef yyset_in_ALREADY_DEFINED
763#undef yyset_in
764#endif
765#ifndef yyget_out_ALREADY_DEFINED
766#undef yyget_out
767#endif
768#ifndef yyset_out_ALREADY_DEFINED
769#undef yyset_out
770#endif
771#ifndef yyget_leng_ALREADY_DEFINED
772#undef yyget_leng
773#endif
774#ifndef yyget_text_ALREADY_DEFINED
775#undef yyget_text
776#endif
777#ifndef yyget_lineno_ALREADY_DEFINED
778#undef yyget_lineno
779#endif
780#ifndef yyset_lineno_ALREADY_DEFINED
781#undef yyset_lineno
782#endif
783#ifndef yyget_column_ALREADY_DEFINED
784#undef yyget_column
785#endif
786#ifndef yyset_column_ALREADY_DEFINED
787#undef yyset_column
788#endif
789#ifndef yywrap_ALREADY_DEFINED
790#undef yywrap
791#endif
792#ifndef yyget_lval_ALREADY_DEFINED
793#undef yyget_lval
794#endif
795#ifndef yyset_lval_ALREADY_DEFINED
796#undef yyset_lval
797#endif
798#ifndef yyget_lloc_ALREADY_DEFINED
799#undef yyget_lloc
800#endif
801#ifndef yyset_lloc_ALREADY_DEFINED
802#undef yyset_lloc
803#endif
804#ifndef yyalloc_ALREADY_DEFINED
805#undef yyalloc
806#endif
807#ifndef yyrealloc_ALREADY_DEFINED
808#undef yyrealloc
809#endif
810#ifndef yyfree_ALREADY_DEFINED
811#undef yyfree
812#endif
813#ifndef yytext_ALREADY_DEFINED
814#undef yytext
815#endif
816#ifndef yyleng_ALREADY_DEFINED
817#undef yyleng
818#endif
819#ifndef yyin_ALREADY_DEFINED
820#undef yyin
821#endif
822#ifndef yyout_ALREADY_DEFINED
823#undef yyout
824#endif
825#ifndef yy_flex_debug_ALREADY_DEFINED
826#undef yy_flex_debug
827#endif
828#ifndef yylineno_ALREADY_DEFINED
829#undef yylineno
830#endif
831#ifndef yytables_fload_ALREADY_DEFINED
832#undef yytables_fload
833#endif
834#ifndef yytables_destroy_ALREADY_DEFINED
835#undef yytables_destroy
836#endif
837#ifndef yyTABLES_NAME_ALREADY_DEFINED
838#undef yyTABLES_NAME
839#endif
840
841
842
843#undef yyIN_HEADER
844#endif /* yyHEADER_H */
Definition: lowparser.hpp:60
Definition: lowscanner.cpp:385
int yy_bs_column
Definition: lowscanner.cpp:427
int yy_bs_lineno
Definition: lowscanner.cpp:426
Definition: lowparser.hpp:153