Skip to content
Myr

lexer.h

This file

Path

src/lexer.h

740 lines · 16.1 KiB · C

Last changed by

Parse `?//` as `?` and `//` outside destructuring patterns (#3593)A4-Tacksbefore adoptiona19efdd

History of this file

Take it

1#ifndef jq_yyHEADER_H2#define jq_yyHEADER_H 13#define jq_yyIN_HEADER 145#line 5 "src/lexer.h"67#line 7 "src/lexer.h"89#define  YY_INT_ALIGNED short int1011/* A lexical scanner generated by flex */1213#define FLEX_SCANNER14#define YY_FLEX_MAJOR_VERSION 215#define YY_FLEX_MINOR_VERSION 616#define YY_FLEX_SUBMINOR_VERSION 417#if YY_FLEX_SUBMINOR_VERSION > 018#define FLEX_BETA19#endif2021#ifdef yy_create_buffer22#define jq_yy_create_buffer_ALREADY_DEFINED23#else24#define yy_create_buffer jq_yy_create_buffer25#endif2627#ifdef yy_delete_buffer28#define jq_yy_delete_buffer_ALREADY_DEFINED29#else30#define yy_delete_buffer jq_yy_delete_buffer31#endif3233#ifdef yy_scan_buffer34#define jq_yy_scan_buffer_ALREADY_DEFINED35#else36#define yy_scan_buffer jq_yy_scan_buffer37#endif3839#ifdef yy_scan_string40#define jq_yy_scan_string_ALREADY_DEFINED41#else42#define yy_scan_string jq_yy_scan_string43#endif4445#ifdef yy_scan_bytes46#define jq_yy_scan_bytes_ALREADY_DEFINED47#else48#define yy_scan_bytes jq_yy_scan_bytes49#endif5051#ifdef yy_init_buffer52#define jq_yy_init_buffer_ALREADY_DEFINED53#else54#define yy_init_buffer jq_yy_init_buffer55#endif5657#ifdef yy_flush_buffer58#define jq_yy_flush_buffer_ALREADY_DEFINED59#else60#define yy_flush_buffer jq_yy_flush_buffer61#endif6263#ifdef yy_load_buffer_state64#define jq_yy_load_buffer_state_ALREADY_DEFINED65#else66#define yy_load_buffer_state jq_yy_load_buffer_state67#endif6869#ifdef yy_switch_to_buffer70#define jq_yy_switch_to_buffer_ALREADY_DEFINED71#else72#define yy_switch_to_buffer jq_yy_switch_to_buffer73#endif7475#ifdef yypush_buffer_state76#define jq_yypush_buffer_state_ALREADY_DEFINED77#else78#define yypush_buffer_state jq_yypush_buffer_state79#endif8081#ifdef yypop_buffer_state82#define jq_yypop_buffer_state_ALREADY_DEFINED83#else84#define yypop_buffer_state jq_yypop_buffer_state85#endif8687#ifdef yyensure_buffer_stack88#define jq_yyensure_buffer_stack_ALREADY_DEFINED89#else90#define yyensure_buffer_stack jq_yyensure_buffer_stack91#endif9293#ifdef yylex94#define jq_yylex_ALREADY_DEFINED95#else96#define yylex jq_yylex97#endif9899#ifdef yyrestart100#define jq_yyrestart_ALREADY_DEFINED101#else102#define yyrestart jq_yyrestart103#endif104105#ifdef yylex_init106#define jq_yylex_init_ALREADY_DEFINED107#else108#define yylex_init jq_yylex_init109#endif110111#ifdef yylex_init_extra112#define jq_yylex_init_extra_ALREADY_DEFINED113#else114#define yylex_init_extra jq_yylex_init_extra115#endif116117#ifdef yylex_destroy118#define jq_yylex_destroy_ALREADY_DEFINED119#else120#define yylex_destroy jq_yylex_destroy121#endif122123#ifdef yyget_debug124#define jq_yyget_debug_ALREADY_DEFINED125#else126#define yyget_debug jq_yyget_debug127#endif128129#ifdef yyset_debug130#define jq_yyset_debug_ALREADY_DEFINED131#else132#define yyset_debug jq_yyset_debug133#endif134135#ifdef yyget_extra136#define jq_yyget_extra_ALREADY_DEFINED137#else138#define yyget_extra jq_yyget_extra139#endif140141#ifdef yyset_extra142#define jq_yyset_extra_ALREADY_DEFINED143#else144#define yyset_extra jq_yyset_extra145#endif146147#ifdef yyget_in148#define jq_yyget_in_ALREADY_DEFINED149#else150#define yyget_in jq_yyget_in151#endif152153#ifdef yyset_in154#define jq_yyset_in_ALREADY_DEFINED155#else156#define yyset_in jq_yyset_in157#endif158159#ifdef yyget_out160#define jq_yyget_out_ALREADY_DEFINED161#else162#define yyget_out jq_yyget_out163#endif164165#ifdef yyset_out166#define jq_yyset_out_ALREADY_DEFINED167#else168#define yyset_out jq_yyset_out169#endif170171#ifdef yyget_leng172#define jq_yyget_leng_ALREADY_DEFINED173#else174#define yyget_leng jq_yyget_leng175#endif176177#ifdef yyget_text178#define jq_yyget_text_ALREADY_DEFINED179#else180#define yyget_text jq_yyget_text181#endif182183#ifdef yyget_lineno184#define jq_yyget_lineno_ALREADY_DEFINED185#else186#define yyget_lineno jq_yyget_lineno187#endif188189#ifdef yyset_lineno190#define jq_yyset_lineno_ALREADY_DEFINED191#else192#define yyset_lineno jq_yyset_lineno193#endif194195#ifdef yyget_column196#define jq_yyget_column_ALREADY_DEFINED197#else198#define yyget_column jq_yyget_column199#endif200201#ifdef yyset_column202#define jq_yyset_column_ALREADY_DEFINED203#else204#define yyset_column jq_yyset_column205#endif206207#ifdef yywrap208#define jq_yywrap_ALREADY_DEFINED209#else210#define yywrap jq_yywrap211#endif212213#ifdef yyget_lval214#define jq_yyget_lval_ALREADY_DEFINED215#else216#define yyget_lval jq_yyget_lval217#endif218219#ifdef yyset_lval220#define jq_yyset_lval_ALREADY_DEFINED221#else222#define yyset_lval jq_yyset_lval223#endif224225#ifdef yyget_lloc226#define jq_yyget_lloc_ALREADY_DEFINED227#else228#define yyget_lloc jq_yyget_lloc229#endif230231#ifdef yyset_lloc232#define jq_yyset_lloc_ALREADY_DEFINED233#else234#define yyset_lloc jq_yyset_lloc235#endif236237#ifdef yyalloc238#define jq_yyalloc_ALREADY_DEFINED239#else240#define yyalloc jq_yyalloc241#endif242243#ifdef yyrealloc244#define jq_yyrealloc_ALREADY_DEFINED245#else246#define yyrealloc jq_yyrealloc247#endif248249#ifdef yyfree250#define jq_yyfree_ALREADY_DEFINED251#else252#define yyfree jq_yyfree253#endif254255/* First, we deal with  platform-specific or compiler-specific issues. */256257/* begin standard C headers. */258#include <stdio.h>259#include <string.h>260#include <errno.h>261#include <stdlib.h>262263/* end standard C headers. */264265/* flex integer type definitions */266267#ifndef FLEXINT_H268#define FLEXINT_H269270/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */271272#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L273274/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,275 * if you want the limit (max/min) macros for int types. 276 */277#ifndef __STDC_LIMIT_MACROS278#define __STDC_LIMIT_MACROS 1279#endif280281#include <inttypes.h>282typedef int8_t flex_int8_t;283typedef uint8_t flex_uint8_t;284typedef int16_t flex_int16_t;285typedef uint16_t flex_uint16_t;286typedef int32_t flex_int32_t;287typedef uint32_t flex_uint32_t;288#else289typedef signed char flex_int8_t;290typedef short int flex_int16_t;291typedef int flex_int32_t;292typedef unsigned char flex_uint8_t; 293typedef unsigned short int flex_uint16_t;294typedef unsigned int flex_uint32_t;295296/* Limits of integral types. */297#ifndef INT8_MIN298#define INT8_MIN               (-128)299#endif300#ifndef INT16_MIN301#define INT16_MIN              (-32767-1)302#endif303#ifndef INT32_MIN304#define INT32_MIN              (-2147483647-1)305#endif306#ifndef INT8_MAX307#define INT8_MAX               (127)308#endif309#ifndef INT16_MAX310#define INT16_MAX              (32767)311#endif312#ifndef INT32_MAX313#define INT32_MAX              (2147483647)314#endif315#ifndef UINT8_MAX316#define UINT8_MAX              (255U)317#endif318#ifndef UINT16_MAX319#define UINT16_MAX             (65535U)320#endif321#ifndef UINT32_MAX322#define UINT32_MAX             (4294967295U)323#endif324325#ifndef SIZE_MAX326#define SIZE_MAX               (~(size_t)0)327#endif328329#endif /* ! C99 */330331#endif /* ! FLEXINT_H */332333/* begin standard C++ headers. */334335/* TODO: this is always defined, so inline it */336#define yyconst const337338#if defined(__GNUC__) && __GNUC__ >= 3339#define yynoreturn __attribute__((__noreturn__))340#else341#define yynoreturn342#endif343344/* An opaque pointer. */345#ifndef YY_TYPEDEF_YY_SCANNER_T346#define YY_TYPEDEF_YY_SCANNER_T347typedef void* yyscan_t;348#endif349350/* For convenience, these vars (plus the bison vars far below)351   are macros in the reentrant scanner. */352#define yyin yyg->yyin_r353#define yyout yyg->yyout_r354#define yyextra yyg->yyextra_r355#define yyleng yyg->yyleng_r356#define yytext yyg->yytext_r357#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)358#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)359#define yy_flex_debug yyg->yy_flex_debug_r360361/* Size of default input buffer. */362#ifndef YY_BUF_SIZE363#ifdef __ia64__364/* On IA-64, the buffer size is 16k, not 8k.365 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.366 * Ditto for the __ia64__ case accordingly.367 */368#define YY_BUF_SIZE 32768369#else370#define YY_BUF_SIZE 16384371#endif /* __ia64__ */372#endif373374#ifndef YY_TYPEDEF_YY_BUFFER_STATE375#define YY_TYPEDEF_YY_BUFFER_STATE376typedef struct yy_buffer_state *YY_BUFFER_STATE;377#endif378379#ifndef YY_TYPEDEF_YY_SIZE_T380#define YY_TYPEDEF_YY_SIZE_T381typedef size_t yy_size_t;382#endif383384#ifndef YY_STRUCT_YY_BUFFER_STATE385#define YY_STRUCT_YY_BUFFER_STATE386struct yy_buffer_state387	{388	FILE *yy_input_file;389390	char *yy_ch_buf;		/* input buffer */391	char *yy_buf_pos;		/* current position in input buffer */392393	/* Size of input buffer in bytes, not including room for EOB394	 * characters.395	 */396	int yy_buf_size;397398	/* Number of characters read into yy_ch_buf, not including EOB399	 * characters.400	 */401	int yy_n_chars;402403	/* Whether we "own" the buffer - i.e., we know we created it,404	 * and can realloc() it to grow it, and should free() it to405	 * delete it.406	 */407	int yy_is_our_buffer;408409	/* Whether this is an "interactive" input source; if so, and410	 * if we're using stdio for input, then we want to use getc()411	 * instead of fread(), to make sure we stop fetching input after412	 * each newline.413	 */414	int yy_is_interactive;415416	/* Whether we're considered to be at the beginning of a line.417	 * If so, '^' rules will be active on the next match, otherwise418	 * not.419	 */420	int yy_at_bol;421422    int yy_bs_lineno; /**< The line count. */423    int yy_bs_column; /**< The column count. */424425	/* Whether to try to fill the input buffer when we reach the426	 * end of it.427	 */428	int yy_fill_buffer;429430	int yy_buffer_status;431432	};433#endif /* !YY_STRUCT_YY_BUFFER_STATE */434435void yyrestart ( FILE *input_file , yyscan_t yyscanner );436void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );437YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );438void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );439void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );440void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );441void yypop_buffer_state ( yyscan_t yyscanner );442443YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );444YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );445YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );446447void *yyalloc ( yy_size_t , yyscan_t yyscanner );448void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );449void yyfree ( void * , yyscan_t yyscanner );450451/* Begin user sect3 */452453#define jq_yywrap(yyscanner) (/*CONSTCOND*/1)454#define YY_SKIP_YYWRAP455456#define yytext_ptr yytext_r457458#ifdef YY_HEADER_EXPORT_START_CONDITIONS459#define INITIAL 0460#define IN_PAREN 1461#define IN_BRACKET 2462#define IN_BRACE 3463#define IN_QQINTERP 4464#define IN_QQSTRING 5465#define IN_COMMENT 6466467#endif468469#ifndef YY_NO_UNISTD_H470/* Special case for "unistd.h", since it is non-ANSI. We include it way471 * down here because we want the user's section 1 to have been scanned first.472 * The user has a chance to override it with an option.473 */474#include <unistd.h>475#endif476477#define YY_EXTRA_TYPE int478479int yylex_init (yyscan_t* scanner);480481int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);482483/* Accessor methods to globals.484   These are made visible to non-reentrant scanners for convenience. */485486int yylex_destroy ( yyscan_t yyscanner );487488int yyget_debug ( yyscan_t yyscanner );489490void yyset_debug ( int debug_flag , yyscan_t yyscanner );491492YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );493494void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );495496FILE *yyget_in ( yyscan_t yyscanner );497498void yyset_in  ( FILE * _in_str , yyscan_t yyscanner );499500FILE *yyget_out ( yyscan_t yyscanner );501502void yyset_out  ( FILE * _out_str , yyscan_t yyscanner );503504			int yyget_leng ( yyscan_t yyscanner );505506char *yyget_text ( yyscan_t yyscanner );507508int yyget_lineno ( yyscan_t yyscanner );509510void yyset_lineno ( int _line_number , yyscan_t yyscanner );511512int yyget_column  ( yyscan_t yyscanner );513514void yyset_column ( int _column_no , yyscan_t yyscanner );515516YYSTYPE * yyget_lval ( yyscan_t yyscanner );517518void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );519520       YYLTYPE *yyget_lloc ( yyscan_t yyscanner );521    522        void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );523    524/* Macros after this point can all be overridden by user definitions in525 * section 1.526 */527528#ifndef YY_SKIP_YYWRAP529#ifdef __cplusplus530extern "C" int yywrap ( yyscan_t yyscanner );531#else532extern int yywrap ( yyscan_t yyscanner );533#endif534#endif535536#ifndef yytext_ptr537static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);538#endif539540#ifdef YY_NEED_STRLEN541static int yy_flex_strlen ( const char * , yyscan_t yyscanner);542#endif543544#ifndef YY_NO_INPUT545546#endif547548/* Amount of stuff to slurp up with each read. */549#ifndef YY_READ_BUF_SIZE550#ifdef __ia64__551/* On IA-64, the buffer size is 16k, not 8k */552#define YY_READ_BUF_SIZE 16384553#else554#define YY_READ_BUF_SIZE 8192555#endif /* __ia64__ */556#endif557558/* Number of entries by which start-condition stack grows. */559#ifndef YY_START_STACK_INCR560#define YY_START_STACK_INCR 25561#endif562563/* Default declaration of generated scanner - a define so the user can564 * easily add parameters.565 */566#ifndef YY_DECL567#define YY_DECL_IS_OURS 1568569extern int yylex \570               (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);571572#define YY_DECL int yylex \573               (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)574#endif /* !YY_DECL */575576/* yy_get_previous_state - get the state just before the EOB char was reached */577578#undef YY_NEW_FILE579#undef YY_FLUSH_BUFFER580#undef yy_set_bol581#undef yy_new_buffer582#undef yy_set_interactive583#undef YY_DO_BEFORE_ACTION584585#ifdef YY_DECL_IS_OURS586#undef YY_DECL_IS_OURS587#undef YY_DECL588#endif589590#ifndef jq_yy_create_buffer_ALREADY_DEFINED591#undef yy_create_buffer592#endif593#ifndef jq_yy_delete_buffer_ALREADY_DEFINED594#undef yy_delete_buffer595#endif596#ifndef jq_yy_scan_buffer_ALREADY_DEFINED597#undef yy_scan_buffer598#endif599#ifndef jq_yy_scan_string_ALREADY_DEFINED600#undef yy_scan_string601#endif602#ifndef jq_yy_scan_bytes_ALREADY_DEFINED603#undef yy_scan_bytes604#endif605#ifndef jq_yy_init_buffer_ALREADY_DEFINED606#undef yy_init_buffer607#endif608#ifndef jq_yy_flush_buffer_ALREADY_DEFINED609#undef yy_flush_buffer610#endif611#ifndef jq_yy_load_buffer_state_ALREADY_DEFINED612#undef yy_load_buffer_state613#endif614#ifndef jq_yy_switch_to_buffer_ALREADY_DEFINED615#undef yy_switch_to_buffer616#endif617#ifndef jq_yypush_buffer_state_ALREADY_DEFINED618#undef yypush_buffer_state619#endif620#ifndef jq_yypop_buffer_state_ALREADY_DEFINED621#undef yypop_buffer_state622#endif623#ifndef jq_yyensure_buffer_stack_ALREADY_DEFINED624#undef yyensure_buffer_stack625#endif626#ifndef jq_yylex_ALREADY_DEFINED627#undef yylex628#endif629#ifndef jq_yyrestart_ALREADY_DEFINED630#undef yyrestart631#endif632#ifndef jq_yylex_init_ALREADY_DEFINED633#undef yylex_init634#endif635#ifndef jq_yylex_init_extra_ALREADY_DEFINED636#undef yylex_init_extra637#endif638#ifndef jq_yylex_destroy_ALREADY_DEFINED639#undef yylex_destroy640#endif641#ifndef jq_yyget_debug_ALREADY_DEFINED642#undef yyget_debug643#endif644#ifndef jq_yyset_debug_ALREADY_DEFINED645#undef yyset_debug646#endif647#ifndef jq_yyget_extra_ALREADY_DEFINED648#undef yyget_extra649#endif650#ifndef jq_yyset_extra_ALREADY_DEFINED651#undef yyset_extra652#endif653#ifndef jq_yyget_in_ALREADY_DEFINED654#undef yyget_in655#endif656#ifndef jq_yyset_in_ALREADY_DEFINED657#undef yyset_in658#endif659#ifndef jq_yyget_out_ALREADY_DEFINED660#undef yyget_out661#endif662#ifndef jq_yyset_out_ALREADY_DEFINED663#undef yyset_out664#endif665#ifndef jq_yyget_leng_ALREADY_DEFINED666#undef yyget_leng667#endif668#ifndef jq_yyget_text_ALREADY_DEFINED669#undef yyget_text670#endif671#ifndef jq_yyget_lineno_ALREADY_DEFINED672#undef yyget_lineno673#endif674#ifndef jq_yyset_lineno_ALREADY_DEFINED675#undef yyset_lineno676#endif677#ifndef jq_yyget_column_ALREADY_DEFINED678#undef yyget_column679#endif680#ifndef jq_yyset_column_ALREADY_DEFINED681#undef yyset_column682#endif683#ifndef jq_yywrap_ALREADY_DEFINED684#undef yywrap685#endif686#ifndef jq_yyget_lval_ALREADY_DEFINED687#undef yyget_lval688#endif689#ifndef jq_yyset_lval_ALREADY_DEFINED690#undef yyset_lval691#endif692#ifndef jq_yyget_lloc_ALREADY_DEFINED693#undef yyget_lloc694#endif695#ifndef jq_yyset_lloc_ALREADY_DEFINED696#undef yyset_lloc697#endif698#ifndef jq_yyalloc_ALREADY_DEFINED699#undef yyalloc700#endif701#ifndef jq_yyrealloc_ALREADY_DEFINED702#undef yyrealloc703#endif704#ifndef jq_yyfree_ALREADY_DEFINED705#undef yyfree706#endif707#ifndef jq_yytext_ALREADY_DEFINED708#undef yytext709#endif710#ifndef jq_yyleng_ALREADY_DEFINED711#undef yyleng712#endif713#ifndef jq_yyin_ALREADY_DEFINED714#undef yyin715#endif716#ifndef jq_yyout_ALREADY_DEFINED717#undef yyout718#endif719#ifndef jq_yy_flex_debug_ALREADY_DEFINED720#undef yy_flex_debug721#endif722#ifndef jq_yylineno_ALREADY_DEFINED723#undef yylineno724#endif725#ifndef jq_yytables_fload_ALREADY_DEFINED726#undef yytables_fload727#endif728#ifndef jq_yytables_destroy_ALREADY_DEFINED729#undef yytables_destroy730#endif731#ifndef jq_yyTABLES_NAME_ALREADY_DEFINED732#undef yyTABLES_NAME733#endif734735#line 136 "src/lexer.l"736737738#line 738 "src/lexer.h"739#undef jq_yyIN_HEADER740#endif /* jq_yyHEADER_H */