From 1b15354edd0f104011003351a74a3a8528b4c2b6 Mon Sep 17 00:00:00 2001 From: Scott Wolchok Date: Thu, 6 Sep 2018 17:26:38 -0700 Subject: [PATCH] Support block strings Fixes #44. --- lexer.cpp | 800 +++++++++++++--------- lexer.h | 188 +++++- lexer.lpp | 123 ++++ location.hh | 27 +- parser.tab.cpp | 1325 ++++++++++++++++++------------------- parser.tab.hpp | 16 +- position.hh | 27 +- stack.hh | 37 +- test/ParserTests.cpp | 4 + test/kitchen-sink.graphql | 8 +- test/kitchen-sink.json | 2 +- 11 files changed, 1508 insertions(+), 1049 deletions(-) diff --git a/lexer.cpp b/lexer.cpp index 27bf9ad..e51a2aa 100644 --- a/lexer.cpp +++ b/lexer.cpp @@ -9,11 +9,35 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 2 +#define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif +#ifdef yyget_lval +#define yyget_lval_ALREADY_DEFINED +#else +#define yyget_lval yyget_lval +#endif + +#ifdef yyset_lval +#define yyset_lval_ALREADY_DEFINED +#else +#define yyset_lval yyset_lval +#endif + +#ifdef yyget_lloc +#define yyget_lloc_ALREADY_DEFINED +#else +#define yyget_lloc yyget_lloc +#endif + +#ifdef yyset_lloc +#define yyset_lloc_ALREADY_DEFINED +#else +#define yyset_lloc yyset_lloc +#endif + /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ @@ -84,10 +108,16 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + #endif /* ! C99 */ #endif /* ! FLEXINT_H */ +/* begin standard C++ headers. */ + /* TODO: this is always defined, so inline it */ #define yyconst const @@ -136,7 +166,7 @@ typedef void* yyscan_t; /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin ,yyscanner ) +#define YY_NEW_FILE yyrestart( yyin , yyscanner ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -228,7 +258,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -278,7 +308,7 @@ void yypop_buffer_state ( yyscan_t yyscanner ); static void yyensure_buffer_stack ( yyscan_t yyscanner ); static void yy_load_buffer_state ( yyscan_t yyscanner ); static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) +#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); @@ -294,7 +324,7 @@ void yyfree ( void * , yyscan_t yyscanner ); if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } @@ -303,7 +333,7 @@ void yyfree ( void * , yyscan_t yyscanner ); if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } @@ -333,8 +363,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 59 -#define YY_END_OF_BUFFER 60 +#define YY_NUM_RULES 64 +#define YY_END_OF_BUFFER 65 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -342,28 +372,30 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[183] = +static const flex_int16_t yy_accept[196] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 60, 58, - 18, 21, 21, 45, 57, 22, 58, 46, 47, 58, - 58, 41, 41, 49, 50, 51, 43, 52, 53, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 54, 55, 56, 58, 2, 2, 3, 1, 58, 59, - 17, 16, 16, 18, 21, 20, 44, 41, 41, 0, - 0, 0, 41, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 33, 43, 43, 43, 43, 43, 43, - 0, 3, 14, 4, 6, 5, 10, 11, 7, 9, - 8, 13, 17, 15, 21, 48, 42, 0, 42, 43, - - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 19, 0, 43, 24, - 43, 43, 43, 43, 43, 43, 43, 32, 43, 43, - 43, 43, 38, 39, 43, 0, 0, 43, 43, 26, - 43, 43, 29, 43, 43, 34, 43, 43, 43, 40, - 0, 43, 25, 43, 43, 43, 43, 35, 36, 43, - 12, 43, 43, 43, 43, 43, 43, 43, 27, 43, - 43, 31, 43, 23, 43, 30, 43, 28, 43, 43, - 37, 0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 65, 63, 22, 25, 25, 49, 62, 26, 63, 50, + 51, 63, 63, 45, 45, 53, 54, 55, 47, 56, + 57, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 58, 59, 60, 63, 2, 2, 3, 1, + 63, 15, 16, 16, 16, 64, 21, 20, 20, 22, + 25, 24, 0, 48, 45, 45, 0, 0, 0, 45, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 37, 47, 47, 47, 47, 47, 47, 0, 3, 14, + 4, 6, 5, 10, 11, 7, 9, 8, 13, 0, + + 0, 21, 19, 25, 61, 52, 46, 0, 46, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 23, 0, 18, 0, + 47, 28, 47, 47, 47, 47, 47, 47, 47, 36, + 47, 47, 47, 47, 42, 43, 47, 0, 0, 17, + 47, 47, 30, 47, 47, 33, 47, 47, 38, 47, + 47, 47, 44, 0, 47, 29, 47, 47, 47, 47, + 39, 40, 47, 12, 47, 47, 47, 47, 47, 47, + 47, 31, 47, 47, 35, 47, 27, 47, 34, 47, + 32, 47, 47, 41, 0 + } ; static const YY_CHAR yy_ec[256] = @@ -408,136 +440,142 @@ static const YY_CHAR yy_meta[56] = 4, 4, 4, 4, 4 } ; -static const flex_int16_t yy_base[195] = +static const flex_int16_t yy_base[209] = { 0, - 0, 0, 55, 62, 0, 0, 57, 64, 269, 270, - 68, 68, 71, 270, 270, 270, 0, 270, 270, 59, - 253, 63, 67, 270, 270, 270, 0, 270, 270, 231, - 41, 51, 53, 220, 219, 225, 217, 57, 53, 223, - 270, 270, 270, 208, 270, 270, 0, 270, 97, 270, - 0, 270, 257, 95, 102, 104, 0, 78, 97, 244, - 99, 114, 129, 0, 215, 211, 211, 218, 226, 212, - 77, 207, 214, 0, 218, 106, 220, 202, 206, 210, - 191, 0, 270, 270, 270, 270, 270, 270, 270, 270, - 270, 0, 0, 270, 121, 270, 131, 120, 133, 212, - - 205, 210, 197, 206, 202, 192, 205, 208, 198, 191, - 196, 200, 187, 198, 197, 188, 172, 0, 196, 0, - 186, 192, 185, 190, 176, 177, 174, 0, 169, 189, - 178, 185, 0, 0, 175, 160, 0, 167, 180, 0, - 178, 171, 0, 175, 171, 0, 163, 177, 161, 0, - 0, 167, 0, 163, 169, 169, 156, 0, 0, 154, - 270, 115, 115, 120, 128, 118, 115, 123, 0, 108, - 113, 0, 94, 0, 91, 0, 97, 0, 81, 80, - 0, 270, 163, 169, 175, 177, 179, 182, 188, 194, - 106, 104, 93, 78 - + 0, 0, 55, 62, 60, 67, 0, 0, 67, 69, + 288, 289, 73, 73, 76, 289, 280, 289, 0, 289, + 289, 65, 271, 69, 72, 289, 289, 289, 0, 289, + 289, 249, 46, 63, 58, 238, 237, 243, 235, 68, + 56, 241, 289, 289, 289, 226, 289, 289, 0, 289, + 108, 289, 289, 271, 270, 289, 0, 289, 273, 98, + 104, 106, 268, 0, 96, 103, 259, 95, 125, 140, + 0, 230, 226, 226, 233, 241, 227, 82, 222, 229, + 0, 233, 94, 235, 217, 221, 225, 206, 0, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 0, 252, + + 251, 0, 289, 113, 289, 289, 113, 115, 131, 225, + 218, 223, 210, 219, 215, 205, 218, 221, 211, 204, + 209, 213, 200, 211, 210, 201, 185, 0, 289, 232, + 208, 0, 198, 204, 197, 202, 188, 189, 186, 0, + 181, 201, 190, 197, 0, 0, 187, 172, 0, 289, + 179, 192, 0, 190, 183, 0, 187, 183, 0, 175, + 189, 173, 0, 0, 176, 0, 172, 173, 143, 130, + 0, 0, 133, 289, 121, 122, 127, 135, 125, 121, + 129, 0, 115, 127, 0, 111, 0, 108, 0, 114, + 0, 106, 105, 0, 289, 172, 178, 184, 190, 192, + + 194, 197, 203, 209, 135, 120, 97, 55 } ; -static const flex_int16_t yy_def[195] = +static const flex_int16_t yy_def[209] = { 0, - 182, 1, 183, 183, 184, 184, 185, 185, 182, 182, - 182, 182, 182, 182, 182, 182, 186, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 187, 182, 182, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 182, 182, 182, 182, 182, 182, 188, 182, 189, 182, - 190, 182, 182, 182, 182, 182, 186, 182, 182, 182, - 182, 182, 182, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 182, 188, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 191, 190, 182, 182, 182, 182, 182, 182, 187, - - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 182, 192, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 182, 193, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 194, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 182, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, - 187, 0, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182 - + 195, 1, 196, 196, 197, 197, 198, 198, 199, 199, + 195, 195, 195, 195, 195, 195, 195, 195, 200, 195, + 195, 195, 195, 195, 195, 195, 195, 195, 201, 195, + 195, 201, 201, 201, 201, 201, 201, 201, 201, 201, + 201, 201, 195, 195, 195, 195, 195, 195, 202, 195, + 203, 195, 195, 195, 195, 195, 204, 195, 195, 195, + 195, 195, 195, 200, 195, 195, 195, 195, 195, 195, + 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, + 201, 201, 201, 201, 201, 201, 201, 195, 202, 195, + 195, 195, 195, 195, 195, 195, 195, 195, 205, 195, + + 195, 204, 195, 195, 195, 195, 195, 195, 195, 201, + 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, + 201, 201, 201, 201, 201, 201, 195, 206, 195, 195, + 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, + 201, 201, 201, 201, 201, 201, 201, 195, 207, 195, + 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, + 201, 201, 201, 208, 201, 201, 201, 201, 201, 201, + 201, 201, 201, 195, 201, 201, 201, 201, 201, 201, + 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, + 201, 201, 201, 201, 0, 195, 195, 195, 195, 195, + + 195, 195, 195, 195, 195, 195, 195, 195 } ; -static const flex_int16_t yy_nxt[326] = +static const flex_int16_t yy_nxt[345] = { 0, - 10, 11, 12, 13, 11, 14, 15, 16, 17, 10, - 18, 19, 10, 20, 21, 10, 22, 23, 24, 25, - 26, 27, 27, 27, 28, 10, 29, 27, 27, 27, - 30, 31, 32, 27, 27, 33, 27, 34, 35, 36, - 27, 37, 27, 38, 39, 40, 27, 27, 27, 41, - 42, 43, 10, 10, 44, 10, 10, 45, 46, 52, - 53, 48, 10, 10, 45, 46, 52, 53, 48, 54, - 55, 55, 54, 56, 55, 58, 59, 61, 68, 66, - 49, 61, 161, 63, 63, 62, 76, 49, 67, 62, - 70, 71, 61, 69, 62, 78, 54, 151, 62, 54, - - 62, 79, 77, 84, 55, 55, 55, 95, 137, 62, - 118, 61, 85, 63, 63, 97, 97, 106, 181, 62, - 180, 107, 86, 56, 55, 87, 98, 98, 62, 88, - 99, 99, 179, 111, 178, 89, 99, 99, 177, 90, - 112, 91, 92, 61, 176, 63, 63, 97, 97, 99, - 99, 62, 175, 62, 174, 173, 172, 171, 170, 169, - 62, 168, 62, 47, 47, 47, 47, 47, 47, 50, - 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, - 51, 57, 57, 64, 64, 82, 82, 82, 83, 167, - 83, 83, 83, 83, 93, 166, 165, 93, 93, 93, - - 164, 163, 162, 160, 159, 158, 157, 156, 155, 154, - 153, 152, 81, 150, 149, 148, 147, 146, 145, 144, - 143, 142, 141, 140, 139, 138, 136, 135, 134, 133, - 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, - 122, 121, 120, 119, 117, 116, 115, 114, 113, 110, - 109, 108, 105, 104, 103, 102, 101, 100, 96, 94, - 81, 80, 75, 74, 73, 72, 65, 60, 182, 9, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182 + 12, 13, 14, 15, 13, 16, 17, 18, 19, 12, + 20, 21, 12, 22, 23, 12, 24, 25, 26, 27, + 28, 29, 29, 29, 30, 12, 31, 29, 29, 29, + 32, 33, 34, 29, 29, 35, 29, 36, 37, 38, + 29, 39, 29, 40, 41, 42, 29, 29, 29, 43, + 44, 45, 12, 12, 46, 12, 12, 47, 48, 174, + 52, 50, 12, 12, 47, 48, 54, 52, 50, 58, + 59, 58, 59, 54, 60, 61, 61, 60, 62, 61, + 51, 65, 66, 68, 73, 55, 68, 51, 70, 70, + 75, 69, 55, 74, 69, 77, 78, 83, 85, 60, + + 69, 164, 60, 69, 86, 76, 61, 61, 61, 104, + 68, 107, 107, 84, 91, 62, 61, 68, 69, 70, + 70, 121, 116, 92, 149, 69, 117, 69, 122, 107, + 107, 109, 109, 93, 69, 69, 94, 108, 108, 128, + 95, 109, 109, 194, 69, 193, 96, 109, 109, 192, + 97, 191, 98, 99, 68, 190, 70, 70, 189, 188, + 187, 186, 69, 185, 184, 183, 182, 181, 180, 179, + 178, 69, 49, 49, 49, 49, 49, 49, 53, 53, + 53, 53, 53, 53, 56, 56, 56, 56, 56, 56, + 57, 57, 57, 57, 57, 57, 64, 64, 71, 71, + + 89, 89, 89, 90, 177, 90, 90, 90, 90, 102, + 176, 175, 102, 102, 102, 173, 172, 171, 170, 169, + 168, 167, 166, 165, 88, 163, 162, 161, 160, 159, + 158, 157, 156, 155, 154, 153, 152, 151, 150, 148, + 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, + 137, 136, 135, 134, 133, 132, 131, 130, 129, 127, + 126, 125, 124, 123, 120, 119, 118, 115, 114, 113, + 112, 111, 110, 106, 105, 103, 101, 100, 88, 87, + 82, 81, 80, 79, 72, 67, 63, 195, 11, 195, + 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, + + 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 195, 195 } ; -static const flex_int16_t yy_chk[326] = +static const flex_int16_t yy_chk[345] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 3, 3, 3, 7, - 7, 3, 4, 4, 4, 4, 8, 8, 4, 11, - 12, 12, 11, 13, 13, 20, 20, 22, 32, 31, - 3, 23, 194, 23, 23, 22, 38, 4, 31, 23, - 33, 33, 58, 32, 22, 39, 54, 193, 23, 54, - - 58, 39, 38, 49, 55, 55, 56, 56, 192, 58, - 191, 59, 49, 59, 59, 61, 61, 71, 180, 59, - 179, 71, 49, 95, 95, 49, 62, 62, 59, 49, - 62, 62, 177, 76, 175, 49, 98, 98, 173, 49, - 76, 49, 49, 63, 171, 63, 63, 97, 97, 99, - 99, 63, 170, 97, 168, 167, 166, 165, 164, 163, - 63, 162, 97, 183, 183, 183, 183, 183, 183, 184, - 184, 184, 184, 184, 184, 185, 185, 185, 185, 185, - 185, 186, 186, 187, 187, 188, 188, 188, 189, 160, - 189, 189, 189, 189, 190, 157, 156, 190, 190, 190, - - 155, 154, 152, 149, 148, 147, 145, 144, 142, 141, - 139, 138, 136, 135, 132, 131, 130, 129, 127, 126, - 125, 124, 123, 122, 121, 119, 117, 116, 115, 114, - 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, - 103, 102, 101, 100, 81, 80, 79, 78, 77, 75, - 73, 72, 70, 69, 68, 67, 66, 65, 60, 53, - 44, 40, 37, 36, 35, 34, 30, 21, 9, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182 + 1, 1, 1, 1, 1, 3, 3, 3, 3, 208, + 5, 3, 4, 4, 4, 4, 5, 6, 4, 9, + 9, 10, 10, 6, 13, 14, 14, 13, 15, 15, + 3, 22, 22, 24, 33, 5, 25, 4, 25, 25, + 34, 24, 6, 33, 25, 35, 35, 40, 41, 60, + + 24, 207, 60, 25, 41, 34, 61, 61, 62, 62, + 65, 68, 68, 40, 51, 104, 104, 66, 65, 66, + 66, 83, 78, 51, 206, 66, 78, 65, 83, 107, + 107, 108, 108, 51, 66, 107, 51, 69, 69, 205, + 51, 69, 69, 193, 107, 192, 51, 109, 109, 190, + 51, 188, 51, 51, 70, 186, 70, 70, 184, 183, + 181, 180, 70, 179, 178, 177, 176, 175, 173, 170, + 169, 70, 196, 196, 196, 196, 196, 196, 197, 197, + 197, 197, 197, 197, 198, 198, 198, 198, 198, 198, + 199, 199, 199, 199, 199, 199, 200, 200, 201, 201, + + 202, 202, 202, 203, 168, 203, 203, 203, 203, 204, + 167, 165, 204, 204, 204, 162, 161, 160, 158, 157, + 155, 154, 152, 151, 148, 147, 144, 143, 142, 141, + 139, 138, 137, 136, 135, 134, 133, 131, 130, 127, + 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, + 116, 115, 114, 113, 112, 111, 110, 101, 100, 88, + 87, 86, 85, 84, 82, 80, 79, 77, 76, 75, + 74, 73, 72, 67, 63, 59, 55, 54, 46, 42, + 39, 38, 37, 36, 32, 23, 17, 11, 195, 195, + 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, + + 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 195, 195 } ; /* The intent behind this definition is that it'll catch @@ -554,10 +592,13 @@ static const flex_int16_t yy_chk[326] = * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -#line 11 "lexer.lpp" +#line 9 "lexer.lpp" +#include #include #include +#include #include +#include #include #include "location.hh" #include "position.hh" @@ -569,15 +610,18 @@ static const flex_int16_t yy_chk[326] = static void escape(char c, char *buf); -#line 574 "lexer.cpp" +static std::string clean_up_block_string(const std::string &str); + +#line 615 "lexer.cpp" #define YY_NO_INPUT 1 -#line 577 "lexer.cpp" +#line 618 "lexer.cpp" #define INITIAL 0 #define STRING_STATE 1 -#define C_COMMENT_STATE 2 -#define LINE_COMMENT_STATE 3 +#define BLOCK_STRING_STATE 2 +#define C_COMMENT_STATE 3 +#define LINE_COMMENT_STATE 4 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way @@ -848,22 +892,22 @@ YY_DECL if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); } - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); } { -#line 49 "lexer.lpp" +#line 54 "lexer.lpp" -#line 53 "lexer.lpp" +#line 58 "lexer.lpp" yyextra->loc.step(); -#line 868 "lexer.cpp" +#line 910 "lexer.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -890,13 +934,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 183 ) + if ( yy_current_state >= 196 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_current_state != 182 ); + while ( yy_current_state != 195 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; @@ -918,7 +962,7 @@ YY_DECL case 1: YY_RULE_SETUP -#line 57 "lexer.lpp" +#line 62 "lexer.lpp" { BEGIN(INITIAL); yylval->str = yyextra->str.c_str(); @@ -929,20 +973,20 @@ YY_RULE_SETUP case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 64 "lexer.lpp" +#line 69 "lexer.lpp" { throw make_error(yyextra->loc, "Unterminated string"); } YY_BREAK case YY_STATE_EOF(STRING_STATE): -#line 68 "lexer.lpp" +#line 73 "lexer.lpp" { throw make_error(yyextra->loc, "Unterminated string at EOF"); } YY_BREAK case 3: YY_RULE_SETUP -#line 72 "lexer.lpp" +#line 77 "lexer.lpp" { char *p = yytext; while (*p) { @@ -952,47 +996,47 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 79 "lexer.lpp" +#line 84 "lexer.lpp" { yyextra->str.push_back('"'); } YY_BREAK case 5: YY_RULE_SETUP -#line 80 "lexer.lpp" +#line 85 "lexer.lpp" { yyextra->str.push_back('\\'); } YY_BREAK case 6: YY_RULE_SETUP -#line 81 "lexer.lpp" +#line 86 "lexer.lpp" { yyextra->str.push_back('/'); } YY_BREAK case 7: YY_RULE_SETUP -#line 82 "lexer.lpp" +#line 87 "lexer.lpp" { yyextra->str.push_back('\n'); } YY_BREAK case 8: YY_RULE_SETUP -#line 83 "lexer.lpp" +#line 88 "lexer.lpp" { yyextra->str.push_back('\t'); } YY_BREAK case 9: YY_RULE_SETUP -#line 84 "lexer.lpp" +#line 89 "lexer.lpp" { yyextra->str.push_back('\r'); } YY_BREAK case 10: YY_RULE_SETUP -#line 85 "lexer.lpp" +#line 90 "lexer.lpp" { yyextra->str.push_back('\b'); } YY_BREAK case 11: YY_RULE_SETUP -#line 86 "lexer.lpp" +#line 91 "lexer.lpp" { yyextra->str.push_back('\f'); } YY_BREAK case 12: YY_RULE_SETUP -#line 88 "lexer.lpp" +#line 93 "lexer.lpp" { int ch; sscanf(yytext + 2, "%x", &ch); @@ -1001,248 +1045,299 @@ YY_RULE_SETUP YY_BREAK case 13: YY_RULE_SETUP -#line 94 "lexer.lpp" +#line 99 "lexer.lpp" { throw make_error(yyextra->loc, "bad Unicode escape sequence"); } YY_BREAK case 14: YY_RULE_SETUP -#line 95 "lexer.lpp" +#line 100 "lexer.lpp" { throw make_error(yyextra->loc, std::string("bad escape sequence \\") + yytext[1]); } YY_BREAK +case YY_STATE_EOF(BLOCK_STRING_STATE): +#line 105 "lexer.lpp" +{ + throw make_error(yyextra->loc, "Unterminated block string at EOF"); + } + YY_BREAK case 15: -/* rule 15 can match eol */ YY_RULE_SETUP -#line 100 "lexer.lpp" -{ yyextra->loc.lines(yyleng / 2); yyextra->loc.step(); BEGIN(INITIAL); } +#line 109 "lexer.lpp" +{ + throw make_error(yyextra->loc, std::string("Invalid character ") + yytext[0]); + } YY_BREAK case 16: /* rule 16 can match eol */ YY_RULE_SETUP -#line 101 "lexer.lpp" -{ yyextra->loc.lines(yyleng); yyextra->loc.step(); BEGIN(INITIAL); } +#line 113 "lexer.lpp" +{ + /* Can't use {GOODCHAR}+ because that would be a better match for + """ than the explicit rule! */ + yyextra->str.push_back(*yytext); + } YY_BREAK case 17: YY_RULE_SETUP -#line 102 "lexer.lpp" +#line 119 "lexer.lpp" +{ + yyextra->str.append(3, '"'); + } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 123 "lexer.lpp" +{ + BEGIN(INITIAL); + yyextra->str = clean_up_block_string(yyextra->str); + yylval->str = yyextra->str.c_str(); + *yylloc = yyextra->loc; + return yy::GraphQLParserImpl::token::TOK_STRING; + } + YY_BREAK + + +case 19: +/* rule 19 can match eol */ +YY_RULE_SETUP +#line 133 "lexer.lpp" +{ yyextra->loc.lines(yyleng / 2); yyextra->loc.step(); BEGIN(INITIAL); } + YY_BREAK +case 20: +/* rule 20 can match eol */ +YY_RULE_SETUP +#line 134 "lexer.lpp" +{ yyextra->loc.lines(yyleng); yyextra->loc.step(); BEGIN(INITIAL); } + YY_BREAK +case 21: +YY_RULE_SETUP +#line 135 "lexer.lpp" /* eat comment character */ YY_BREAK -case 18: +case 22: YY_RULE_SETUP -#line 106 "lexer.lpp" +#line 139 "lexer.lpp" { yyextra->loc.step(); } YY_BREAK -case 19: +case 23: YY_RULE_SETUP -#line 107 "lexer.lpp" +#line 140 "lexer.lpp" { yyextra->loc.step(); yyextra->loc.step(); yyextra->loc.step(); } YY_BREAK -case 20: -/* rule 20 can match eol */ +case 24: +/* rule 24 can match eol */ YY_RULE_SETUP -#line 108 "lexer.lpp" +#line 141 "lexer.lpp" { yyextra->loc.lines(yyleng / 2); yyextra->loc.step(); } YY_BREAK -case 21: -/* rule 21 can match eol */ +case 25: +/* rule 25 can match eol */ YY_RULE_SETUP -#line 109 "lexer.lpp" +#line 142 "lexer.lpp" { yyextra->loc.lines(yyleng); yyextra->loc.step(); } YY_BREAK -case 22: +case 26: YY_RULE_SETUP -#line 111 "lexer.lpp" +#line 144 "lexer.lpp" {yyextra->loc.step(); BEGIN(LINE_COMMENT_STATE); } YY_BREAK -case 23: +case 27: YY_RULE_SETUP -#line 113 "lexer.lpp" +#line 146 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_DIRECTIVE; } YY_BREAK -case 24: +case 28: YY_RULE_SETUP -#line 114 "lexer.lpp" +#line 147 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_ENUM; } YY_BREAK -case 25: +case 29: YY_RULE_SETUP -#line 115 "lexer.lpp" +#line 148 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_EXTEND; } YY_BREAK -case 26: +case 30: YY_RULE_SETUP -#line 116 "lexer.lpp" +#line 149 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_FALSE; } YY_BREAK -case 27: +case 31: YY_RULE_SETUP -#line 117 "lexer.lpp" +#line 150 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_FRAGMENT; } YY_BREAK -case 28: +case 32: YY_RULE_SETUP -#line 118 "lexer.lpp" +#line 151 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_IMPLEMENTS; } YY_BREAK -case 29: +case 33: YY_RULE_SETUP -#line 119 "lexer.lpp" +#line 152 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_INPUT; } YY_BREAK -case 30: +case 34: YY_RULE_SETUP -#line 120 "lexer.lpp" +#line 153 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_INTERFACE; } YY_BREAK -case 31: +case 35: YY_RULE_SETUP -#line 121 "lexer.lpp" +#line 154 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_MUTATION; } YY_BREAK -case 32: +case 36: YY_RULE_SETUP -#line 122 "lexer.lpp" +#line 155 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_NULL; } YY_BREAK -case 33: +case 37: YY_RULE_SETUP -#line 123 "lexer.lpp" +#line 156 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_ON; } YY_BREAK -case 34: +case 38: YY_RULE_SETUP -#line 124 "lexer.lpp" +#line 157 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_QUERY; } YY_BREAK -case 35: +case 39: YY_RULE_SETUP -#line 125 "lexer.lpp" +#line 158 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_SCALAR; } YY_BREAK -case 36: +case 40: YY_RULE_SETUP -#line 126 "lexer.lpp" +#line 159 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_SCHEMA; } YY_BREAK -case 37: +case 41: YY_RULE_SETUP -#line 127 "lexer.lpp" +#line 160 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_SUBSCRIPTION; } YY_BREAK -case 38: +case 42: YY_RULE_SETUP -#line 128 "lexer.lpp" +#line 161 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_TRUE; } YY_BREAK -case 39: +case 43: YY_RULE_SETUP -#line 129 "lexer.lpp" +#line 162 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_TYPE; } YY_BREAK -case 40: +case 44: YY_RULE_SETUP -#line 130 "lexer.lpp" +#line 163 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_UNION; } YY_BREAK -case 41: +case 45: YY_RULE_SETUP -#line 132 "lexer.lpp" +#line 165 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_INTEGER; } YY_BREAK -case 42: +case 46: YY_RULE_SETUP -#line 133 "lexer.lpp" +#line 166 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_FLOAT; } YY_BREAK -case 43: +case 47: YY_RULE_SETUP -#line 134 "lexer.lpp" +#line 167 "lexer.lpp" { yylval->str = yytext; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_IDENTIFIER; } YY_BREAK -case 44: +case 48: YY_RULE_SETUP -#line 135 "lexer.lpp" +#line 168 "lexer.lpp" { yylval->str = yytext + 1; *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_VARIABLE; } YY_BREAK -case 45: +case 49: YY_RULE_SETUP -#line 137 "lexer.lpp" +#line 170 "lexer.lpp" { *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_BANG; } YY_BREAK -case 46: +case 50: YY_RULE_SETUP -#line 138 "lexer.lpp" +#line 171 "lexer.lpp" { *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_LPAREN; } YY_BREAK -case 47: +case 51: YY_RULE_SETUP -#line 139 "lexer.lpp" +#line 172 "lexer.lpp" { *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_RPAREN; } YY_BREAK -case 48: +case 52: YY_RULE_SETUP -#line 140 "lexer.lpp" +#line 173 "lexer.lpp" { *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_ELLIPSIS; } YY_BREAK -case 49: +case 53: YY_RULE_SETUP -#line 141 "lexer.lpp" +#line 174 "lexer.lpp" { *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_COLON; } YY_BREAK -case 50: +case 54: YY_RULE_SETUP -#line 142 "lexer.lpp" +#line 175 "lexer.lpp" { *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_EQUAL; } YY_BREAK -case 51: +case 55: YY_RULE_SETUP -#line 143 "lexer.lpp" +#line 176 "lexer.lpp" { *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_AT; } YY_BREAK -case 52: +case 56: YY_RULE_SETUP -#line 144 "lexer.lpp" +#line 177 "lexer.lpp" { *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_LBRACKET; } YY_BREAK -case 53: +case 57: YY_RULE_SETUP -#line 145 "lexer.lpp" +#line 178 "lexer.lpp" { *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_RBRACKET; } YY_BREAK -case 54: +case 58: YY_RULE_SETUP -#line 146 "lexer.lpp" +#line 179 "lexer.lpp" { *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_LBRACE; } YY_BREAK -case 55: +case 59: YY_RULE_SETUP -#line 147 "lexer.lpp" +#line 180 "lexer.lpp" { *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_PIPE; } YY_BREAK -case 56: +case 60: YY_RULE_SETUP -#line 148 "lexer.lpp" +#line 181 "lexer.lpp" { *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_RBRACE; } YY_BREAK case YY_STATE_EOF(INITIAL): -#line 151 "lexer.lpp" +#line 184 "lexer.lpp" { *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_EOF; } YY_BREAK -case 57: +case 61: YY_RULE_SETUP -#line 153 "lexer.lpp" +#line 186 "lexer.lpp" +{ + BEGIN(BLOCK_STRING_STATE); + yyextra->str.clear(); + } + YY_BREAK +case 62: +YY_RULE_SETUP +#line 191 "lexer.lpp" { BEGIN(STRING_STATE); yyextra->str.clear(); } YY_BREAK -case 58: +case 63: YY_RULE_SETUP -#line 159 "lexer.lpp" +#line 197 "lexer.lpp" { char buf[6]; escape(yytext[0], buf); @@ -1251,12 +1346,12 @@ YY_RULE_SETUP std::string("unrecognized character ") + buf); } YY_BREAK -case 59: +case 64: YY_RULE_SETUP -#line 167 "lexer.lpp" +#line 205 "lexer.lpp" ECHO; YY_BREAK -#line 1261 "lexer.cpp" +#line 1354 "lexer.cpp" case YY_STATE_EOF(C_COMMENT_STATE): case YY_STATE_EOF(LINE_COMMENT_STATE): yyterminate(); @@ -1336,7 +1431,7 @@ case YY_STATE_EOF(LINE_COMMENT_STATE): { yyg->yy_did_buffer_switch_on_eof = 0; - if ( yywrap(yyscanner ) ) + if ( yywrap( yyscanner ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up @@ -1469,7 +1564,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner) b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - yyrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) ,yyscanner ); + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); } else /* Can't grow it, we don't own it. */ @@ -1501,7 +1597,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin ,yyscanner); + yyrestart( yyin , yyscanner); } else @@ -1518,9 +1614,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ,yyscanner ); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); } yyg->yy_n_chars += number_to_move; @@ -1553,7 +1652,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 183 ) + if ( yy_current_state >= 196 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1582,11 +1681,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 183 ) + if ( yy_current_state >= 196 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 182); + yy_is_jam = (yy_current_state == 195); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -1638,13 +1737,13 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ /* Reset buffer status. */ - yyrestart(yyin ,yyscanner); + yyrestart( yyin , yyscanner); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap(yyscanner ) ) + if ( yywrap( yyscanner ) ) return 0; if ( ! yyg->yy_did_buffer_switch_on_eof ) @@ -1683,11 +1782,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); } - yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - yy_load_buffer_state(yyscanner ); + yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); + yy_load_buffer_state( yyscanner ); } /** Switch to a different input buffer. @@ -1716,7 +1815,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) } YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag @@ -1745,7 +1844,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner) { YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1754,13 +1853,13 @@ static void yy_load_buffer_state (yyscan_t yyscanner) /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yyalloc((yy_size_t) (b->yy_buf_size + 2) ,yyscanner ); + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer(b,file ,yyscanner); + yy_init_buffer( b, file , yyscanner); return b; } @@ -1780,9 +1879,9 @@ static void yy_load_buffer_state (yyscan_t yyscanner) YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - yyfree((void *) b->yy_ch_buf ,yyscanner ); + yyfree( (void *) b->yy_ch_buf , yyscanner ); - yyfree((void *) b ,yyscanner ); + yyfree( (void *) b , yyscanner ); } /* Initializes or reinitializes a buffer. @@ -1795,7 +1894,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner) int oerrno = errno; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flush_buffer(b ,yyscanner); + yy_flush_buffer( b , yyscanner); b->yy_input_file = file; b->yy_fill_buffer = 1; @@ -1839,7 +1938,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner) b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -1871,7 +1970,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } @@ -1885,13 +1984,13 @@ void yypop_buffer_state (yyscan_t yyscanner) if (!YY_CURRENT_BUFFER) return; - yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); YY_CURRENT_BUFFER_LVALUE = NULL; if (yyg->yy_buffer_stack_top > 0) --yyg->yy_buffer_stack_top; if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(yyscanner ); + yy_load_buffer_state( yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } } @@ -1916,9 +2015,9 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -1947,7 +2046,7 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { @@ -1959,7 +2058,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann /* They forgot to leave room for the EOB's. */ return NULL; - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); @@ -1973,7 +2072,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer(b ,yyscanner ); + yy_switch_to_buffer( b , yyscanner ); return b; } @@ -1989,7 +2088,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) { - return yy_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); + return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -2008,7 +2107,7 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc(n ,yyscanner ); + buf = (char *) yyalloc( n , yyscanner ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); @@ -2017,7 +2116,7 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer(buf,n ,yyscanner); + b = yy_scan_buffer( buf, n , yyscanner); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); @@ -2037,7 +2136,7 @@ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; (void)yyg; - (void) fprintf( stderr, "%s\n", msg ); + fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -2075,7 +2174,7 @@ YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) int yyget_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -2088,7 +2187,7 @@ int yyget_lineno (yyscan_t yyscanner) int yyget_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -2261,7 +2360,7 @@ int yylex_init(yyscan_t* ptr_yy_globals) * The user defined value in the first argument will be available to yyalloc in * the yyextra field. */ -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) +int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) { struct yyguts_t dummy_yyguts; @@ -2271,20 +2370,20 @@ int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) errno = EINVAL; return 1; } - + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - + if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } - + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - + yyset_extra (yy_user_defined, *ptr_yy_globals); - + return yy_init_globals ( *ptr_yy_globals ); } @@ -2328,17 +2427,17 @@ int yylex_destroy (yyscan_t yyscanner) /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ - yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(yyscanner); } /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack ,yyscanner); + yyfree(yyg->yy_buffer_stack , yyscanner); yyg->yy_buffer_stack = NULL; /* Destroy the start condition stack. */ - yyfree(yyg->yy_start_stack ,yyscanner ); + yyfree( yyg->yy_start_stack , yyscanner ); yyg->yy_start_stack = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time @@ -2409,7 +2508,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 167 "lexer.lpp" +#line 205 "lexer.lpp" static void escape(char c, char *buf) { @@ -2449,3 +2548,86 @@ static void escape(char c, char *buf) { } } +static std::vector splitLines(const std::string &str) { + std::vector lines; + auto it = str.begin(); + while (it != str.end()) { + static char terminators[2] = {'\r', '\n'}; + auto nextIt = std::find_first_of(it, str.end(), terminators, terminators + sizeof(terminators)); + lines.emplace_back(str.data() + (it - str.begin()), nextIt - it); + if (nextIt != str.end()) { + auto advancedIt = nextIt + 1; + if (advancedIt != str.end()) { + if (*nextIt == '\r' && *advancedIt == '\n') { + ++advancedIt; + } + } + nextIt = std::move(advancedIt); + } + it = std::move(nextIt); + } + return lines; +} + +static int count_leading_whitespace(const std::string &str) { + auto pos = str.find_first_not_of(" \t", 0, strlen(" \t")); + if (pos == std::string::npos) { + return str.length(); + } + return pos; +} + +static bool is_all_whitespace(const std::string &str) { + return count_leading_whitespace(str) == str.length(); +} + +static std::string clean_up_block_string(const std::string &str) { + auto lines = splitLines(str); + bool first = true; + int commonIndent = INT_MAX; + for (const auto &line : lines) { + if (first) { + first = false; + continue; + } + const auto indent = count_leading_whitespace(line); + if (indent < line.length()) { + if (indent < commonIndent) { + commonIndent = indent; + } + } + } + if (commonIndent != INT_MAX) { + first = true; + for (auto &line : lines) { + if (first) { + first = false; + continue; + } + line.erase(0, commonIndent); + } + } + + const auto firstNonBlankIt = std::find_if(lines.begin(), lines.end(), [](const std::string &line) { + return !is_all_whitespace(line); + }); + lines.erase(lines.begin(), firstNonBlankIt); + + const auto firstNonBlankReverseIt = std::find_if(lines.rbegin(), lines.rend(), [](const std::string &line) { + return !is_all_whitespace(line); + }); + lines.erase(lines.end() - (firstNonBlankReverseIt - lines.rbegin()), lines.end()); + + std::string formatted; + first = true; + for (const auto &line: lines) { + if (first) { + first = false; + } else { + formatted.push_back('\n'); + } + formatted.append(line); + } + return formatted; +} + diff --git a/lexer.h b/lexer.h index 2e8fa4c..c0b5f91 100644 --- a/lexer.h +++ b/lexer.h @@ -13,11 +13,35 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 2 +#define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif +#ifdef yyget_lval +#define yyget_lval_ALREADY_DEFINED +#else +#define yyget_lval yyget_lval +#endif + +#ifdef yyset_lval +#define yyset_lval_ALREADY_DEFINED +#else +#define yyset_lval yyset_lval +#endif + +#ifdef yyget_lloc +#define yyget_lloc_ALREADY_DEFINED +#else +#define yyget_lloc yyget_lloc +#endif + +#ifdef yyset_lloc +#define yyset_lloc_ALREADY_DEFINED +#else +#define yyset_lloc yyset_lloc +#endif + /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ @@ -88,10 +112,16 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + #endif /* ! C99 */ #endif /* ! FLEXINT_H */ +/* begin standard C++ headers. */ + /* TODO: this is always defined, so inline it */ #define yyconst const @@ -181,7 +211,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -218,8 +248,9 @@ void yyfree ( void * , yyscan_t yyscanner ); #ifdef YY_HEADER_EXPORT_START_CONDITIONS #define INITIAL 0 #define STRING_STATE 1 -#define C_COMMENT_STATE 2 -#define LINE_COMMENT_STATE 3 +#define BLOCK_STRING_STATE 2 +#define C_COMMENT_STATE 3 +#define LINE_COMMENT_STATE 4 #endif @@ -344,9 +375,154 @@ extern int yylex \ #undef YY_DECL #endif -#line 167 "lexer.lpp" +#ifndef yy_create_buffer_ALREADY_DEFINED +#undef yy_create_buffer +#endif +#ifndef yy_delete_buffer_ALREADY_DEFINED +#undef yy_delete_buffer +#endif +#ifndef yy_scan_buffer_ALREADY_DEFINED +#undef yy_scan_buffer +#endif +#ifndef yy_scan_string_ALREADY_DEFINED +#undef yy_scan_string +#endif +#ifndef yy_scan_bytes_ALREADY_DEFINED +#undef yy_scan_bytes +#endif +#ifndef yy_init_buffer_ALREADY_DEFINED +#undef yy_init_buffer +#endif +#ifndef yy_flush_buffer_ALREADY_DEFINED +#undef yy_flush_buffer +#endif +#ifndef yy_load_buffer_state_ALREADY_DEFINED +#undef yy_load_buffer_state +#endif +#ifndef yy_switch_to_buffer_ALREADY_DEFINED +#undef yy_switch_to_buffer +#endif +#ifndef yypush_buffer_state_ALREADY_DEFINED +#undef yypush_buffer_state +#endif +#ifndef yypop_buffer_state_ALREADY_DEFINED +#undef yypop_buffer_state +#endif +#ifndef yyensure_buffer_stack_ALREADY_DEFINED +#undef yyensure_buffer_stack +#endif +#ifndef yylex_ALREADY_DEFINED +#undef yylex +#endif +#ifndef yyrestart_ALREADY_DEFINED +#undef yyrestart +#endif +#ifndef yylex_init_ALREADY_DEFINED +#undef yylex_init +#endif +#ifndef yylex_init_extra_ALREADY_DEFINED +#undef yylex_init_extra +#endif +#ifndef yylex_destroy_ALREADY_DEFINED +#undef yylex_destroy +#endif +#ifndef yyget_debug_ALREADY_DEFINED +#undef yyget_debug +#endif +#ifndef yyset_debug_ALREADY_DEFINED +#undef yyset_debug +#endif +#ifndef yyget_extra_ALREADY_DEFINED +#undef yyget_extra +#endif +#ifndef yyset_extra_ALREADY_DEFINED +#undef yyset_extra +#endif +#ifndef yyget_in_ALREADY_DEFINED +#undef yyget_in +#endif +#ifndef yyset_in_ALREADY_DEFINED +#undef yyset_in +#endif +#ifndef yyget_out_ALREADY_DEFINED +#undef yyget_out +#endif +#ifndef yyset_out_ALREADY_DEFINED +#undef yyset_out +#endif +#ifndef yyget_leng_ALREADY_DEFINED +#undef yyget_leng +#endif +#ifndef yyget_text_ALREADY_DEFINED +#undef yyget_text +#endif +#ifndef yyget_lineno_ALREADY_DEFINED +#undef yyget_lineno +#endif +#ifndef yyset_lineno_ALREADY_DEFINED +#undef yyset_lineno +#endif +#ifndef yyget_column_ALREADY_DEFINED +#undef yyget_column +#endif +#ifndef yyset_column_ALREADY_DEFINED +#undef yyset_column +#endif +#ifndef yywrap_ALREADY_DEFINED +#undef yywrap +#endif +#ifndef yyget_lval_ALREADY_DEFINED +#undef yyget_lval +#endif +#ifndef yyset_lval_ALREADY_DEFINED +#undef yyset_lval +#endif +#ifndef yyget_lloc_ALREADY_DEFINED +#undef yyget_lloc +#endif +#ifndef yyset_lloc_ALREADY_DEFINED +#undef yyset_lloc +#endif +#ifndef yyalloc_ALREADY_DEFINED +#undef yyalloc +#endif +#ifndef yyrealloc_ALREADY_DEFINED +#undef yyrealloc +#endif +#ifndef yyfree_ALREADY_DEFINED +#undef yyfree +#endif +#ifndef yytext_ALREADY_DEFINED +#undef yytext +#endif +#ifndef yyleng_ALREADY_DEFINED +#undef yyleng +#endif +#ifndef yyin_ALREADY_DEFINED +#undef yyin +#endif +#ifndef yyout_ALREADY_DEFINED +#undef yyout +#endif +#ifndef yy_flex_debug_ALREADY_DEFINED +#undef yy_flex_debug +#endif +#ifndef yylineno_ALREADY_DEFINED +#undef yylineno +#endif +#ifndef yytables_fload_ALREADY_DEFINED +#undef yytables_fload +#endif +#ifndef yytables_destroy_ALREADY_DEFINED +#undef yytables_destroy +#endif +#ifndef yyTABLES_NAME_ALREADY_DEFINED +#undef yyTABLES_NAME +#endif + +#line 205 "lexer.lpp" -#line 350 "lexer.h" +#line 526 "lexer.h" #undef yyIN_HEADER #endif /* yyHEADER_H */ diff --git a/lexer.lpp b/lexer.lpp index fb19e80..4e57ca9 100644 --- a/lexer.lpp +++ b/lexer.lpp @@ -6,9 +6,12 @@ */ %{ +#include #include #include +#include #include +#include #include #include "location.hh" #include "position.hh" @@ -20,6 +23,8 @@ static void escape(char c, char *buf); +static std::string clean_up_block_string(const std::string &str); + %} %option bison-bridge bison-locations @@ -28,6 +33,7 @@ static void escape(char c, char *buf); %option extra-type="struct LexerExtra *" %x STRING_STATE +%x BLOCK_STRING_STATE %x C_COMMENT_STATE %x LINE_COMMENT_STATE @@ -38,6 +44,7 @@ VARIABLE $[_0-9A-Za-z]+ BOM \xef\xbb\xbf CRLF \r\n BADCHAR [\x00-\x08\x0b\x0c\x0e-\x1f] +GOODCHAR [^\x00-\x08\x0b\x0c\x0e-\x1f] STRINGCHAR [^\x00-\x1f\\\x22] blank [ \t,] @@ -93,6 +100,34 @@ notnewline [^\n\r] } +{ + <> { + throw make_error(yyextra->loc, "Unterminated block string at EOF"); + } + + {BADCHAR} { + throw make_error(yyextra->loc, std::string("Invalid character ") + yytext[0]); + } + + {GOODCHAR} { + /* Can't use {GOODCHAR}+ because that would be a better match for + """ than the explicit rule! */ + yyextra->str.push_back(*yytext); + } + + \\\"\"\" { + yyextra->str.append(3, '"'); + } + + \"\"\" { + BEGIN(INITIAL); + yyextra->str = clean_up_block_string(yyextra->str); + yylval->str = yyextra->str.c_str(); + *yylloc = yyextra->loc; + return yy::GraphQLParserImpl::token::TOK_STRING; + } +} + { {CRLF} { yyextra->loc.lines(yyleng / 2); yyextra->loc.step(); BEGIN(INITIAL); } {newline} { yyextra->loc.lines(yyleng); yyextra->loc.step(); BEGIN(INITIAL); } @@ -147,6 +182,11 @@ notnewline [^\n\r] <> { *yylloc = yyextra->loc; return yy::GraphQLParserImpl::token::TOK_EOF; } + \"\"\" { + BEGIN(BLOCK_STRING_STATE); + yyextra->str.clear(); + } + \" { BEGIN(STRING_STATE); yyextra->str.clear(); @@ -199,3 +239,86 @@ static void escape(char c, char *buf) { } } } + +static std::vector splitLines(const std::string &str) { + std::vector lines; + auto it = str.begin(); + while (it != str.end()) { + static char terminators[2] = {'\r', '\n'}; + auto nextIt = std::find_first_of(it, str.end(), terminators, terminators + sizeof(terminators)); + lines.emplace_back(str.data() + (it - str.begin()), nextIt - it); + if (nextIt != str.end()) { + auto advancedIt = nextIt + 1; + if (advancedIt != str.end()) { + if (*nextIt == '\r' && *advancedIt == '\n') { + ++advancedIt; + } + } + nextIt = std::move(advancedIt); + } + it = std::move(nextIt); + } + return lines; +} + +static int count_leading_whitespace(const std::string &str) { + auto pos = str.find_first_not_of(" \t", 0, strlen(" \t")); + if (pos == std::string::npos) { + return str.length(); + } + return pos; +} + +static bool is_all_whitespace(const std::string &str) { + return count_leading_whitespace(str) == str.length(); +} + +static std::string clean_up_block_string(const std::string &str) { + auto lines = splitLines(str); + bool first = true; + int commonIndent = INT_MAX; + for (const auto &line : lines) { + if (first) { + first = false; + continue; + } + const auto indent = count_leading_whitespace(line); + if (indent < line.length()) { + if (indent < commonIndent) { + commonIndent = indent; + } + } + } + if (commonIndent != INT_MAX) { + first = true; + for (auto &line : lines) { + if (first) { + first = false; + continue; + } + line.erase(0, commonIndent); + } + } + + const auto firstNonBlankIt = std::find_if(lines.begin(), lines.end(), [](const std::string &line) { + return !is_all_whitespace(line); + }); + lines.erase(lines.begin(), firstNonBlankIt); + + const auto firstNonBlankReverseIt = std::find_if(lines.rbegin(), lines.rend(), [](const std::string &line) { + return !is_all_whitespace(line); + }); + lines.erase(lines.end() - (firstNonBlankReverseIt - lines.rbegin()), lines.end()); + + std::string formatted; + first = true; + for (const auto &line: lines) { + if (first) { + first = false; + } else { + formatted.push_back('\n'); + } + formatted.append(line); + } + return formatted; +} diff --git a/location.hh b/location.hh index f1319bd..0ff8530 100644 --- a/location.hh +++ b/location.hh @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.0.4. +// A Bison parser, made by GNU Bison 3.0.5. // Locations for Bison parsers in C++ -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -42,7 +42,7 @@ namespace yy { -#line 46 "location.hh" // location.cc:337 +#line 46 "location.hh" // location.cc:333 /// Abstract a location. class location { @@ -52,30 +52,27 @@ namespace yy { location (const position& b, const position& e) : begin (b) , end (e) - { - } + {} /// Construct a 0-width location in \a p. explicit location (const position& p = position ()) : begin (p) , end (p) - { - } + {} /// Construct a 0-width location in \a f, \a l, \a c. explicit location (std::string* f, - unsigned int l = 1u, - unsigned int c = 1u) + unsigned l = 1u, + unsigned c = 1u) : begin (f, l, c) , end (f, l, c) - { - } + {} /// Initialization. void initialize (std::string* f = YY_NULLPTR, - unsigned int l = 1u, - unsigned int c = 1u) + unsigned l = 1u, + unsigned c = 1u) { begin.initialize (f, l, c); end = begin; @@ -173,7 +170,7 @@ namespace yy { inline std::basic_ostream& operator<< (std::basic_ostream& ostr, const location& loc) { - unsigned int end_col = 0 < loc.end.column ? loc.end.column - 1 : 0; + unsigned end_col = 0 < loc.end.column ? loc.end.column - 1 : 0; ostr << loc.begin; if (loc.end.filename && (!loc.begin.filename @@ -188,5 +185,5 @@ namespace yy { } // yy -#line 192 "location.hh" // location.cc:337 +#line 189 "location.hh" // location.cc:333 #endif // !YY_YY_LOCATION_HH_INCLUDED diff --git a/parser.tab.cpp b/parser.tab.cpp index 80b37dc..181fc28 100644 --- a/parser.tab.cpp +++ b/parser.tab.cpp @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.0.4. +// A Bison parser, made by GNU Bison 3.0.5. // Skeleton implementation for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ // First part of user declarations. -#line 37 "parser.tab.cpp" // lalr1.cc:404 +#line 37 "parser.tab.cpp" // lalr1.cc:406 # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus @@ -47,14 +47,14 @@ // User implementation prologue. -#line 51 "parser.tab.cpp" // lalr1.cc:412 +#line 51 "parser.tab.cpp" // lalr1.cc:414 // Unqualified %code blocks. -#line 159 "parser.ypp" // lalr1.cc:413 +#line 157 "parser.ypp" // lalr1.cc:415 #include "lexer.h" #include "syntaxdefs.h" -#line 58 "parser.tab.cpp" // lalr1.cc:413 +#line 58 "parser.tab.cpp" // lalr1.cc:415 #ifndef YY_ @@ -105,7 +105,7 @@ { \ *yycdebug_ << Title << ' '; \ yy_print_ (*yycdebug_, Symbol); \ - *yycdebug_ << std::endl; \ + *yycdebug_ << '\n'; \ } \ } while (false) @@ -124,9 +124,9 @@ #else // !YYDEBUG # define YYCDEBUG if (false) std::cerr -# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE(Symbol) -# define YY_REDUCE_PRINT(Rule) static_cast(0) -# define YY_STACK_PRINT() static_cast(0) +# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol) +# define YY_REDUCE_PRINT(Rule) static_cast (0) +# define YY_STACK_PRINT() static_cast (0) #endif // !YYDEBUG @@ -140,7 +140,7 @@ namespace yy { -#line 144 "parser.tab.cpp" // lalr1.cc:479 +#line 144 "parser.tab.cpp" // lalr1.cc:481 /* Return YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is @@ -201,7 +201,6 @@ namespace yy { | Symbol types. | `---------------*/ - inline GraphQLParserImpl::syntax_error::syntax_error (const location_type& l, const std::string& m) : std::runtime_error (m) , location (l) @@ -209,13 +208,11 @@ namespace yy { // basic_symbol. template - inline GraphQLParserImpl::basic_symbol::basic_symbol () : value () {} template - inline GraphQLParserImpl::basic_symbol::basic_symbol (const basic_symbol& other) : Base (other) , value () @@ -224,9 +221,7 @@ namespace yy { value = other.value; } - template - inline GraphQLParserImpl::basic_symbol::basic_symbol (typename Base::kind_type t, const semantic_type& v, const location_type& l) : Base (t) , value (v) @@ -236,7 +231,6 @@ namespace yy { /// Constructor for valueless symbols. template - inline GraphQLParserImpl::basic_symbol::basic_symbol (typename Base::kind_type t, const location_type& l) : Base (t) , value () @@ -244,14 +238,12 @@ namespace yy { {} template - inline GraphQLParserImpl::basic_symbol::~basic_symbol () { clear (); } template - inline void GraphQLParserImpl::basic_symbol::clear () { @@ -259,7 +251,6 @@ namespace yy { } template - inline bool GraphQLParserImpl::basic_symbol::empty () const { @@ -267,39 +258,33 @@ namespace yy { } template - inline void GraphQLParserImpl::basic_symbol::move (basic_symbol& s) { - super_type::move(s); + super_type::move (s); value = s.value; location = s.location; } // by_type. - inline GraphQLParserImpl::by_type::by_type () : type (empty_symbol) {} - inline GraphQLParserImpl::by_type::by_type (const by_type& other) : type (other.type) {} - inline GraphQLParserImpl::by_type::by_type (token_type t) : type (yytranslate_ (t)) {} - inline void GraphQLParserImpl::by_type::clear () { type = empty_symbol; } - inline void GraphQLParserImpl::by_type::move (by_type& that) { @@ -307,7 +292,6 @@ namespace yy { that.clear (); } - inline int GraphQLParserImpl::by_type::type_get () const { @@ -316,24 +300,20 @@ namespace yy { // by_state. - inline GraphQLParserImpl::by_state::by_state () : state (empty_state) {} - inline GraphQLParserImpl::by_state::by_state (const by_state& other) : state (other.state) {} - inline void GraphQLParserImpl::by_state::clear () { state = empty_state; } - inline void GraphQLParserImpl::by_state::move (by_state& that) { @@ -341,12 +321,10 @@ namespace yy { that.clear (); } - inline GraphQLParserImpl::by_state::by_state (state_type s) : state (s) {} - inline GraphQLParserImpl::symbol_number_type GraphQLParserImpl::by_state::type_get () const { @@ -356,12 +334,15 @@ namespace yy { return yystos_[state]; } - inline GraphQLParserImpl::stack_symbol_type::stack_symbol_type () {} + GraphQLParserImpl::stack_symbol_type::stack_symbol_type (const stack_symbol_type& that) + : super_type (that.state, that.location) + { + value = that.value; + } - inline GraphQLParserImpl::stack_symbol_type::stack_symbol_type (state_type s, symbol_type& that) : super_type (s, that.location) { @@ -370,7 +351,6 @@ namespace yy { that.type = empty_symbol; } - inline GraphQLParserImpl::stack_symbol_type& GraphQLParserImpl::stack_symbol_type::operator= (const stack_symbol_type& that) { @@ -382,7 +362,6 @@ namespace yy { template - inline void GraphQLParserImpl::yy_destroy_ (const char* yymsg, basic_symbol& yysym) const { @@ -394,709 +373,709 @@ namespace yy { { case 3: // "directive" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 400 "parser.tab.cpp" // lalr1.cc:617 +#line 379 "parser.tab.cpp" // lalr1.cc:616 break; case 4: // "enum" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 407 "parser.tab.cpp" // lalr1.cc:617 +#line 386 "parser.tab.cpp" // lalr1.cc:616 break; case 5: // "extend" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 414 "parser.tab.cpp" // lalr1.cc:617 +#line 393 "parser.tab.cpp" // lalr1.cc:616 break; case 6: // "false" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 421 "parser.tab.cpp" // lalr1.cc:617 +#line 400 "parser.tab.cpp" // lalr1.cc:616 break; case 7: // "fragment" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 428 "parser.tab.cpp" // lalr1.cc:617 +#line 407 "parser.tab.cpp" // lalr1.cc:616 break; case 8: // "implements" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 435 "parser.tab.cpp" // lalr1.cc:617 +#line 414 "parser.tab.cpp" // lalr1.cc:616 break; case 9: // "input" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 442 "parser.tab.cpp" // lalr1.cc:617 +#line 421 "parser.tab.cpp" // lalr1.cc:616 break; case 10: // "interface" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 449 "parser.tab.cpp" // lalr1.cc:617 +#line 428 "parser.tab.cpp" // lalr1.cc:616 break; case 11: // "mutation" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 456 "parser.tab.cpp" // lalr1.cc:617 +#line 435 "parser.tab.cpp" // lalr1.cc:616 break; case 12: // "null" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 463 "parser.tab.cpp" // lalr1.cc:617 +#line 442 "parser.tab.cpp" // lalr1.cc:616 break; case 13: // "query" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 470 "parser.tab.cpp" // lalr1.cc:617 +#line 449 "parser.tab.cpp" // lalr1.cc:616 break; case 14: // "on" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 477 "parser.tab.cpp" // lalr1.cc:617 +#line 456 "parser.tab.cpp" // lalr1.cc:616 break; case 15: // "scalar" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 484 "parser.tab.cpp" // lalr1.cc:617 +#line 463 "parser.tab.cpp" // lalr1.cc:616 break; case 16: // "schema" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 491 "parser.tab.cpp" // lalr1.cc:617 +#line 470 "parser.tab.cpp" // lalr1.cc:616 break; case 17: // "subscription" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 498 "parser.tab.cpp" // lalr1.cc:617 +#line 477 "parser.tab.cpp" // lalr1.cc:616 break; case 18: // "true" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 505 "parser.tab.cpp" // lalr1.cc:617 +#line 484 "parser.tab.cpp" // lalr1.cc:616 break; case 19: // "type" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 512 "parser.tab.cpp" // lalr1.cc:617 +#line 491 "parser.tab.cpp" // lalr1.cc:616 break; case 20: // "union" -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 519 "parser.tab.cpp" // lalr1.cc:617 +#line 498 "parser.tab.cpp" // lalr1.cc:616 break; case 33: // VARIABLE -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 526 "parser.tab.cpp" // lalr1.cc:617 +#line 505 "parser.tab.cpp" // lalr1.cc:616 break; case 34: // INTEGER -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 533 "parser.tab.cpp" // lalr1.cc:617 +#line 512 "parser.tab.cpp" // lalr1.cc:616 break; case 35: // FLOAT -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 540 "parser.tab.cpp" // lalr1.cc:617 +#line 519 "parser.tab.cpp" // lalr1.cc:616 break; case 36: // STRING -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 547 "parser.tab.cpp" // lalr1.cc:617 +#line 526 "parser.tab.cpp" // lalr1.cc:616 break; case 37: // IDENTIFIER -#line 291 "parser.ypp" // lalr1.cc:617 +#line 289 "parser.ypp" // lalr1.cc:616 { } -#line 554 "parser.tab.cpp" // lalr1.cc:617 +#line 533 "parser.tab.cpp" // lalr1.cc:616 break; case 39: // start -#line 293 "parser.ypp" // lalr1.cc:617 +#line 291 "parser.ypp" // lalr1.cc:616 { } -#line 561 "parser.tab.cpp" // lalr1.cc:617 +#line 540 "parser.tab.cpp" // lalr1.cc:616 break; case 40: // fragment_name -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.name); } -#line 568 "parser.tab.cpp" // lalr1.cc:617 +#line 547 "parser.tab.cpp" // lalr1.cc:616 break; case 41: // name -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.name); } -#line 575 "parser.tab.cpp" // lalr1.cc:617 +#line 554 "parser.tab.cpp" // lalr1.cc:616 break; case 42: // name_opt -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.name); } -#line 582 "parser.tab.cpp" // lalr1.cc:617 +#line 561 "parser.tab.cpp" // lalr1.cc:616 break; case 43: // document -#line 293 "parser.ypp" // lalr1.cc:617 +#line 291 "parser.ypp" // lalr1.cc:616 { } -#line 589 "parser.tab.cpp" // lalr1.cc:617 +#line 568 "parser.tab.cpp" // lalr1.cc:616 break; case 44: // definition_list -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.definitionList); } -#line 596 "parser.tab.cpp" // lalr1.cc:617 +#line 575 "parser.tab.cpp" // lalr1.cc:616 break; case 45: // definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.definition); } -#line 603 "parser.tab.cpp" // lalr1.cc:617 +#line 582 "parser.tab.cpp" // lalr1.cc:616 break; case 46: // schema_gate -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.definition); } -#line 610 "parser.tab.cpp" // lalr1.cc:617 +#line 589 "parser.tab.cpp" // lalr1.cc:616 break; case 47: // operation_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.operationDefinition); } -#line 617 "parser.tab.cpp" // lalr1.cc:617 +#line 596 "parser.tab.cpp" // lalr1.cc:616 break; case 48: // operation_type -#line 292 "parser.ypp" // lalr1.cc:617 +#line 290 "parser.ypp" // lalr1.cc:616 { free((void *)(yysym.value.heapStr)); } -#line 624 "parser.tab.cpp" // lalr1.cc:617 +#line 603 "parser.tab.cpp" // lalr1.cc:616 break; case 49: // variable_definitions -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.variableDefinitionList); } -#line 631 "parser.tab.cpp" // lalr1.cc:617 +#line 610 "parser.tab.cpp" // lalr1.cc:616 break; case 50: // variable_definition_list -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.variableDefinitionList); } -#line 638 "parser.tab.cpp" // lalr1.cc:617 +#line 617 "parser.tab.cpp" // lalr1.cc:616 break; case 51: // variable -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.variable); } -#line 645 "parser.tab.cpp" // lalr1.cc:617 +#line 624 "parser.tab.cpp" // lalr1.cc:616 break; case 52: // variable_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.variableDefinition); } -#line 652 "parser.tab.cpp" // lalr1.cc:617 +#line 631 "parser.tab.cpp" // lalr1.cc:616 break; case 53: // default_value_opt -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.value); } -#line 659 "parser.tab.cpp" // lalr1.cc:617 +#line 638 "parser.tab.cpp" // lalr1.cc:616 break; case 54: // default_value -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.value); } -#line 666 "parser.tab.cpp" // lalr1.cc:617 +#line 645 "parser.tab.cpp" // lalr1.cc:616 break; case 55: // selection_set -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.selectionSet); } -#line 673 "parser.tab.cpp" // lalr1.cc:617 +#line 652 "parser.tab.cpp" // lalr1.cc:616 break; case 56: // selection_set_opt -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.selectionSet); } -#line 680 "parser.tab.cpp" // lalr1.cc:617 +#line 659 "parser.tab.cpp" // lalr1.cc:616 break; case 57: // selection_list -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.selectionList); } -#line 687 "parser.tab.cpp" // lalr1.cc:617 +#line 666 "parser.tab.cpp" // lalr1.cc:616 break; case 58: // selection -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.selection); } -#line 694 "parser.tab.cpp" // lalr1.cc:617 +#line 673 "parser.tab.cpp" // lalr1.cc:616 break; case 59: // field -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.field); } -#line 701 "parser.tab.cpp" // lalr1.cc:617 +#line 680 "parser.tab.cpp" // lalr1.cc:616 break; case 60: // arguments -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.argumentList); } -#line 708 "parser.tab.cpp" // lalr1.cc:617 +#line 687 "parser.tab.cpp" // lalr1.cc:616 break; case 61: // arguments_opt -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.argumentList); } -#line 715 "parser.tab.cpp" // lalr1.cc:617 +#line 694 "parser.tab.cpp" // lalr1.cc:616 break; case 62: // argument_list -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.argumentList); } -#line 722 "parser.tab.cpp" // lalr1.cc:617 +#line 701 "parser.tab.cpp" // lalr1.cc:616 break; case 63: // argument -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.argument); } -#line 729 "parser.tab.cpp" // lalr1.cc:617 +#line 708 "parser.tab.cpp" // lalr1.cc:616 break; case 64: // fragment_spread -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.fragmentSpread); } -#line 736 "parser.tab.cpp" // lalr1.cc:617 +#line 715 "parser.tab.cpp" // lalr1.cc:616 break; case 65: // inline_fragment -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.inlineFragment); } -#line 743 "parser.tab.cpp" // lalr1.cc:617 +#line 722 "parser.tab.cpp" // lalr1.cc:616 break; case 66: // fragment_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.fragmentDefinition); } -#line 750 "parser.tab.cpp" // lalr1.cc:617 +#line 729 "parser.tab.cpp" // lalr1.cc:616 break; case 67: // type_condition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.namedType); } -#line 757 "parser.tab.cpp" // lalr1.cc:617 +#line 736 "parser.tab.cpp" // lalr1.cc:616 break; case 68: // value -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.value); } -#line 764 "parser.tab.cpp" // lalr1.cc:617 +#line 743 "parser.tab.cpp" // lalr1.cc:616 break; case 69: // int_value -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.intValue); } -#line 771 "parser.tab.cpp" // lalr1.cc:617 +#line 750 "parser.tab.cpp" // lalr1.cc:616 break; case 70: // float_value -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.floatValue); } -#line 778 "parser.tab.cpp" // lalr1.cc:617 +#line 757 "parser.tab.cpp" // lalr1.cc:616 break; case 71: // string_value -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.stringValue); } -#line 785 "parser.tab.cpp" // lalr1.cc:617 +#line 764 "parser.tab.cpp" // lalr1.cc:616 break; case 72: // value_const -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.value); } -#line 792 "parser.tab.cpp" // lalr1.cc:617 +#line 771 "parser.tab.cpp" // lalr1.cc:616 break; case 73: // boolean_value -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.booleanValue); } -#line 799 "parser.tab.cpp" // lalr1.cc:617 +#line 778 "parser.tab.cpp" // lalr1.cc:616 break; case 74: // null_value -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.nullValue); } -#line 806 "parser.tab.cpp" // lalr1.cc:617 +#line 785 "parser.tab.cpp" // lalr1.cc:616 break; case 75: // enum_value -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.enumValue); } -#line 813 "parser.tab.cpp" // lalr1.cc:617 +#line 792 "parser.tab.cpp" // lalr1.cc:616 break; case 76: // list_value -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.arrayValue); } -#line 820 "parser.tab.cpp" // lalr1.cc:617 +#line 799 "parser.tab.cpp" // lalr1.cc:616 break; case 77: // value_list -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.valueList); } -#line 827 "parser.tab.cpp" // lalr1.cc:617 +#line 806 "parser.tab.cpp" // lalr1.cc:616 break; case 78: // list_value_const -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.arrayValue); } -#line 834 "parser.tab.cpp" // lalr1.cc:617 +#line 813 "parser.tab.cpp" // lalr1.cc:616 break; case 79: // value_const_list -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.valueList); } -#line 841 "parser.tab.cpp" // lalr1.cc:617 +#line 820 "parser.tab.cpp" // lalr1.cc:616 break; case 80: // object_value -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.objectValue); } -#line 848 "parser.tab.cpp" // lalr1.cc:617 +#line 827 "parser.tab.cpp" // lalr1.cc:616 break; case 81: // object_field_list -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.objectFieldList); } -#line 855 "parser.tab.cpp" // lalr1.cc:617 +#line 834 "parser.tab.cpp" // lalr1.cc:616 break; case 82: // object_field -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.objectField); } -#line 862 "parser.tab.cpp" // lalr1.cc:617 +#line 841 "parser.tab.cpp" // lalr1.cc:616 break; case 83: // object_value_const -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.objectValue); } -#line 869 "parser.tab.cpp" // lalr1.cc:617 +#line 848 "parser.tab.cpp" // lalr1.cc:616 break; case 84: // object_field_const_list -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.objectFieldList); } -#line 876 "parser.tab.cpp" // lalr1.cc:617 +#line 855 "parser.tab.cpp" // lalr1.cc:616 break; case 85: // object_field_const -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.objectField); } -#line 883 "parser.tab.cpp" // lalr1.cc:617 +#line 862 "parser.tab.cpp" // lalr1.cc:616 break; case 86: // directives -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.directiveList); } -#line 890 "parser.tab.cpp" // lalr1.cc:617 +#line 869 "parser.tab.cpp" // lalr1.cc:616 break; case 87: // directives_opt -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.directiveList); } -#line 897 "parser.tab.cpp" // lalr1.cc:617 +#line 876 "parser.tab.cpp" // lalr1.cc:616 break; case 88: // directive_list -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.directiveList); } -#line 904 "parser.tab.cpp" // lalr1.cc:617 +#line 883 "parser.tab.cpp" // lalr1.cc:616 break; case 89: // directive -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.directive); } -#line 911 "parser.tab.cpp" // lalr1.cc:617 +#line 890 "parser.tab.cpp" // lalr1.cc:616 break; case 90: // type -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.type); } -#line 918 "parser.tab.cpp" // lalr1.cc:617 +#line 897 "parser.tab.cpp" // lalr1.cc:616 break; case 91: // type_name -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.namedType); } -#line 925 "parser.tab.cpp" // lalr1.cc:617 +#line 904 "parser.tab.cpp" // lalr1.cc:616 break; case 92: // list_type -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.listType); } -#line 932 "parser.tab.cpp" // lalr1.cc:617 +#line 911 "parser.tab.cpp" // lalr1.cc:616 break; case 93: // non_null_type -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.nonNullType); } -#line 939 "parser.tab.cpp" // lalr1.cc:617 +#line 918 "parser.tab.cpp" // lalr1.cc:616 break; case 94: // schema_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.schemaDefinition); } -#line 946 "parser.tab.cpp" // lalr1.cc:617 +#line 925 "parser.tab.cpp" // lalr1.cc:616 break; case 95: // operation_type_definition_list -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.operationTypeDefinitionList); } -#line 953 "parser.tab.cpp" // lalr1.cc:617 +#line 932 "parser.tab.cpp" // lalr1.cc:616 break; case 96: // operation_type_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.operationTypeDefinition); } -#line 960 "parser.tab.cpp" // lalr1.cc:617 +#line 939 "parser.tab.cpp" // lalr1.cc:616 break; case 97: // scalar_type_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.scalarTypeDefinition); } -#line 967 "parser.tab.cpp" // lalr1.cc:617 +#line 946 "parser.tab.cpp" // lalr1.cc:616 break; case 98: // object_type_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.objectTypeDefinition); } -#line 974 "parser.tab.cpp" // lalr1.cc:617 +#line 953 "parser.tab.cpp" // lalr1.cc:616 break; case 99: // implements_interfaces_opt -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.typeNameList); } -#line 981 "parser.tab.cpp" // lalr1.cc:617 +#line 960 "parser.tab.cpp" // lalr1.cc:616 break; case 100: // type_name_list -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.typeNameList); } -#line 988 "parser.tab.cpp" // lalr1.cc:617 +#line 967 "parser.tab.cpp" // lalr1.cc:616 break; case 101: // field_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.fieldDefinition); } -#line 995 "parser.tab.cpp" // lalr1.cc:617 +#line 974 "parser.tab.cpp" // lalr1.cc:616 break; case 102: // field_definition_list -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.fieldDefinitionList); } -#line 1002 "parser.tab.cpp" // lalr1.cc:617 +#line 981 "parser.tab.cpp" // lalr1.cc:616 break; case 103: // arguments_definition_opt -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.inputValueDefinitionList); } -#line 1009 "parser.tab.cpp" // lalr1.cc:617 +#line 988 "parser.tab.cpp" // lalr1.cc:616 break; case 104: // arguments_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.inputValueDefinitionList); } -#line 1016 "parser.tab.cpp" // lalr1.cc:617 +#line 995 "parser.tab.cpp" // lalr1.cc:616 break; case 105: // input_value_definition_list -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.inputValueDefinitionList); } -#line 1023 "parser.tab.cpp" // lalr1.cc:617 +#line 1002 "parser.tab.cpp" // lalr1.cc:616 break; case 106: // input_value_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.inputValueDefinition); } -#line 1030 "parser.tab.cpp" // lalr1.cc:617 +#line 1009 "parser.tab.cpp" // lalr1.cc:616 break; case 107: // interface_type_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.interfaceTypeDefinition); } -#line 1037 "parser.tab.cpp" // lalr1.cc:617 +#line 1016 "parser.tab.cpp" // lalr1.cc:616 break; case 108: // union_type_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.unionTypeDefinition); } -#line 1044 "parser.tab.cpp" // lalr1.cc:617 +#line 1023 "parser.tab.cpp" // lalr1.cc:616 break; case 109: // union_members -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.typeNameList); } -#line 1051 "parser.tab.cpp" // lalr1.cc:617 +#line 1030 "parser.tab.cpp" // lalr1.cc:616 break; case 110: // enum_type_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.enumTypeDefinition); } -#line 1058 "parser.tab.cpp" // lalr1.cc:617 +#line 1037 "parser.tab.cpp" // lalr1.cc:616 break; case 111: // enum_value_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.enumValueDefinition); } -#line 1065 "parser.tab.cpp" // lalr1.cc:617 +#line 1044 "parser.tab.cpp" // lalr1.cc:616 break; case 112: // enum_value_definition_list -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.enumValueDefinitionList); } -#line 1072 "parser.tab.cpp" // lalr1.cc:617 +#line 1051 "parser.tab.cpp" // lalr1.cc:616 break; case 113: // input_object_type_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.inputObjectTypeDefinition); } -#line 1079 "parser.tab.cpp" // lalr1.cc:617 +#line 1058 "parser.tab.cpp" // lalr1.cc:616 break; case 114: // type_extension_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.typeExtensionDefinition); } -#line 1086 "parser.tab.cpp" // lalr1.cc:617 +#line 1065 "parser.tab.cpp" // lalr1.cc:616 break; case 115: // directive_definition -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.directiveDefinition); } -#line 1093 "parser.tab.cpp" // lalr1.cc:617 +#line 1072 "parser.tab.cpp" // lalr1.cc:616 break; case 116: // directive_locations -#line 294 "parser.ypp" // lalr1.cc:617 +#line 292 "parser.ypp" // lalr1.cc:616 { delete (yysym.value.nameList); } -#line 1100 "parser.tab.cpp" // lalr1.cc:617 +#line 1079 "parser.tab.cpp" // lalr1.cc:616 break; @@ -1125,163 +1104,163 @@ namespace yy { { case 3: // "directive" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1131 "parser.tab.cpp" // lalr1.cc:636 +#line 1110 "parser.tab.cpp" // lalr1.cc:635 break; case 4: // "enum" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1138 "parser.tab.cpp" // lalr1.cc:636 +#line 1117 "parser.tab.cpp" // lalr1.cc:635 break; case 5: // "extend" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1145 "parser.tab.cpp" // lalr1.cc:636 +#line 1124 "parser.tab.cpp" // lalr1.cc:635 break; case 6: // "false" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1152 "parser.tab.cpp" // lalr1.cc:636 +#line 1131 "parser.tab.cpp" // lalr1.cc:635 break; case 7: // "fragment" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1159 "parser.tab.cpp" // lalr1.cc:636 +#line 1138 "parser.tab.cpp" // lalr1.cc:635 break; case 8: // "implements" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1166 "parser.tab.cpp" // lalr1.cc:636 +#line 1145 "parser.tab.cpp" // lalr1.cc:635 break; case 9: // "input" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1173 "parser.tab.cpp" // lalr1.cc:636 +#line 1152 "parser.tab.cpp" // lalr1.cc:635 break; case 10: // "interface" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1180 "parser.tab.cpp" // lalr1.cc:636 +#line 1159 "parser.tab.cpp" // lalr1.cc:635 break; case 11: // "mutation" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1187 "parser.tab.cpp" // lalr1.cc:636 +#line 1166 "parser.tab.cpp" // lalr1.cc:635 break; case 12: // "null" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1194 "parser.tab.cpp" // lalr1.cc:636 +#line 1173 "parser.tab.cpp" // lalr1.cc:635 break; case 13: // "query" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1201 "parser.tab.cpp" // lalr1.cc:636 +#line 1180 "parser.tab.cpp" // lalr1.cc:635 break; case 14: // "on" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1208 "parser.tab.cpp" // lalr1.cc:636 +#line 1187 "parser.tab.cpp" // lalr1.cc:635 break; case 15: // "scalar" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1215 "parser.tab.cpp" // lalr1.cc:636 +#line 1194 "parser.tab.cpp" // lalr1.cc:635 break; case 16: // "schema" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1222 "parser.tab.cpp" // lalr1.cc:636 +#line 1201 "parser.tab.cpp" // lalr1.cc:635 break; case 17: // "subscription" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1229 "parser.tab.cpp" // lalr1.cc:636 +#line 1208 "parser.tab.cpp" // lalr1.cc:635 break; case 18: // "true" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1236 "parser.tab.cpp" // lalr1.cc:636 +#line 1215 "parser.tab.cpp" // lalr1.cc:635 break; case 19: // "type" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1243 "parser.tab.cpp" // lalr1.cc:636 +#line 1222 "parser.tab.cpp" // lalr1.cc:635 break; case 20: // "union" -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1250 "parser.tab.cpp" // lalr1.cc:636 +#line 1229 "parser.tab.cpp" // lalr1.cc:635 break; case 33: // VARIABLE -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1257 "parser.tab.cpp" // lalr1.cc:636 +#line 1236 "parser.tab.cpp" // lalr1.cc:635 break; case 34: // INTEGER -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1264 "parser.tab.cpp" // lalr1.cc:636 +#line 1243 "parser.tab.cpp" // lalr1.cc:635 break; case 35: // FLOAT -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1271 "parser.tab.cpp" // lalr1.cc:636 +#line 1250 "parser.tab.cpp" // lalr1.cc:635 break; case 36: // STRING -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1278 "parser.tab.cpp" // lalr1.cc:636 +#line 1257 "parser.tab.cpp" // lalr1.cc:635 break; case 37: // IDENTIFIER -#line 296 "parser.ypp" // lalr1.cc:636 +#line 294 "parser.ypp" // lalr1.cc:635 { yyoutput << (yysym.value.str); } -#line 1285 "parser.tab.cpp" // lalr1.cc:636 +#line 1264 "parser.tab.cpp" // lalr1.cc:635 break; @@ -1292,7 +1271,6 @@ namespace yy { } #endif - inline void GraphQLParserImpl::yypush_ (const char* m, state_type s, symbol_type& sym) { @@ -1300,7 +1278,6 @@ namespace yy { yypush_ (m, t); } - inline void GraphQLParserImpl::yypush_ (const char* m, stack_symbol_type& s) { @@ -1309,9 +1286,8 @@ namespace yy { yystack_.push (s); } - inline void - GraphQLParserImpl::yypop_ (unsigned int n) + GraphQLParserImpl::yypop_ (unsigned n) { yystack_.pop (n); } @@ -1343,7 +1319,7 @@ namespace yy { } #endif // YYDEBUG - inline GraphQLParserImpl::state_type + GraphQLParserImpl::state_type GraphQLParserImpl::yy_lr_goto_state_ (state_type yystate, int yysym) { int yyr = yypgoto_[yysym - yyntokens_] + yystate; @@ -1353,13 +1329,13 @@ namespace yy { return yydefgoto_[yysym - yyntokens_]; } - inline bool + bool GraphQLParserImpl::yy_pact_value_is_default_ (int yyvalue) { return yyvalue == yypact_ninf_; } - inline bool + bool GraphQLParserImpl::yy_table_value_is_error_ (int yyvalue) { return yyvalue == yytable_ninf_; @@ -1390,7 +1366,7 @@ namespace yy { // avoid gratuitous conflicts when merging into the master branch. try { - YYCDEBUG << "Starting parse" << std::endl; + YYCDEBUG << "Starting parse\n"; /* Initialize the stack. The initial state will be set in @@ -1402,7 +1378,7 @@ namespace yy { // A new symbol was pushed on the stack. yynewstate: - YYCDEBUG << "Entering state " << yystack_[0].state << std::endl; + YYCDEBUG << "Entering state " << yystack_[0].state << '\n'; // Accept? if (yystack_[0].state == yyfinal_) @@ -1474,7 +1450,7 @@ namespace yy { yylen = yyr2_[yyn]; { stack_symbol_type yylhs; - yylhs.state = yy_lr_goto_state_(yystack_[yylen].state, yyr1_[yyn]); + yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]); /* If YYLEN is nonzero, implement the default value of the action: '$$ = $1'. Otherwise, use the top of the stack. @@ -1486,10 +1462,11 @@ namespace yy { else yylhs.value = yystack_[0].value; - // Compute the default @$. + // Default location. { slice slice (yystack_, yylen); YYLLOC_DEFAULT (yylhs.location, slice, yylen); + yyerror_range[1].location = yylhs.location; } // Perform the reduction. @@ -1499,163 +1476,163 @@ namespace yy { switch (yyn) { case 2: -#line 300 "parser.ypp" // lalr1.cc:859 +#line 298 "parser.ypp" // lalr1.cc:856 { *outAST = (yystack_[0].value.document); } -#line 1505 "parser.tab.cpp" // lalr1.cc:859 +#line 1482 "parser.tab.cpp" // lalr1.cc:856 break; case 3: -#line 305 "parser.ypp" // lalr1.cc:859 +#line 303 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1511 "parser.tab.cpp" // lalr1.cc:859 +#line 1488 "parser.tab.cpp" // lalr1.cc:856 break; case 4: -#line 306 "parser.ypp" // lalr1.cc:859 +#line 304 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1517 "parser.tab.cpp" // lalr1.cc:859 +#line 1494 "parser.tab.cpp" // lalr1.cc:856 break; case 5: -#line 307 "parser.ypp" // lalr1.cc:859 +#line 305 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1523 "parser.tab.cpp" // lalr1.cc:859 +#line 1500 "parser.tab.cpp" // lalr1.cc:856 break; case 6: -#line 308 "parser.ypp" // lalr1.cc:859 +#line 306 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1529 "parser.tab.cpp" // lalr1.cc:859 +#line 1506 "parser.tab.cpp" // lalr1.cc:856 break; case 7: -#line 309 "parser.ypp" // lalr1.cc:859 +#line 307 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1535 "parser.tab.cpp" // lalr1.cc:859 +#line 1512 "parser.tab.cpp" // lalr1.cc:856 break; case 8: -#line 310 "parser.ypp" // lalr1.cc:859 +#line 308 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1541 "parser.tab.cpp" // lalr1.cc:859 +#line 1518 "parser.tab.cpp" // lalr1.cc:856 break; case 9: -#line 311 "parser.ypp" // lalr1.cc:859 +#line 309 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1547 "parser.tab.cpp" // lalr1.cc:859 +#line 1524 "parser.tab.cpp" // lalr1.cc:856 break; case 10: -#line 312 "parser.ypp" // lalr1.cc:859 +#line 310 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1553 "parser.tab.cpp" // lalr1.cc:859 +#line 1530 "parser.tab.cpp" // lalr1.cc:856 break; case 11: -#line 313 "parser.ypp" // lalr1.cc:859 +#line 311 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1559 "parser.tab.cpp" // lalr1.cc:859 +#line 1536 "parser.tab.cpp" // lalr1.cc:856 break; case 12: -#line 314 "parser.ypp" // lalr1.cc:859 +#line 312 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1565 "parser.tab.cpp" // lalr1.cc:859 +#line 1542 "parser.tab.cpp" // lalr1.cc:856 break; case 13: -#line 315 "parser.ypp" // lalr1.cc:859 +#line 313 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1571 "parser.tab.cpp" // lalr1.cc:859 +#line 1548 "parser.tab.cpp" // lalr1.cc:856 break; case 14: -#line 316 "parser.ypp" // lalr1.cc:859 +#line 314 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1577 "parser.tab.cpp" // lalr1.cc:859 +#line 1554 "parser.tab.cpp" // lalr1.cc:856 break; case 15: -#line 317 "parser.ypp" // lalr1.cc:859 +#line 315 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1583 "parser.tab.cpp" // lalr1.cc:859 +#line 1560 "parser.tab.cpp" // lalr1.cc:856 break; case 16: -#line 318 "parser.ypp" // lalr1.cc:859 +#line 316 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1589 "parser.tab.cpp" // lalr1.cc:859 +#line 1566 "parser.tab.cpp" // lalr1.cc:856 break; case 17: -#line 319 "parser.ypp" // lalr1.cc:859 +#line 317 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1595 "parser.tab.cpp" // lalr1.cc:859 +#line 1572 "parser.tab.cpp" // lalr1.cc:856 break; case 18: -#line 320 "parser.ypp" // lalr1.cc:859 +#line 318 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1601 "parser.tab.cpp" // lalr1.cc:859 +#line 1578 "parser.tab.cpp" // lalr1.cc:856 break; case 19: -#line 321 "parser.ypp" // lalr1.cc:859 +#line 319 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1607 "parser.tab.cpp" // lalr1.cc:859 +#line 1584 "parser.tab.cpp" // lalr1.cc:856 break; case 20: -#line 322 "parser.ypp" // lalr1.cc:859 +#line 320 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1613 "parser.tab.cpp" // lalr1.cc:859 +#line 1590 "parser.tab.cpp" // lalr1.cc:856 break; case 22: -#line 326 "parser.ypp" // lalr1.cc:859 +#line 324 "parser.ypp" // lalr1.cc:856 { (yylhs.value.name) = new Name(yystack_[0].location, strdup((yystack_[0].value.str))); } -#line 1619 "parser.tab.cpp" // lalr1.cc:859 +#line 1596 "parser.tab.cpp" // lalr1.cc:856 break; case 23: -#line 330 "parser.ypp" // lalr1.cc:859 +#line 328 "parser.ypp" // lalr1.cc:856 {(yylhs.value.name) = nullptr;} -#line 1625 "parser.tab.cpp" // lalr1.cc:859 +#line 1602 "parser.tab.cpp" // lalr1.cc:856 break; case 25: -#line 336 "parser.ypp" // lalr1.cc:859 +#line 334 "parser.ypp" // lalr1.cc:856 { (yylhs.value.document) = new Document(yylhs.location, (yystack_[0].value.definitionList)); } -#line 1631 "parser.tab.cpp" // lalr1.cc:859 +#line 1608 "parser.tab.cpp" // lalr1.cc:856 break; case 26: -#line 339 "parser.ypp" // lalr1.cc:859 +#line 337 "parser.ypp" // lalr1.cc:856 { (yylhs.value.definitionList) = new std::vector>(); (yylhs.value.definitionList)->emplace_back((yystack_[0].value.definition)); } -#line 1637 "parser.tab.cpp" // lalr1.cc:859 +#line 1614 "parser.tab.cpp" // lalr1.cc:856 break; case 27: -#line 340 "parser.ypp" // lalr1.cc:859 +#line 338 "parser.ypp" // lalr1.cc:856 { (yystack_[1].value.definitionList)->emplace_back((yystack_[0].value.definition)); (yylhs.value.definitionList) = (yystack_[1].value.definitionList); } -#line 1643 "parser.tab.cpp" // lalr1.cc:859 +#line 1620 "parser.tab.cpp" // lalr1.cc:856 break; case 28: -#line 343 "parser.ypp" // lalr1.cc:859 +#line 341 "parser.ypp" // lalr1.cc:856 { (yylhs.value.definition) = static_cast((yystack_[0].value.operationDefinition)); } -#line 1649 "parser.tab.cpp" // lalr1.cc:859 +#line 1626 "parser.tab.cpp" // lalr1.cc:856 break; case 29: -#line 344 "parser.ypp" // lalr1.cc:859 +#line 342 "parser.ypp" // lalr1.cc:856 { (yylhs.value.definition) = static_cast((yystack_[0].value.fragmentDefinition)); } -#line 1655 "parser.tab.cpp" // lalr1.cc:859 +#line 1632 "parser.tab.cpp" // lalr1.cc:856 break; case 30: -#line 345 "parser.ypp" // lalr1.cc:859 +#line 343 "parser.ypp" // lalr1.cc:856 { if (!enableSchema) { error(yylhs.location, "schema support disabled"); @@ -1666,869 +1643,869 @@ namespace yy { } (yylhs.value.definition) = static_cast((yystack_[0].value.definition)); } -#line 1670 "parser.tab.cpp" // lalr1.cc:859 +#line 1647 "parser.tab.cpp" // lalr1.cc:856 break; case 31: -#line 357 "parser.ypp" // lalr1.cc:859 +#line 355 "parser.ypp" // lalr1.cc:856 { (yylhs.value.definition) = static_cast((yystack_[0].value.schemaDefinition)); } -#line 1676 "parser.tab.cpp" // lalr1.cc:859 +#line 1653 "parser.tab.cpp" // lalr1.cc:856 break; case 32: -#line 358 "parser.ypp" // lalr1.cc:859 +#line 356 "parser.ypp" // lalr1.cc:856 { (yylhs.value.definition) = static_cast((yystack_[0].value.scalarTypeDefinition)); } -#line 1682 "parser.tab.cpp" // lalr1.cc:859 +#line 1659 "parser.tab.cpp" // lalr1.cc:856 break; case 33: -#line 359 "parser.ypp" // lalr1.cc:859 +#line 357 "parser.ypp" // lalr1.cc:856 { (yylhs.value.definition) = static_cast((yystack_[0].value.objectTypeDefinition)); } -#line 1688 "parser.tab.cpp" // lalr1.cc:859 +#line 1665 "parser.tab.cpp" // lalr1.cc:856 break; case 34: -#line 360 "parser.ypp" // lalr1.cc:859 +#line 358 "parser.ypp" // lalr1.cc:856 { (yylhs.value.definition) = static_cast((yystack_[0].value.interfaceTypeDefinition)); } -#line 1694 "parser.tab.cpp" // lalr1.cc:859 +#line 1671 "parser.tab.cpp" // lalr1.cc:856 break; case 35: -#line 361 "parser.ypp" // lalr1.cc:859 +#line 359 "parser.ypp" // lalr1.cc:856 { (yylhs.value.definition) = static_cast((yystack_[0].value.unionTypeDefinition)); } -#line 1700 "parser.tab.cpp" // lalr1.cc:859 +#line 1677 "parser.tab.cpp" // lalr1.cc:856 break; case 36: -#line 362 "parser.ypp" // lalr1.cc:859 +#line 360 "parser.ypp" // lalr1.cc:856 { (yylhs.value.definition) = static_cast((yystack_[0].value.enumTypeDefinition)); } -#line 1706 "parser.tab.cpp" // lalr1.cc:859 +#line 1683 "parser.tab.cpp" // lalr1.cc:856 break; case 37: -#line 363 "parser.ypp" // lalr1.cc:859 +#line 361 "parser.ypp" // lalr1.cc:856 { (yylhs.value.definition) = static_cast((yystack_[0].value.inputObjectTypeDefinition)); } -#line 1712 "parser.tab.cpp" // lalr1.cc:859 +#line 1689 "parser.tab.cpp" // lalr1.cc:856 break; case 38: -#line 364 "parser.ypp" // lalr1.cc:859 +#line 362 "parser.ypp" // lalr1.cc:856 { (yylhs.value.definition) = static_cast((yystack_[0].value.typeExtensionDefinition)); } -#line 1718 "parser.tab.cpp" // lalr1.cc:859 +#line 1695 "parser.tab.cpp" // lalr1.cc:856 break; case 39: -#line 365 "parser.ypp" // lalr1.cc:859 +#line 363 "parser.ypp" // lalr1.cc:856 { (yylhs.value.definition) = static_cast((yystack_[0].value.directiveDefinition)); } -#line 1724 "parser.tab.cpp" // lalr1.cc:859 +#line 1701 "parser.tab.cpp" // lalr1.cc:856 break; case 40: -#line 371 "parser.ypp" // lalr1.cc:859 +#line 369 "parser.ypp" // lalr1.cc:856 { (yylhs.value.operationDefinition) = new OperationDefinition(yylhs.location, strdup("query"), nullptr, nullptr, nullptr, (yystack_[0].value.selectionSet)); } -#line 1730 "parser.tab.cpp" // lalr1.cc:859 +#line 1707 "parser.tab.cpp" // lalr1.cc:856 break; case 41: -#line 372 "parser.ypp" // lalr1.cc:859 +#line 370 "parser.ypp" // lalr1.cc:856 { (yylhs.value.operationDefinition) = new OperationDefinition(yylhs.location, (yystack_[2].value.heapStr), (yystack_[1].value.name), nullptr, nullptr, (yystack_[0].value.selectionSet)); } -#line 1736 "parser.tab.cpp" // lalr1.cc:859 +#line 1713 "parser.tab.cpp" // lalr1.cc:856 break; case 42: -#line 373 "parser.ypp" // lalr1.cc:859 +#line 371 "parser.ypp" // lalr1.cc:856 { (yylhs.value.operationDefinition) = new OperationDefinition(yylhs.location, (yystack_[3].value.heapStr), (yystack_[2].value.name), (yystack_[1].value.variableDefinitionList), nullptr, (yystack_[0].value.selectionSet)); } -#line 1742 "parser.tab.cpp" // lalr1.cc:859 +#line 1719 "parser.tab.cpp" // lalr1.cc:856 break; case 43: -#line 374 "parser.ypp" // lalr1.cc:859 +#line 372 "parser.ypp" // lalr1.cc:856 { (yylhs.value.operationDefinition) = new OperationDefinition(yylhs.location, (yystack_[3].value.heapStr), (yystack_[2].value.name), nullptr, (yystack_[1].value.directiveList), (yystack_[0].value.selectionSet)); } -#line 1748 "parser.tab.cpp" // lalr1.cc:859 +#line 1725 "parser.tab.cpp" // lalr1.cc:856 break; case 44: -#line 375 "parser.ypp" // lalr1.cc:859 +#line 373 "parser.ypp" // lalr1.cc:856 { (yylhs.value.operationDefinition) = new OperationDefinition(yylhs.location, (yystack_[4].value.heapStr), (yystack_[3].value.name), (yystack_[2].value.variableDefinitionList), (yystack_[1].value.directiveList), (yystack_[0].value.selectionSet)); } -#line 1754 "parser.tab.cpp" // lalr1.cc:859 +#line 1731 "parser.tab.cpp" // lalr1.cc:856 break; case 45: -#line 378 "parser.ypp" // lalr1.cc:859 +#line 376 "parser.ypp" // lalr1.cc:856 { (yylhs.value.heapStr) = strdup((yystack_[0].value.str)); } -#line 1760 "parser.tab.cpp" // lalr1.cc:859 +#line 1737 "parser.tab.cpp" // lalr1.cc:856 break; case 46: -#line 379 "parser.ypp" // lalr1.cc:859 +#line 377 "parser.ypp" // lalr1.cc:856 { (yylhs.value.heapStr) = strdup((yystack_[0].value.str)); } -#line 1766 "parser.tab.cpp" // lalr1.cc:859 +#line 1743 "parser.tab.cpp" // lalr1.cc:856 break; case 47: -#line 380 "parser.ypp" // lalr1.cc:859 +#line 378 "parser.ypp" // lalr1.cc:856 { (yylhs.value.heapStr) = strdup((yystack_[0].value.str)); } -#line 1772 "parser.tab.cpp" // lalr1.cc:859 +#line 1749 "parser.tab.cpp" // lalr1.cc:856 break; case 48: -#line 384 "parser.ypp" // lalr1.cc:859 +#line 382 "parser.ypp" // lalr1.cc:856 { (yylhs.value.variableDefinitionList) = (yystack_[1].value.variableDefinitionList); } -#line 1778 "parser.tab.cpp" // lalr1.cc:859 +#line 1755 "parser.tab.cpp" // lalr1.cc:856 break; case 49: -#line 388 "parser.ypp" // lalr1.cc:859 +#line 386 "parser.ypp" // lalr1.cc:856 { (yylhs.value.variableDefinitionList) = new std::vector>(); (yylhs.value.variableDefinitionList)->emplace_back((yystack_[0].value.variableDefinition)); } -#line 1784 "parser.tab.cpp" // lalr1.cc:859 +#line 1761 "parser.tab.cpp" // lalr1.cc:856 break; case 50: -#line 389 "parser.ypp" // lalr1.cc:859 +#line 387 "parser.ypp" // lalr1.cc:856 { (yystack_[1].value.variableDefinitionList)->emplace_back((yystack_[0].value.variableDefinition)); (yylhs.value.variableDefinitionList) = (yystack_[1].value.variableDefinitionList); } -#line 1790 "parser.tab.cpp" // lalr1.cc:859 +#line 1767 "parser.tab.cpp" // lalr1.cc:856 break; case 51: -#line 392 "parser.ypp" // lalr1.cc:859 +#line 390 "parser.ypp" // lalr1.cc:856 { (yylhs.value.variable) = new Variable(yylhs.location, new Name(yystack_[0].location, strdup((yystack_[0].value.str)))); } -#line 1796 "parser.tab.cpp" // lalr1.cc:859 +#line 1773 "parser.tab.cpp" // lalr1.cc:856 break; case 52: -#line 396 "parser.ypp" // lalr1.cc:859 +#line 394 "parser.ypp" // lalr1.cc:856 { (yylhs.value.variableDefinition) = new VariableDefinition(yylhs.location, (yystack_[3].value.variable), (yystack_[1].value.type), (yystack_[0].value.value)); } -#line 1802 "parser.tab.cpp" // lalr1.cc:859 +#line 1779 "parser.tab.cpp" // lalr1.cc:856 break; case 53: -#line 400 "parser.ypp" // lalr1.cc:859 +#line 398 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = nullptr; } -#line 1808 "parser.tab.cpp" // lalr1.cc:859 +#line 1785 "parser.tab.cpp" // lalr1.cc:856 break; case 55: -#line 404 "parser.ypp" // lalr1.cc:859 +#line 402 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = (yystack_[0].value.value); } -#line 1814 "parser.tab.cpp" // lalr1.cc:859 +#line 1791 "parser.tab.cpp" // lalr1.cc:856 break; case 56: -#line 408 "parser.ypp" // lalr1.cc:859 +#line 406 "parser.ypp" // lalr1.cc:856 { (yylhs.value.selectionSet) = new SelectionSet(yylhs.location, (yystack_[1].value.selectionList)); } -#line 1820 "parser.tab.cpp" // lalr1.cc:859 +#line 1797 "parser.tab.cpp" // lalr1.cc:856 break; case 57: -#line 412 "parser.ypp" // lalr1.cc:859 +#line 410 "parser.ypp" // lalr1.cc:856 { (yylhs.value.selectionSet) = nullptr; } -#line 1826 "parser.tab.cpp" // lalr1.cc:859 +#line 1803 "parser.tab.cpp" // lalr1.cc:856 break; case 59: -#line 415 "parser.ypp" // lalr1.cc:859 +#line 413 "parser.ypp" // lalr1.cc:856 { (yylhs.value.selectionList) = new std::vector>(); (yylhs.value.selectionList)->emplace_back((yystack_[0].value.selection)); } -#line 1832 "parser.tab.cpp" // lalr1.cc:859 +#line 1809 "parser.tab.cpp" // lalr1.cc:856 break; case 60: -#line 416 "parser.ypp" // lalr1.cc:859 +#line 414 "parser.ypp" // lalr1.cc:856 { (yystack_[1].value.selectionList)->emplace_back((yystack_[0].value.selection)); (yylhs.value.selectionList) = (yystack_[1].value.selectionList); } -#line 1838 "parser.tab.cpp" // lalr1.cc:859 +#line 1815 "parser.tab.cpp" // lalr1.cc:856 break; case 61: -#line 419 "parser.ypp" // lalr1.cc:859 +#line 417 "parser.ypp" // lalr1.cc:856 { (yylhs.value.selection) = static_cast((yystack_[0].value.field)); } -#line 1844 "parser.tab.cpp" // lalr1.cc:859 +#line 1821 "parser.tab.cpp" // lalr1.cc:856 break; case 62: -#line 420 "parser.ypp" // lalr1.cc:859 +#line 418 "parser.ypp" // lalr1.cc:856 { (yylhs.value.selection) = static_cast((yystack_[0].value.fragmentSpread)); } -#line 1850 "parser.tab.cpp" // lalr1.cc:859 +#line 1827 "parser.tab.cpp" // lalr1.cc:856 break; case 63: -#line 421 "parser.ypp" // lalr1.cc:859 +#line 419 "parser.ypp" // lalr1.cc:856 { (yylhs.value.selection) = static_cast((yystack_[0].value.inlineFragment)); } -#line 1856 "parser.tab.cpp" // lalr1.cc:859 +#line 1833 "parser.tab.cpp" // lalr1.cc:856 break; case 64: -#line 424 "parser.ypp" // lalr1.cc:859 +#line 422 "parser.ypp" // lalr1.cc:856 { (yylhs.value.field) = new Field(yylhs.location, nullptr, (yystack_[3].value.name), (yystack_[2].value.argumentList), (yystack_[1].value.directiveList), (yystack_[0].value.selectionSet)); } -#line 1862 "parser.tab.cpp" // lalr1.cc:859 +#line 1839 "parser.tab.cpp" // lalr1.cc:856 break; case 65: -#line 425 "parser.ypp" // lalr1.cc:859 +#line 423 "parser.ypp" // lalr1.cc:856 { (yylhs.value.field) = new Field(yylhs.location, (yystack_[5].value.name), (yystack_[3].value.name), (yystack_[2].value.argumentList), (yystack_[1].value.directiveList), (yystack_[0].value.selectionSet)); } -#line 1868 "parser.tab.cpp" // lalr1.cc:859 +#line 1845 "parser.tab.cpp" // lalr1.cc:856 break; case 66: -#line 428 "parser.ypp" // lalr1.cc:859 +#line 426 "parser.ypp" // lalr1.cc:856 { (yylhs.value.argumentList) = (yystack_[1].value.argumentList); } -#line 1874 "parser.tab.cpp" // lalr1.cc:859 +#line 1851 "parser.tab.cpp" // lalr1.cc:856 break; case 67: -#line 431 "parser.ypp" // lalr1.cc:859 +#line 429 "parser.ypp" // lalr1.cc:856 { (yylhs.value.argumentList) = nullptr; } -#line 1880 "parser.tab.cpp" // lalr1.cc:859 +#line 1857 "parser.tab.cpp" // lalr1.cc:856 break; case 68: -#line 432 "parser.ypp" // lalr1.cc:859 +#line 430 "parser.ypp" // lalr1.cc:856 { (yylhs.value.argumentList) = (yystack_[0].value.argumentList); } -#line 1886 "parser.tab.cpp" // lalr1.cc:859 +#line 1863 "parser.tab.cpp" // lalr1.cc:856 break; case 69: -#line 435 "parser.ypp" // lalr1.cc:859 +#line 433 "parser.ypp" // lalr1.cc:856 { (yylhs.value.argumentList) = new std::vector>(); (yylhs.value.argumentList)->emplace_back((yystack_[0].value.argument)); } -#line 1892 "parser.tab.cpp" // lalr1.cc:859 +#line 1869 "parser.tab.cpp" // lalr1.cc:856 break; case 70: -#line 436 "parser.ypp" // lalr1.cc:859 +#line 434 "parser.ypp" // lalr1.cc:856 { (yystack_[1].value.argumentList)->emplace_back((yystack_[0].value.argument)); (yylhs.value.argumentList) = (yystack_[1].value.argumentList); } -#line 1898 "parser.tab.cpp" // lalr1.cc:859 +#line 1875 "parser.tab.cpp" // lalr1.cc:856 break; case 71: -#line 439 "parser.ypp" // lalr1.cc:859 +#line 437 "parser.ypp" // lalr1.cc:856 { (yylhs.value.argument) = new Argument(yylhs.location, (yystack_[2].value.name), (yystack_[0].value.value)); } -#line 1904 "parser.tab.cpp" // lalr1.cc:859 +#line 1881 "parser.tab.cpp" // lalr1.cc:856 break; case 72: -#line 444 "parser.ypp" // lalr1.cc:859 +#line 442 "parser.ypp" // lalr1.cc:856 { (yylhs.value.fragmentSpread) = new FragmentSpread(yylhs.location, (yystack_[1].value.name), (yystack_[0].value.directiveList)); } -#line 1910 "parser.tab.cpp" // lalr1.cc:859 +#line 1887 "parser.tab.cpp" // lalr1.cc:856 break; case 73: -#line 448 "parser.ypp" // lalr1.cc:859 +#line 446 "parser.ypp" // lalr1.cc:856 { (yylhs.value.inlineFragment) = new InlineFragment(yylhs.location, (yystack_[2].value.namedType), (yystack_[1].value.directiveList), (yystack_[0].value.selectionSet)); } -#line 1916 "parser.tab.cpp" // lalr1.cc:859 +#line 1893 "parser.tab.cpp" // lalr1.cc:856 break; case 74: -#line 449 "parser.ypp" // lalr1.cc:859 +#line 447 "parser.ypp" // lalr1.cc:856 { (yylhs.value.inlineFragment) = new InlineFragment(yylhs.location, nullptr, (yystack_[1].value.directiveList), (yystack_[0].value.selectionSet)); } -#line 1922 "parser.tab.cpp" // lalr1.cc:859 +#line 1899 "parser.tab.cpp" // lalr1.cc:856 break; case 75: -#line 453 "parser.ypp" // lalr1.cc:859 +#line 451 "parser.ypp" // lalr1.cc:856 { (yylhs.value.fragmentDefinition) = new FragmentDefinition(yylhs.location, (yystack_[4].value.name), (yystack_[2].value.namedType), (yystack_[1].value.directiveList), (yystack_[0].value.selectionSet)); } -#line 1928 "parser.tab.cpp" // lalr1.cc:859 +#line 1905 "parser.tab.cpp" // lalr1.cc:856 break; case 77: -#line 460 "parser.ypp" // lalr1.cc:859 +#line 458 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.variable)); } -#line 1934 "parser.tab.cpp" // lalr1.cc:859 +#line 1911 "parser.tab.cpp" // lalr1.cc:856 break; case 78: -#line 461 "parser.ypp" // lalr1.cc:859 +#line 459 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.intValue)); } -#line 1940 "parser.tab.cpp" // lalr1.cc:859 +#line 1917 "parser.tab.cpp" // lalr1.cc:856 break; case 79: -#line 462 "parser.ypp" // lalr1.cc:859 +#line 460 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.floatValue)); } -#line 1946 "parser.tab.cpp" // lalr1.cc:859 +#line 1923 "parser.tab.cpp" // lalr1.cc:856 break; case 80: -#line 463 "parser.ypp" // lalr1.cc:859 +#line 461 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.stringValue)); } -#line 1952 "parser.tab.cpp" // lalr1.cc:859 +#line 1929 "parser.tab.cpp" // lalr1.cc:856 break; case 81: -#line 464 "parser.ypp" // lalr1.cc:859 +#line 462 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.booleanValue)); } -#line 1958 "parser.tab.cpp" // lalr1.cc:859 +#line 1935 "parser.tab.cpp" // lalr1.cc:856 break; case 82: -#line 465 "parser.ypp" // lalr1.cc:859 +#line 463 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.nullValue)); } -#line 1964 "parser.tab.cpp" // lalr1.cc:859 +#line 1941 "parser.tab.cpp" // lalr1.cc:856 break; case 83: -#line 466 "parser.ypp" // lalr1.cc:859 +#line 464 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.enumValue)); } -#line 1970 "parser.tab.cpp" // lalr1.cc:859 +#line 1947 "parser.tab.cpp" // lalr1.cc:856 break; case 84: -#line 467 "parser.ypp" // lalr1.cc:859 +#line 465 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.arrayValue)); } -#line 1976 "parser.tab.cpp" // lalr1.cc:859 +#line 1953 "parser.tab.cpp" // lalr1.cc:856 break; case 85: -#line 468 "parser.ypp" // lalr1.cc:859 +#line 466 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.objectValue)); } -#line 1982 "parser.tab.cpp" // lalr1.cc:859 +#line 1959 "parser.tab.cpp" // lalr1.cc:856 break; case 86: -#line 471 "parser.ypp" // lalr1.cc:859 +#line 469 "parser.ypp" // lalr1.cc:856 { (yylhs.value.intValue) = new IntValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 1988 "parser.tab.cpp" // lalr1.cc:859 +#line 1965 "parser.tab.cpp" // lalr1.cc:856 break; case 87: -#line 474 "parser.ypp" // lalr1.cc:859 +#line 472 "parser.ypp" // lalr1.cc:856 { (yylhs.value.floatValue) = new FloatValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 1994 "parser.tab.cpp" // lalr1.cc:859 +#line 1971 "parser.tab.cpp" // lalr1.cc:856 break; case 88: -#line 477 "parser.ypp" // lalr1.cc:859 +#line 475 "parser.ypp" // lalr1.cc:856 { (yylhs.value.stringValue) = new StringValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2000 "parser.tab.cpp" // lalr1.cc:859 +#line 1977 "parser.tab.cpp" // lalr1.cc:856 break; case 89: -#line 480 "parser.ypp" // lalr1.cc:859 +#line 478 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.intValue)); } -#line 2006 "parser.tab.cpp" // lalr1.cc:859 +#line 1983 "parser.tab.cpp" // lalr1.cc:856 break; case 90: -#line 481 "parser.ypp" // lalr1.cc:859 +#line 479 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.floatValue)); } -#line 2012 "parser.tab.cpp" // lalr1.cc:859 +#line 1989 "parser.tab.cpp" // lalr1.cc:856 break; case 91: -#line 482 "parser.ypp" // lalr1.cc:859 +#line 480 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.stringValue)); } -#line 2018 "parser.tab.cpp" // lalr1.cc:859 +#line 1995 "parser.tab.cpp" // lalr1.cc:856 break; case 92: -#line 483 "parser.ypp" // lalr1.cc:859 +#line 481 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.booleanValue)); } -#line 2024 "parser.tab.cpp" // lalr1.cc:859 +#line 2001 "parser.tab.cpp" // lalr1.cc:856 break; case 93: -#line 484 "parser.ypp" // lalr1.cc:859 +#line 482 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.nullValue)); } -#line 2030 "parser.tab.cpp" // lalr1.cc:859 +#line 2007 "parser.tab.cpp" // lalr1.cc:856 break; case 94: -#line 485 "parser.ypp" // lalr1.cc:859 +#line 483 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.enumValue)); } -#line 2036 "parser.tab.cpp" // lalr1.cc:859 +#line 2013 "parser.tab.cpp" // lalr1.cc:856 break; case 95: -#line 486 "parser.ypp" // lalr1.cc:859 +#line 484 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.arrayValue)); } -#line 2042 "parser.tab.cpp" // lalr1.cc:859 +#line 2019 "parser.tab.cpp" // lalr1.cc:856 break; case 96: -#line 487 "parser.ypp" // lalr1.cc:859 +#line 485 "parser.ypp" // lalr1.cc:856 { (yylhs.value.value) = static_cast((yystack_[0].value.objectValue)); } -#line 2048 "parser.tab.cpp" // lalr1.cc:859 +#line 2025 "parser.tab.cpp" // lalr1.cc:856 break; case 97: -#line 490 "parser.ypp" // lalr1.cc:859 +#line 488 "parser.ypp" // lalr1.cc:856 { (yylhs.value.booleanValue) = new BooleanValue(yylhs.location, true); } -#line 2054 "parser.tab.cpp" // lalr1.cc:859 +#line 2031 "parser.tab.cpp" // lalr1.cc:856 break; case 98: -#line 491 "parser.ypp" // lalr1.cc:859 +#line 489 "parser.ypp" // lalr1.cc:856 { (yylhs.value.booleanValue) = new BooleanValue(yylhs.location, false); } -#line 2060 "parser.tab.cpp" // lalr1.cc:859 +#line 2037 "parser.tab.cpp" // lalr1.cc:856 break; case 99: -#line 494 "parser.ypp" // lalr1.cc:859 +#line 492 "parser.ypp" // lalr1.cc:856 { (yylhs.value.nullValue) = new NullValue(yylhs.location); } -#line 2066 "parser.tab.cpp" // lalr1.cc:859 +#line 2043 "parser.tab.cpp" // lalr1.cc:856 break; case 100: -#line 497 "parser.ypp" // lalr1.cc:859 +#line 495 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2072 "parser.tab.cpp" // lalr1.cc:859 +#line 2049 "parser.tab.cpp" // lalr1.cc:856 break; case 101: -#line 498 "parser.ypp" // lalr1.cc:859 +#line 496 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2078 "parser.tab.cpp" // lalr1.cc:859 +#line 2055 "parser.tab.cpp" // lalr1.cc:856 break; case 102: -#line 499 "parser.ypp" // lalr1.cc:859 +#line 497 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2084 "parser.tab.cpp" // lalr1.cc:859 +#line 2061 "parser.tab.cpp" // lalr1.cc:856 break; case 103: -#line 500 "parser.ypp" // lalr1.cc:859 +#line 498 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2090 "parser.tab.cpp" // lalr1.cc:859 +#line 2067 "parser.tab.cpp" // lalr1.cc:856 break; case 104: -#line 501 "parser.ypp" // lalr1.cc:859 +#line 499 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2096 "parser.tab.cpp" // lalr1.cc:859 +#line 2073 "parser.tab.cpp" // lalr1.cc:856 break; case 105: -#line 502 "parser.ypp" // lalr1.cc:859 +#line 500 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2102 "parser.tab.cpp" // lalr1.cc:859 +#line 2079 "parser.tab.cpp" // lalr1.cc:856 break; case 106: -#line 503 "parser.ypp" // lalr1.cc:859 +#line 501 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2108 "parser.tab.cpp" // lalr1.cc:859 +#line 2085 "parser.tab.cpp" // lalr1.cc:856 break; case 107: -#line 504 "parser.ypp" // lalr1.cc:859 +#line 502 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2114 "parser.tab.cpp" // lalr1.cc:859 +#line 2091 "parser.tab.cpp" // lalr1.cc:856 break; case 108: -#line 505 "parser.ypp" // lalr1.cc:859 +#line 503 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2120 "parser.tab.cpp" // lalr1.cc:859 +#line 2097 "parser.tab.cpp" // lalr1.cc:856 break; case 109: -#line 506 "parser.ypp" // lalr1.cc:859 +#line 504 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2126 "parser.tab.cpp" // lalr1.cc:859 +#line 2103 "parser.tab.cpp" // lalr1.cc:856 break; case 110: -#line 507 "parser.ypp" // lalr1.cc:859 +#line 505 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2132 "parser.tab.cpp" // lalr1.cc:859 +#line 2109 "parser.tab.cpp" // lalr1.cc:856 break; case 111: -#line 508 "parser.ypp" // lalr1.cc:859 +#line 506 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2138 "parser.tab.cpp" // lalr1.cc:859 +#line 2115 "parser.tab.cpp" // lalr1.cc:856 break; case 112: -#line 509 "parser.ypp" // lalr1.cc:859 +#line 507 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2144 "parser.tab.cpp" // lalr1.cc:859 +#line 2121 "parser.tab.cpp" // lalr1.cc:856 break; case 113: -#line 510 "parser.ypp" // lalr1.cc:859 +#line 508 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2150 "parser.tab.cpp" // lalr1.cc:859 +#line 2127 "parser.tab.cpp" // lalr1.cc:856 break; case 114: -#line 511 "parser.ypp" // lalr1.cc:859 +#line 509 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2156 "parser.tab.cpp" // lalr1.cc:859 +#line 2133 "parser.tab.cpp" // lalr1.cc:856 break; case 115: -#line 512 "parser.ypp" // lalr1.cc:859 +#line 510 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValue) = new EnumValue(yylhs.location, strdup((yystack_[0].value.str))); } -#line 2162 "parser.tab.cpp" // lalr1.cc:859 +#line 2139 "parser.tab.cpp" // lalr1.cc:856 break; case 116: -#line 519 "parser.ypp" // lalr1.cc:859 +#line 517 "parser.ypp" // lalr1.cc:856 { (yylhs.value.arrayValue) = new ListValue(yylhs.location, new std::vector>()); } -#line 2168 "parser.tab.cpp" // lalr1.cc:859 +#line 2145 "parser.tab.cpp" // lalr1.cc:856 break; case 117: -#line 520 "parser.ypp" // lalr1.cc:859 +#line 518 "parser.ypp" // lalr1.cc:856 { (yylhs.value.arrayValue) = new ListValue(yylhs.location, (yystack_[1].value.valueList)); } -#line 2174 "parser.tab.cpp" // lalr1.cc:859 +#line 2151 "parser.tab.cpp" // lalr1.cc:856 break; case 118: -#line 523 "parser.ypp" // lalr1.cc:859 +#line 521 "parser.ypp" // lalr1.cc:856 { (yylhs.value.valueList) = new std::vector>(); (yylhs.value.valueList)->emplace_back((yystack_[0].value.value)); } -#line 2180 "parser.tab.cpp" // lalr1.cc:859 +#line 2157 "parser.tab.cpp" // lalr1.cc:856 break; case 119: -#line 524 "parser.ypp" // lalr1.cc:859 +#line 522 "parser.ypp" // lalr1.cc:856 { (yystack_[1].value.valueList)->emplace_back((yystack_[0].value.value)); (yylhs.value.valueList) = (yystack_[1].value.valueList); } -#line 2186 "parser.tab.cpp" // lalr1.cc:859 +#line 2163 "parser.tab.cpp" // lalr1.cc:856 break; case 120: -#line 528 "parser.ypp" // lalr1.cc:859 +#line 526 "parser.ypp" // lalr1.cc:856 { (yylhs.value.arrayValue) = new ListValue(yylhs.location, new std::vector>()); } -#line 2192 "parser.tab.cpp" // lalr1.cc:859 +#line 2169 "parser.tab.cpp" // lalr1.cc:856 break; case 121: -#line 529 "parser.ypp" // lalr1.cc:859 +#line 527 "parser.ypp" // lalr1.cc:856 { (yylhs.value.arrayValue) = new ListValue(yylhs.location, (yystack_[1].value.valueList)); } -#line 2198 "parser.tab.cpp" // lalr1.cc:859 +#line 2175 "parser.tab.cpp" // lalr1.cc:856 break; case 122: -#line 533 "parser.ypp" // lalr1.cc:859 +#line 531 "parser.ypp" // lalr1.cc:856 { (yylhs.value.valueList) = new std::vector>(); (yylhs.value.valueList)->emplace_back((yystack_[0].value.value)); } -#line 2204 "parser.tab.cpp" // lalr1.cc:859 +#line 2181 "parser.tab.cpp" // lalr1.cc:856 break; case 123: -#line 534 "parser.ypp" // lalr1.cc:859 +#line 532 "parser.ypp" // lalr1.cc:856 { (yystack_[1].value.valueList)->emplace_back((yystack_[0].value.value)); (yylhs.value.valueList) = (yystack_[1].value.valueList); } -#line 2210 "parser.tab.cpp" // lalr1.cc:859 +#line 2187 "parser.tab.cpp" // lalr1.cc:856 break; case 124: -#line 539 "parser.ypp" // lalr1.cc:859 +#line 537 "parser.ypp" // lalr1.cc:856 { (yylhs.value.objectValue) = new ObjectValue(yylhs.location, new std::vector>()); } -#line 2216 "parser.tab.cpp" // lalr1.cc:859 +#line 2193 "parser.tab.cpp" // lalr1.cc:856 break; case 125: -#line 540 "parser.ypp" // lalr1.cc:859 +#line 538 "parser.ypp" // lalr1.cc:856 { (yylhs.value.objectValue) = new ObjectValue(yylhs.location, (yystack_[1].value.objectFieldList)); } -#line 2222 "parser.tab.cpp" // lalr1.cc:859 +#line 2199 "parser.tab.cpp" // lalr1.cc:856 break; case 126: -#line 544 "parser.ypp" // lalr1.cc:859 +#line 542 "parser.ypp" // lalr1.cc:856 { (yylhs.value.objectFieldList) = new std::vector>(); (yylhs.value.objectFieldList)->emplace_back((yystack_[0].value.objectField)); } -#line 2228 "parser.tab.cpp" // lalr1.cc:859 +#line 2205 "parser.tab.cpp" // lalr1.cc:856 break; case 127: -#line 545 "parser.ypp" // lalr1.cc:859 +#line 543 "parser.ypp" // lalr1.cc:856 { (yystack_[1].value.objectFieldList)->emplace_back((yystack_[0].value.objectField)); (yylhs.value.objectFieldList) = (yystack_[1].value.objectFieldList); } -#line 2234 "parser.tab.cpp" // lalr1.cc:859 +#line 2211 "parser.tab.cpp" // lalr1.cc:856 break; case 128: -#line 548 "parser.ypp" // lalr1.cc:859 +#line 546 "parser.ypp" // lalr1.cc:856 { (yylhs.value.objectField) = new ObjectField(yylhs.location, (yystack_[2].value.name), (yystack_[0].value.value)); } -#line 2240 "parser.tab.cpp" // lalr1.cc:859 +#line 2217 "parser.tab.cpp" // lalr1.cc:856 break; case 129: -#line 552 "parser.ypp" // lalr1.cc:859 +#line 550 "parser.ypp" // lalr1.cc:856 { (yylhs.value.objectValue) = new ObjectValue(yylhs.location, new std::vector>()); } -#line 2246 "parser.tab.cpp" // lalr1.cc:859 +#line 2223 "parser.tab.cpp" // lalr1.cc:856 break; case 130: -#line 553 "parser.ypp" // lalr1.cc:859 +#line 551 "parser.ypp" // lalr1.cc:856 { (yylhs.value.objectValue) = new ObjectValue(yylhs.location, (yystack_[1].value.objectFieldList)); } -#line 2252 "parser.tab.cpp" // lalr1.cc:859 +#line 2229 "parser.tab.cpp" // lalr1.cc:856 break; case 131: -#line 557 "parser.ypp" // lalr1.cc:859 +#line 555 "parser.ypp" // lalr1.cc:856 { (yylhs.value.objectFieldList) = new std::vector>(); (yylhs.value.objectFieldList)->emplace_back((yystack_[0].value.objectField)); } -#line 2258 "parser.tab.cpp" // lalr1.cc:859 +#line 2235 "parser.tab.cpp" // lalr1.cc:856 break; case 132: -#line 558 "parser.ypp" // lalr1.cc:859 +#line 556 "parser.ypp" // lalr1.cc:856 { (yystack_[1].value.objectFieldList)->emplace_back((yystack_[0].value.objectField)); (yylhs.value.objectFieldList) = (yystack_[1].value.objectFieldList); } -#line 2264 "parser.tab.cpp" // lalr1.cc:859 +#line 2241 "parser.tab.cpp" // lalr1.cc:856 break; case 133: -#line 561 "parser.ypp" // lalr1.cc:859 +#line 559 "parser.ypp" // lalr1.cc:856 { (yylhs.value.objectField) = new ObjectField(yylhs.location, (yystack_[2].value.name), (yystack_[0].value.value)); } -#line 2270 "parser.tab.cpp" // lalr1.cc:859 +#line 2247 "parser.tab.cpp" // lalr1.cc:856 break; case 135: -#line 569 "parser.ypp" // lalr1.cc:859 +#line 567 "parser.ypp" // lalr1.cc:856 { (yylhs.value.directiveList) = nullptr; } -#line 2276 "parser.tab.cpp" // lalr1.cc:859 +#line 2253 "parser.tab.cpp" // lalr1.cc:856 break; case 137: -#line 573 "parser.ypp" // lalr1.cc:859 +#line 571 "parser.ypp" // lalr1.cc:856 { (yylhs.value.directiveList) = new std::vector>(); (yylhs.value.directiveList)->emplace_back((yystack_[0].value.directive)); } -#line 2282 "parser.tab.cpp" // lalr1.cc:859 +#line 2259 "parser.tab.cpp" // lalr1.cc:856 break; case 138: -#line 574 "parser.ypp" // lalr1.cc:859 +#line 572 "parser.ypp" // lalr1.cc:856 { (yystack_[1].value.directiveList)->emplace_back((yystack_[0].value.directive)); (yylhs.value.directiveList) = (yystack_[1].value.directiveList); } -#line 2288 "parser.tab.cpp" // lalr1.cc:859 +#line 2265 "parser.tab.cpp" // lalr1.cc:856 break; case 139: -#line 577 "parser.ypp" // lalr1.cc:859 +#line 575 "parser.ypp" // lalr1.cc:856 { (yylhs.value.directive) = new Directive(yylhs.location, (yystack_[1].value.name), (yystack_[0].value.argumentList)); } -#line 2294 "parser.tab.cpp" // lalr1.cc:859 +#line 2271 "parser.tab.cpp" // lalr1.cc:856 break; case 140: -#line 582 "parser.ypp" // lalr1.cc:859 +#line 580 "parser.ypp" // lalr1.cc:856 { (yylhs.value.type) = static_cast((yystack_[0].value.namedType)); } -#line 2300 "parser.tab.cpp" // lalr1.cc:859 +#line 2277 "parser.tab.cpp" // lalr1.cc:856 break; case 141: -#line 583 "parser.ypp" // lalr1.cc:859 +#line 581 "parser.ypp" // lalr1.cc:856 { (yylhs.value.type) = static_cast((yystack_[0].value.listType)); } -#line 2306 "parser.tab.cpp" // lalr1.cc:859 +#line 2283 "parser.tab.cpp" // lalr1.cc:856 break; case 142: -#line 584 "parser.ypp" // lalr1.cc:859 +#line 582 "parser.ypp" // lalr1.cc:856 { (yylhs.value.type) = static_cast((yystack_[0].value.nonNullType)); } -#line 2312 "parser.tab.cpp" // lalr1.cc:859 +#line 2289 "parser.tab.cpp" // lalr1.cc:856 break; case 143: -#line 587 "parser.ypp" // lalr1.cc:859 +#line 585 "parser.ypp" // lalr1.cc:856 { (yylhs.value.namedType) = new NamedType(yylhs.location, (yystack_[0].value.name)); } -#line 2318 "parser.tab.cpp" // lalr1.cc:859 +#line 2295 "parser.tab.cpp" // lalr1.cc:856 break; case 144: -#line 590 "parser.ypp" // lalr1.cc:859 +#line 588 "parser.ypp" // lalr1.cc:856 { (yylhs.value.listType) = new ListType(yylhs.location, (yystack_[1].value.type)); } -#line 2324 "parser.tab.cpp" // lalr1.cc:859 +#line 2301 "parser.tab.cpp" // lalr1.cc:856 break; case 145: -#line 593 "parser.ypp" // lalr1.cc:859 +#line 591 "parser.ypp" // lalr1.cc:856 { (yylhs.value.nonNullType) = new NonNullType(yylhs.location, (yystack_[1].value.namedType)); } -#line 2330 "parser.tab.cpp" // lalr1.cc:859 +#line 2307 "parser.tab.cpp" // lalr1.cc:856 break; case 146: -#line 594 "parser.ypp" // lalr1.cc:859 +#line 592 "parser.ypp" // lalr1.cc:856 { (yylhs.value.nonNullType) = new NonNullType(yylhs.location, (yystack_[1].value.listType)); } -#line 2336 "parser.tab.cpp" // lalr1.cc:859 +#line 2313 "parser.tab.cpp" // lalr1.cc:856 break; case 147: -#line 599 "parser.ypp" // lalr1.cc:859 +#line 597 "parser.ypp" // lalr1.cc:856 { (yylhs.value.schemaDefinition) = new SchemaDefinition(yylhs.location, (yystack_[3].value.directiveList), (yystack_[1].value.operationTypeDefinitionList)); } -#line 2342 "parser.tab.cpp" // lalr1.cc:859 +#line 2319 "parser.tab.cpp" // lalr1.cc:856 break; case 148: -#line 603 "parser.ypp" // lalr1.cc:859 +#line 601 "parser.ypp" // lalr1.cc:856 { (yylhs.value.operationTypeDefinitionList) = new std::vector>(); (yylhs.value.operationTypeDefinitionList)->emplace_back((yystack_[0].value.operationTypeDefinition)); } -#line 2348 "parser.tab.cpp" // lalr1.cc:859 +#line 2325 "parser.tab.cpp" // lalr1.cc:856 break; case 149: -#line 604 "parser.ypp" // lalr1.cc:859 +#line 602 "parser.ypp" // lalr1.cc:856 { (yystack_[1].value.operationTypeDefinitionList)->emplace_back((yystack_[0].value.operationTypeDefinition)); (yylhs.value.operationTypeDefinitionList) = (yystack_[1].value.operationTypeDefinitionList); } -#line 2354 "parser.tab.cpp" // lalr1.cc:859 +#line 2331 "parser.tab.cpp" // lalr1.cc:856 break; case 150: -#line 608 "parser.ypp" // lalr1.cc:859 +#line 606 "parser.ypp" // lalr1.cc:856 { (yylhs.value.operationTypeDefinition) = new OperationTypeDefinition(yylhs.location, (yystack_[2].value.heapStr), (yystack_[0].value.namedType)); } -#line 2360 "parser.tab.cpp" // lalr1.cc:859 +#line 2337 "parser.tab.cpp" // lalr1.cc:856 break; case 151: -#line 611 "parser.ypp" // lalr1.cc:859 +#line 609 "parser.ypp" // lalr1.cc:856 { (yylhs.value.scalarTypeDefinition) = new ScalarTypeDefinition(yylhs.location, (yystack_[1].value.name), (yystack_[0].value.directiveList)); } -#line 2366 "parser.tab.cpp" // lalr1.cc:859 +#line 2343 "parser.tab.cpp" // lalr1.cc:856 break; case 152: -#line 614 "parser.ypp" // lalr1.cc:859 +#line 612 "parser.ypp" // lalr1.cc:856 { (yylhs.value.objectTypeDefinition) = new ObjectTypeDefinition(yylhs.location, (yystack_[5].value.name), (yystack_[4].value.typeNameList), (yystack_[3].value.directiveList), (yystack_[1].value.fieldDefinitionList)); } -#line 2372 "parser.tab.cpp" // lalr1.cc:859 +#line 2349 "parser.tab.cpp" // lalr1.cc:856 break; case 153: -#line 617 "parser.ypp" // lalr1.cc:859 +#line 615 "parser.ypp" // lalr1.cc:856 { (yylhs.value.typeNameList) = nullptr; } -#line 2378 "parser.tab.cpp" // lalr1.cc:859 +#line 2355 "parser.tab.cpp" // lalr1.cc:856 break; case 154: -#line 618 "parser.ypp" // lalr1.cc:859 +#line 616 "parser.ypp" // lalr1.cc:856 { (yylhs.value.typeNameList) = (yystack_[0].value.typeNameList); } -#line 2384 "parser.tab.cpp" // lalr1.cc:859 +#line 2361 "parser.tab.cpp" // lalr1.cc:856 break; case 155: -#line 621 "parser.ypp" // lalr1.cc:859 +#line 619 "parser.ypp" // lalr1.cc:856 { (yylhs.value.typeNameList) = new std::vector>(); (yylhs.value.typeNameList)->emplace_back((yystack_[0].value.namedType)); } -#line 2390 "parser.tab.cpp" // lalr1.cc:859 +#line 2367 "parser.tab.cpp" // lalr1.cc:856 break; case 156: -#line 622 "parser.ypp" // lalr1.cc:859 +#line 620 "parser.ypp" // lalr1.cc:856 { (yystack_[1].value.typeNameList)->emplace_back((yystack_[0].value.namedType)); (yylhs.value.typeNameList) = (yystack_[1].value.typeNameList); } -#line 2396 "parser.tab.cpp" // lalr1.cc:859 +#line 2373 "parser.tab.cpp" // lalr1.cc:856 break; case 157: -#line 625 "parser.ypp" // lalr1.cc:859 +#line 623 "parser.ypp" // lalr1.cc:856 { (yylhs.value.fieldDefinition) = new FieldDefinition(yylhs.location, (yystack_[4].value.name), (yystack_[3].value.inputValueDefinitionList), (yystack_[1].value.type), (yystack_[0].value.directiveList)); } -#line 2402 "parser.tab.cpp" // lalr1.cc:859 +#line 2379 "parser.tab.cpp" // lalr1.cc:856 break; case 158: -#line 629 "parser.ypp" // lalr1.cc:859 +#line 627 "parser.ypp" // lalr1.cc:856 { (yylhs.value.fieldDefinitionList) = new std::vector>(); (yylhs.value.fieldDefinitionList)->emplace_back((yystack_[0].value.fieldDefinition)); } -#line 2408 "parser.tab.cpp" // lalr1.cc:859 +#line 2385 "parser.tab.cpp" // lalr1.cc:856 break; case 159: -#line 630 "parser.ypp" // lalr1.cc:859 +#line 628 "parser.ypp" // lalr1.cc:856 { (yystack_[1].value.fieldDefinitionList)->emplace_back((yystack_[0].value.fieldDefinition)); (yylhs.value.fieldDefinitionList) = (yystack_[1].value.fieldDefinitionList); } -#line 2414 "parser.tab.cpp" // lalr1.cc:859 +#line 2391 "parser.tab.cpp" // lalr1.cc:856 break; case 160: -#line 633 "parser.ypp" // lalr1.cc:859 +#line 631 "parser.ypp" // lalr1.cc:856 { (yylhs.value.inputValueDefinitionList) = nullptr; } -#line 2420 "parser.tab.cpp" // lalr1.cc:859 +#line 2397 "parser.tab.cpp" // lalr1.cc:856 break; case 161: -#line 634 "parser.ypp" // lalr1.cc:859 +#line 632 "parser.ypp" // lalr1.cc:856 { (yylhs.value.inputValueDefinitionList) = (yystack_[0].value.inputValueDefinitionList); } -#line 2426 "parser.tab.cpp" // lalr1.cc:859 +#line 2403 "parser.tab.cpp" // lalr1.cc:856 break; case 162: -#line 637 "parser.ypp" // lalr1.cc:859 +#line 635 "parser.ypp" // lalr1.cc:856 { (yylhs.value.inputValueDefinitionList) = (yystack_[1].value.inputValueDefinitionList); } -#line 2432 "parser.tab.cpp" // lalr1.cc:859 +#line 2409 "parser.tab.cpp" // lalr1.cc:856 break; case 163: -#line 640 "parser.ypp" // lalr1.cc:859 +#line 638 "parser.ypp" // lalr1.cc:856 { (yylhs.value.inputValueDefinitionList) = new std::vector>(); (yylhs.value.inputValueDefinitionList)->emplace_back((yystack_[0].value.inputValueDefinition)); } -#line 2438 "parser.tab.cpp" // lalr1.cc:859 +#line 2415 "parser.tab.cpp" // lalr1.cc:856 break; case 164: -#line 641 "parser.ypp" // lalr1.cc:859 +#line 639 "parser.ypp" // lalr1.cc:856 { (yystack_[1].value.inputValueDefinitionList)->emplace_back((yystack_[0].value.inputValueDefinition)); (yylhs.value.inputValueDefinitionList) = (yystack_[1].value.inputValueDefinitionList); } -#line 2444 "parser.tab.cpp" // lalr1.cc:859 +#line 2421 "parser.tab.cpp" // lalr1.cc:856 break; case 165: -#line 644 "parser.ypp" // lalr1.cc:859 +#line 642 "parser.ypp" // lalr1.cc:856 { (yylhs.value.inputValueDefinition) = new InputValueDefinition(yylhs.location, (yystack_[4].value.name), (yystack_[2].value.type), (yystack_[1].value.value), (yystack_[0].value.directiveList)); } -#line 2450 "parser.tab.cpp" // lalr1.cc:859 +#line 2427 "parser.tab.cpp" // lalr1.cc:856 break; case 166: -#line 646 "parser.ypp" // lalr1.cc:859 +#line 644 "parser.ypp" // lalr1.cc:856 { (yylhs.value.interfaceTypeDefinition) = new InterfaceTypeDefinition(yylhs.location, (yystack_[4].value.name), (yystack_[3].value.directiveList), (yystack_[1].value.fieldDefinitionList)); } -#line 2456 "parser.tab.cpp" // lalr1.cc:859 +#line 2433 "parser.tab.cpp" // lalr1.cc:856 break; case 167: -#line 649 "parser.ypp" // lalr1.cc:859 +#line 647 "parser.ypp" // lalr1.cc:856 { (yylhs.value.unionTypeDefinition) = new UnionTypeDefinition(yylhs.location, (yystack_[3].value.name), (yystack_[2].value.directiveList), (yystack_[0].value.typeNameList)); } -#line 2462 "parser.tab.cpp" // lalr1.cc:859 +#line 2439 "parser.tab.cpp" // lalr1.cc:856 break; case 168: -#line 652 "parser.ypp" // lalr1.cc:859 +#line 650 "parser.ypp" // lalr1.cc:856 { (yylhs.value.typeNameList) = new std::vector>(); (yylhs.value.typeNameList)->emplace_back((yystack_[0].value.namedType)); } -#line 2468 "parser.tab.cpp" // lalr1.cc:859 +#line 2445 "parser.tab.cpp" // lalr1.cc:856 break; case 169: -#line 653 "parser.ypp" // lalr1.cc:859 +#line 651 "parser.ypp" // lalr1.cc:856 { (yystack_[2].value.typeNameList)->emplace_back((yystack_[0].value.namedType)); (yylhs.value.typeNameList) = (yystack_[2].value.typeNameList); } -#line 2474 "parser.tab.cpp" // lalr1.cc:859 +#line 2451 "parser.tab.cpp" // lalr1.cc:856 break; case 170: -#line 656 "parser.ypp" // lalr1.cc:859 +#line 654 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumTypeDefinition) = new EnumTypeDefinition(yylhs.location, (yystack_[4].value.name), (yystack_[3].value.directiveList), (yystack_[1].value.enumValueDefinitionList)); } -#line 2480 "parser.tab.cpp" // lalr1.cc:859 +#line 2457 "parser.tab.cpp" // lalr1.cc:856 break; case 171: -#line 659 "parser.ypp" // lalr1.cc:859 +#line 657 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValueDefinition) = new EnumValueDefinition(yylhs.location, (yystack_[1].value.name), (yystack_[0].value.directiveList)); } -#line 2486 "parser.tab.cpp" // lalr1.cc:859 +#line 2463 "parser.tab.cpp" // lalr1.cc:856 break; case 172: -#line 663 "parser.ypp" // lalr1.cc:859 +#line 661 "parser.ypp" // lalr1.cc:856 { (yylhs.value.enumValueDefinitionList) = new std::vector>(); (yylhs.value.enumValueDefinitionList)->emplace_back((yystack_[0].value.enumValueDefinition)); } -#line 2492 "parser.tab.cpp" // lalr1.cc:859 +#line 2469 "parser.tab.cpp" // lalr1.cc:856 break; case 173: -#line 664 "parser.ypp" // lalr1.cc:859 +#line 662 "parser.ypp" // lalr1.cc:856 { (yystack_[1].value.enumValueDefinitionList)->emplace_back((yystack_[0].value.enumValueDefinition)); (yylhs.value.enumValueDefinitionList) = (yystack_[1].value.enumValueDefinitionList); } -#line 2498 "parser.tab.cpp" // lalr1.cc:859 +#line 2475 "parser.tab.cpp" // lalr1.cc:856 break; case 174: -#line 667 "parser.ypp" // lalr1.cc:859 +#line 665 "parser.ypp" // lalr1.cc:856 { (yylhs.value.inputObjectTypeDefinition) = new InputObjectTypeDefinition(yylhs.location, (yystack_[4].value.name), (yystack_[3].value.directiveList), (yystack_[1].value.inputValueDefinitionList)); } -#line 2504 "parser.tab.cpp" // lalr1.cc:859 +#line 2481 "parser.tab.cpp" // lalr1.cc:856 break; case 175: -#line 670 "parser.ypp" // lalr1.cc:859 +#line 668 "parser.ypp" // lalr1.cc:856 { (yylhs.value.typeExtensionDefinition) = new TypeExtensionDefinition(yylhs.location, (yystack_[0].value.objectTypeDefinition)); } -#line 2510 "parser.tab.cpp" // lalr1.cc:859 +#line 2487 "parser.tab.cpp" // lalr1.cc:856 break; case 176: -#line 673 "parser.ypp" // lalr1.cc:859 +#line 671 "parser.ypp" // lalr1.cc:856 { (yylhs.value.directiveDefinition) = new DirectiveDefinition(yylhs.location, (yystack_[3].value.name), (yystack_[2].value.inputValueDefinitionList), (yystack_[0].value.nameList)); } -#line 2516 "parser.tab.cpp" // lalr1.cc:859 +#line 2493 "parser.tab.cpp" // lalr1.cc:856 break; case 177: -#line 677 "parser.ypp" // lalr1.cc:859 +#line 675 "parser.ypp" // lalr1.cc:856 { (yylhs.value.nameList) = new std::vector>(); (yylhs.value.nameList)->emplace_back((yystack_[0].value.name)); } -#line 2522 "parser.tab.cpp" // lalr1.cc:859 +#line 2499 "parser.tab.cpp" // lalr1.cc:856 break; case 178: -#line 678 "parser.ypp" // lalr1.cc:859 +#line 676 "parser.ypp" // lalr1.cc:856 { (yystack_[2].value.nameList)->emplace_back((yystack_[0].value.name)); (yylhs.value.nameList) = (yystack_[2].value.nameList); } -#line 2528 "parser.tab.cpp" // lalr1.cc:859 +#line 2505 "parser.tab.cpp" // lalr1.cc:856 break; -#line 2532 "parser.tab.cpp" // lalr1.cc:859 +#line 2509 "parser.tab.cpp" // lalr1.cc:856 default: break; } @@ -2590,7 +2567,6 @@ namespace yy { code. */ if (false) goto yyerrorlab; - yyerror_range[1].location = yystack_[yylen - 1].location; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ yypop_ (yylen); @@ -2664,8 +2640,7 @@ namespace yy { } catch (...) { - YYCDEBUG << "Exception caught: cleaning lookahead and stack" - << std::endl; + YYCDEBUG << "Exception caught: cleaning lookahead and stack\n"; // Do not try to display the values of the reclaimed symbols, // as their printer might throw an exception. if (!yyla.empty ()) @@ -2683,7 +2658,7 @@ namespace yy { void GraphQLParserImpl::error (const syntax_error& yyexc) { - error (yyexc.location, yyexc.what()); + error (yyexc.location, yyexc.what ()); } // Generate an error message. @@ -2759,12 +2734,13 @@ namespace yy { case N: \ yyformat = S; \ break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); + default: // Avoid compiler warnings. + YYCASE_ (0, YY_("syntax error")); + YYCASE_ (1, YY_("syntax error, unexpected %s")); + YYCASE_ (2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_ (3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_ (4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_ (5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); #undef YYCASE_ } @@ -3204,24 +3180,24 @@ namespace yy { const unsigned short int GraphQLParserImpl::yyrline_[] = { - 0, 300, 300, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, - 322, 325, 326, 330, 331, 336, 339, 340, 343, 344, - 345, 357, 358, 359, 360, 361, 362, 363, 364, 365, - 371, 372, 373, 374, 375, 378, 379, 380, 384, 388, - 389, 392, 396, 400, 401, 404, 408, 412, 413, 415, - 416, 419, 420, 421, 424, 425, 428, 431, 432, 435, - 436, 439, 444, 448, 449, 453, 456, 460, 461, 462, - 463, 464, 465, 466, 467, 468, 471, 474, 477, 480, - 481, 482, 483, 484, 485, 486, 487, 490, 491, 494, - 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, - 507, 508, 509, 510, 511, 512, 519, 520, 523, 524, - 528, 529, 533, 534, 539, 540, 544, 545, 548, 552, - 553, 557, 558, 561, 566, 569, 570, 573, 574, 577, - 582, 583, 584, 587, 590, 593, 594, 599, 603, 604, - 608, 611, 614, 617, 618, 621, 622, 625, 629, 630, - 633, 634, 637, 640, 641, 644, 646, 649, 652, 653, - 656, 659, 663, 664, 667, 670, 673, 677, 678 + 0, 298, 298, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + 320, 323, 324, 328, 329, 334, 337, 338, 341, 342, + 343, 355, 356, 357, 358, 359, 360, 361, 362, 363, + 369, 370, 371, 372, 373, 376, 377, 378, 382, 386, + 387, 390, 394, 398, 399, 402, 406, 410, 411, 413, + 414, 417, 418, 419, 422, 423, 426, 429, 430, 433, + 434, 437, 442, 446, 447, 451, 454, 458, 459, 460, + 461, 462, 463, 464, 465, 466, 469, 472, 475, 478, + 479, 480, 481, 482, 483, 484, 485, 488, 489, 492, + 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, + 505, 506, 507, 508, 509, 510, 517, 518, 521, 522, + 526, 527, 531, 532, 537, 538, 542, 543, 546, 550, + 551, 555, 556, 559, 564, 567, 568, 571, 572, 575, + 580, 581, 582, 585, 588, 591, 592, 597, 601, 602, + 606, 609, 612, 615, 616, 619, 620, 623, 627, 628, + 631, 632, 635, 638, 639, 642, 644, 647, 650, 651, + 654, 657, 661, 662, 665, 668, 671, 675, 676 }; // Print the state stack on the debug stream. @@ -3234,18 +3210,18 @@ namespace yy { i_end = yystack_.end (); i != i_end; ++i) *yycdebug_ << ' ' << i->state; - *yycdebug_ << std::endl; + *yycdebug_ << '\n'; } // Report on the debug stream that the rule \a yyrule is going to be reduced. void GraphQLParserImpl::yy_reduce_print_ (int yyrule) { - unsigned int yylno = yyrline_[yyrule]; + unsigned yylno = yyrline_[yyrule]; int yynrhs = yyr2_[yyrule]; // Print the symbols being reduced, and their result. *yycdebug_ << "Reducing stack by rule " << yyrule - 1 - << " (line " << yylno << "):" << std::endl; + << " (line " << yylno << "):\n"; // The symbols being reduced. for (int yyi = 0; yyi < yynrhs; yyi++) YY_SYMBOL_PRINT (" $" << yyi + 1 << " =", @@ -3254,7 +3230,6 @@ namespace yy { #endif // YYDEBUG // Symbol number corresponding to token number t. - inline GraphQLParserImpl::token_number_type GraphQLParserImpl::yytranslate_ (int t) { @@ -3293,12 +3268,12 @@ namespace yy { 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37 }; - const unsigned int user_token_number_max_ = 292; + const unsigned user_token_number_max_ = 292; const token_number_type undef_token_ = 2; - if (static_cast(t) <= yyeof_) + if (static_cast (t) <= yyeof_) return yyeof_; - else if (static_cast (t) <= user_token_number_max_) + else if (static_cast (t) <= user_token_number_max_) return translate_table[t]; else return undef_token_; @@ -3306,8 +3281,8 @@ namespace yy { } // yy -#line 3310 "parser.tab.cpp" // lalr1.cc:1167 -#line 681 "parser.ypp" // lalr1.cc:1168 +#line 3285 "parser.tab.cpp" // lalr1.cc:1163 +#line 679 "parser.ypp" // lalr1.cc:1164 void yy::GraphQLParserImpl::error(const yy::location &loc, const std::string &str) { diff --git a/parser.tab.hpp b/parser.tab.hpp index 8c17e21..b6862be 100644 --- a/parser.tab.hpp +++ b/parser.tab.hpp @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.0.4. +// A Bison parser, made by GNU Bison 3.0.5. // Skeleton interface for Bison LALR(1) parsers in C++ -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -40,7 +40,7 @@ #ifndef YY_YY_PARSER_TAB_HPP_INCLUDED # define YY_YY_PARSER_TAB_HPP_INCLUDED // // "%code requires" blocks. -#line 22 "parser.ypp" // lalr1.cc:392 +#line 20 "parser.ypp" // lalr1.cc:394 #include #include @@ -171,7 +171,7 @@ union yystype { \ #define YYLTYPE yy::location -#line 175 "parser.tab.hpp" // lalr1.cc:392 +#line 175 "parser.tab.hpp" // lalr1.cc:394 # include // std::abort @@ -243,7 +243,7 @@ union yystype { \ namespace yy { -#line 247 "parser.tab.hpp" // lalr1.cc:392 +#line 247 "parser.tab.hpp" // lalr1.cc:394 @@ -583,6 +583,8 @@ namespace yy { typedef basic_symbol super_type; /// Construct an empty symbol. stack_symbol_type (); + /// Copy construct. + stack_symbol_type (const stack_symbol_type& that); /// Steal the contents from \a sym to build this. stack_symbol_type (state_type s, symbol_type& sym); /// Assignment, needed by push_back. @@ -611,7 +613,7 @@ namespace yy { void yypush_ (const char* m, state_type s, symbol_type& sym); /// Pop \a n symbols the three stacks. - void yypop_ (unsigned int n = 1); + void yypop_ (unsigned n = 1); /// Constants. enum @@ -636,7 +638,7 @@ namespace yy { } // yy -#line 640 "parser.tab.hpp" // lalr1.cc:392 +#line 642 "parser.tab.hpp" // lalr1.cc:394 diff --git a/position.hh b/position.hh index 8269bc3..53c9aff 100644 --- a/position.hh +++ b/position.hh @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.0.4. +// A Bison parser, made by GNU Bison 3.0.5. // Positions for Bison parsers in C++ -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -52,26 +52,25 @@ namespace yy { -#line 56 "position.hh" // location.cc:337 +#line 56 "position.hh" // location.cc:333 /// Abstract a position. class position { public: /// Construct a position. explicit position (std::string* f = YY_NULLPTR, - unsigned int l = 1u, - unsigned int c = 1u) + unsigned l = 1u, + unsigned c = 1u) : filename (f) , line (l) , column (c) - { - } + {} /// Initialization. void initialize (std::string* fn = YY_NULLPTR, - unsigned int l = 1u, - unsigned int c = 1u) + unsigned l = 1u, + unsigned c = 1u) { filename = fn; line = l; @@ -100,15 +99,15 @@ namespace yy { /// File name to which this position refers. std::string* filename; /// Current line number. - unsigned int line; + unsigned line; /// Current column number. - unsigned int column; + unsigned column; private: /// Compute max(min, lhs+rhs) (provided min <= lhs). - static unsigned int add_ (unsigned int lhs, int rhs, unsigned int min) + static unsigned add_ (unsigned lhs, int rhs, unsigned min) { - return (0 < rhs || -static_cast(rhs) < lhs + return (0 < rhs || -static_cast(rhs) < lhs ? rhs + lhs : min); } @@ -176,5 +175,5 @@ namespace yy { } // yy -#line 180 "position.hh" // location.cc:337 +#line 179 "position.hh" // location.cc:333 #endif // !YY_YY_POSITION_HH_INCLUDED diff --git a/stack.hh b/stack.hh index c8a494b..9535b3e 100644 --- a/stack.hh +++ b/stack.hh @@ -1,8 +1,8 @@ -// A Bison parser, made by GNU Bison 3.0.4. +// A Bison parser, made by GNU Bison 3.0.5. // Stack handling for Bison parsers in C++ -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -42,7 +42,8 @@ namespace yy { -#line 46 "stack.hh" // stack.hh:151 +#line 46 "stack.hh" // stack.hh:150 + /// A stack with random access from its top. template > class stack { @@ -57,20 +58,24 @@ namespace yy { seq_.reserve (200); } - stack (unsigned int n) + stack (unsigned n) : seq_ (n) {} - inline + /// Random access. + /// + /// Index 0 returns the topmost element. T& - operator[] (unsigned int i) + operator[] (unsigned i) { return seq_[seq_.size () - 1 - i]; } - inline + /// Random access. + /// + /// Index 0 returns the topmost element. const T& - operator[] (unsigned int i) const + operator[] (unsigned i) const { return seq_[seq_.size () - 1 - i]; } @@ -78,7 +83,6 @@ namespace yy { /// Steal the contents of \a t. /// /// Close to move-semantics. - inline void push (T& t) { @@ -86,9 +90,8 @@ namespace yy { operator[](0).move (t); } - inline void - pop (unsigned int n = 1) + pop (unsigned n = 1) { for (; n; --n) seq_.pop_back (); @@ -100,21 +103,18 @@ namespace yy { seq_.clear (); } - inline typename S::size_type size () const { return seq_.size (); } - inline const_iterator begin () const { return seq_.rbegin (); } - inline const_iterator end () const { @@ -133,25 +133,24 @@ namespace yy { class slice { public: - slice (const S& stack, unsigned int range) + slice (const S& stack, unsigned range) : stack_ (stack) , range_ (range) {} - inline const T& - operator [] (unsigned int i) const + operator [] (unsigned i) const { return stack_[range_ - i]; } private: const S& stack_; - unsigned int range_; + unsigned range_; }; } // yy -#line 156 "stack.hh" // stack.hh:151 +#line 155 "stack.hh" // stack.hh:150 #endif // !YY_YY_STACK_HH_INCLUDED diff --git a/test/ParserTests.cpp b/test/ParserTests.cpp index 299f7fb..052a282 100644 --- a/test/ParserTests.cpp +++ b/test/ParserTests.cpp @@ -118,6 +118,10 @@ TEST(ParserTests, AcceptsEmptyString) { expectSuccess(R"({ field(arg:"") })"); } +TEST(ParserTests, AcceptsEmptyBlockString) { + expectSuccess(R"({ field(arg:"""""") })"); +} + TEST(ParserTests, UnterminatedString) { expectError("\"", "1.1: Unterminated string at EOF"); expectError("\"\n\"", "1.1-2: Unterminated string"); diff --git a/test/kitchen-sink.graphql b/test/kitchen-sink.graphql index 008ed47..6fcf394 100644 --- a/test/kitchen-sink.graphql +++ b/test/kitchen-sink.graphql @@ -3,8 +3,6 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -# (this line is padding to maintain test line numbers) - query queryName($foo: ComplexType, $site: Site = MOBILE) { whoever123is: node(id: [123, 456]) { id , @@ -48,7 +46,11 @@ subscription StoryLikeSubscription($input: StoryLikeSubscribeInput) { } fragment frag on Friend { - foo(size: $size, bar: $b, obj: {key: "value"}) + foo(size: $size, bar: $b, obj: {key: "value", block: """ + + block string uses \""" + + """}) } { diff --git a/test/kitchen-sink.json b/test/kitchen-sink.json index 5a94ac5..14b93ab 100644 --- a/test/kitchen-sink.json +++ b/test/kitchen-sink.json @@ -1 +1 @@ -{"kind":"Document","loc":{"start": {"line": 8,"column":1}, "end": {"line":57,"column":2}},"definitions":[{"kind":"OperationDefinition","loc":{"start": {"line": 8,"column":1}, "end": {"line":27,"column":2}},"operation":"query","name":{"kind":"Name","loc":{"start": {"line": 8,"column":7}, "end": {"line":8,"column":16}},"value":"queryName"},"variableDefinitions":[{"kind":"VariableDefinition","loc":{"start": {"line": 8,"column":17}, "end": {"line":8,"column":34}},"variable":{"kind":"Variable","loc":{"start": {"line": 8,"column":17}, "end": {"line":8,"column":21}},"name":{"kind":"Name","loc":{"start": {"line": 8,"column":17}, "end": {"line":8,"column":21}},"value":"foo"}},"type":{"kind":"NamedType","loc":{"start": {"line": 8,"column":23}, "end": {"line":8,"column":34}},"name":{"kind":"Name","loc":{"start": {"line": 8,"column":23}, "end": {"line":8,"column":34}},"value":"ComplexType"}},"defaultValue":null},{"kind":"VariableDefinition","loc":{"start": {"line": 8,"column":36}, "end": {"line":8,"column":56}},"variable":{"kind":"Variable","loc":{"start": {"line": 8,"column":36}, "end": {"line":8,"column":41}},"name":{"kind":"Name","loc":{"start": {"line": 8,"column":36}, "end": {"line":8,"column":41}},"value":"site"}},"type":{"kind":"NamedType","loc":{"start": {"line": 8,"column":43}, "end": {"line":8,"column":47}},"name":{"kind":"Name","loc":{"start": {"line": 8,"column":43}, "end": {"line":8,"column":47}},"value":"Site"}},"defaultValue":{"kind":"EnumValue","loc":{"start": {"line": 8,"column":50}, "end": {"line":8,"column":56}},"value":"MOBILE"}}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 8,"column":58}, "end": {"line":27,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 9,"column":3}, "end": {"line":26,"column":4}},"alias":{"kind":"Name","loc":{"start": {"line": 9,"column":3}, "end": {"line":9,"column":15}},"value":"whoever123is"},"name":{"kind":"Name","loc":{"start": {"line": 9,"column":17}, "end": {"line":9,"column":21}},"value":"node"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 9,"column":22}, "end": {"line":9,"column":36}},"name":{"kind":"Name","loc":{"start": {"line": 9,"column":22}, "end": {"line":9,"column":24}},"value":"id"},"value":{"kind":"ListValue","loc":{"start": {"line": 9,"column":26}, "end": {"line":9,"column":36}},"values":[{"kind":"IntValue","loc":{"start": {"line": 9,"column":27}, "end": {"line":9,"column":30}},"value":"123"},{"kind":"IntValue","loc":{"start": {"line": 9,"column":32}, "end": {"line":9,"column":35}},"value":"456"}]}}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 9,"column":38}, "end": {"line":26,"column":4}},"selections":[{"kind":"Field","loc":{"start": {"line": 10,"column":5}, "end": {"line":10,"column":7}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 10,"column":5}, "end": {"line":10,"column":7}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null},{"kind":"InlineFragment","loc":{"start": {"line": 11,"column":5}, "end": {"line":19,"column":6}},"typeCondition":{"kind":"NamedType","loc":{"start": {"line": 11,"column":12}, "end": {"line":11,"column":16}},"name":{"kind":"Name","loc":{"start": {"line": 11,"column":12}, "end": {"line":11,"column":16}},"value":"User"}},"directives":[{"kind":"Directive","loc":{"start": {"line": 11,"column":17}, "end": {"line":11,"column":23}},"name":{"kind":"Name","loc":{"start": {"line": 11,"column":18}, "end": {"line":11,"column":23}},"value":"defer"},"arguments":null}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 11,"column":24}, "end": {"line":19,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 12,"column":7}, "end": {"line":18,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 12,"column":7}, "end": {"line":12,"column":13}},"value":"field2"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 12,"column":14}, "end": {"line":18,"column":8}},"selections":[{"kind":"Field","loc":{"start": {"line": 13,"column":9}, "end": {"line":13,"column":11}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 13,"column":9}, "end": {"line":13,"column":11}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null},{"kind":"Field","loc":{"start": {"line": 14,"column":9}, "end": {"line":17,"column":10}},"alias":{"kind":"Name","loc":{"start": {"line": 14,"column":9}, "end": {"line":14,"column":14}},"value":"alias"},"name":{"kind":"Name","loc":{"start": {"line": 14,"column":16}, "end": {"line":14,"column":22}},"value":"field1"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 14,"column":23}, "end": {"line":14,"column":31}},"name":{"kind":"Name","loc":{"start": {"line": 14,"column":23}, "end": {"line":14,"column":28}},"value":"first"},"value":{"kind":"IntValue","loc":{"start": {"line": 14,"column":29}, "end": {"line":14,"column":31}},"value":"10"}},{"kind":"Argument","loc":{"start": {"line": 14,"column":33}, "end": {"line":14,"column":43}},"name":{"kind":"Name","loc":{"start": {"line": 14,"column":33}, "end": {"line":14,"column":38}},"value":"after"},"value":{"kind":"Variable","loc":{"start": {"line": 14,"column":39}, "end": {"line":14,"column":43}},"name":{"kind":"Name","loc":{"start": {"line": 14,"column":39}, "end": {"line":14,"column":43}},"value":"foo"}}}],"directives":[{"kind":"Directive","loc":{"start": {"line": 14,"column":46}, "end": {"line":14,"column":64}},"name":{"kind":"Name","loc":{"start": {"line": 14,"column":47}, "end": {"line":14,"column":54}},"value":"include"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 14,"column":55}, "end": {"line":14,"column":63}},"name":{"kind":"Name","loc":{"start": {"line": 14,"column":55}, "end": {"line":14,"column":57}},"value":"if"},"value":{"kind":"Variable","loc":{"start": {"line": 14,"column":59}, "end": {"line":14,"column":63}},"name":{"kind":"Name","loc":{"start": {"line": 14,"column":59}, "end": {"line":14,"column":63}},"value":"foo"}}}]}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 14,"column":65}, "end": {"line":17,"column":10}},"selections":[{"kind":"Field","loc":{"start": {"line": 15,"column":11}, "end": {"line":15,"column":13}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 15,"column":11}, "end": {"line":15,"column":13}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null},{"kind":"FragmentSpread","loc":{"start": {"line": 16,"column":11}, "end": {"line":16,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 16,"column":14}, "end": {"line":16,"column":18}},"value":"frag"},"directives":null}]}}]}}]}},{"kind":"InlineFragment","loc":{"start": {"line": 20,"column":5}, "end": {"line":22,"column":6}},"typeCondition":null,"directives":[{"kind":"Directive","loc":{"start": {"line": 20,"column":9}, "end": {"line":20,"column":28}},"name":{"kind":"Name","loc":{"start": {"line": 20,"column":10}, "end": {"line":20,"column":14}},"value":"skip"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 20,"column":15}, "end": {"line":20,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 20,"column":15}, "end": {"line":20,"column":21}},"value":"unless"},"value":{"kind":"Variable","loc":{"start": {"line": 20,"column":23}, "end": {"line":20,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 20,"column":23}, "end": {"line":20,"column":27}},"value":"foo"}}}]}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 20,"column":29}, "end": {"line":22,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 21,"column":7}, "end": {"line":21,"column":9}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 21,"column":7}, "end": {"line":21,"column":9}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null}]}},{"kind":"InlineFragment","loc":{"start": {"line": 23,"column":5}, "end": {"line":25,"column":6}},"typeCondition":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 23,"column":9}, "end": {"line":25,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 24,"column":7}, "end": {"line":24,"column":9}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 24,"column":7}, "end": {"line":24,"column":9}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null}]}}]}}]}},{"kind":"OperationDefinition","loc":{"start": {"line": 29,"column":1}, "end": {"line":35,"column":2}},"operation":"mutation","name":{"kind":"Name","loc":{"start": {"line": 29,"column":10}, "end": {"line":29,"column":19}},"value":"likeStory"},"variableDefinitions":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 29,"column":20}, "end": {"line":35,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 30,"column":3}, "end": {"line":34,"column":4}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 30,"column":3}, "end": {"line":30,"column":7}},"value":"like"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 30,"column":8}, "end": {"line":30,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 30,"column":8}, "end": {"line":30,"column":13}},"value":"story"},"value":{"kind":"IntValue","loc":{"start": {"line": 30,"column":15}, "end": {"line":30,"column":18}},"value":"123"}}],"directives":[{"kind":"Directive","loc":{"start": {"line": 30,"column":20}, "end": {"line":30,"column":26}},"name":{"kind":"Name","loc":{"start": {"line": 30,"column":21}, "end": {"line":30,"column":26}},"value":"defer"},"arguments":null}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 30,"column":27}, "end": {"line":34,"column":4}},"selections":[{"kind":"Field","loc":{"start": {"line": 31,"column":5}, "end": {"line":33,"column":6}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 31,"column":5}, "end": {"line":31,"column":10}},"value":"story"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 31,"column":11}, "end": {"line":33,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 32,"column":7}, "end": {"line":32,"column":9}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 32,"column":7}, "end": {"line":32,"column":9}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null}]}}]}}]}},{"kind":"OperationDefinition","loc":{"start": {"line": 37,"column":1}, "end": {"line":48,"column":2}},"operation":"subscription","name":{"kind":"Name","loc":{"start": {"line": 37,"column":14}, "end": {"line":37,"column":35}},"value":"StoryLikeSubscription"},"variableDefinitions":[{"kind":"VariableDefinition","loc":{"start": {"line": 37,"column":36}, "end": {"line":37,"column":67}},"variable":{"kind":"Variable","loc":{"start": {"line": 37,"column":36}, "end": {"line":37,"column":42}},"name":{"kind":"Name","loc":{"start": {"line": 37,"column":36}, "end": {"line":37,"column":42}},"value":"input"}},"type":{"kind":"NamedType","loc":{"start": {"line": 37,"column":44}, "end": {"line":37,"column":67}},"name":{"kind":"Name","loc":{"start": {"line": 37,"column":44}, "end": {"line":37,"column":67}},"value":"StoryLikeSubscribeInput"}},"defaultValue":null}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 37,"column":69}, "end": {"line":48,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 38,"column":3}, "end": {"line":47,"column":4}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 38,"column":3}, "end": {"line":38,"column":21}},"value":"storyLikeSubscribe"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 38,"column":22}, "end": {"line":38,"column":35}},"name":{"kind":"Name","loc":{"start": {"line": 38,"column":22}, "end": {"line":38,"column":27}},"value":"input"},"value":{"kind":"Variable","loc":{"start": {"line": 38,"column":29}, "end": {"line":38,"column":35}},"name":{"kind":"Name","loc":{"start": {"line": 38,"column":29}, "end": {"line":38,"column":35}},"value":"input"}}}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 38,"column":37}, "end": {"line":47,"column":4}},"selections":[{"kind":"Field","loc":{"start": {"line": 39,"column":5}, "end": {"line":46,"column":6}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 39,"column":5}, "end": {"line":39,"column":10}},"value":"story"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 39,"column":11}, "end": {"line":46,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 40,"column":7}, "end": {"line":42,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 40,"column":7}, "end": {"line":40,"column":13}},"value":"likers"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 40,"column":14}, "end": {"line":42,"column":8}},"selections":[{"kind":"Field","loc":{"start": {"line": 41,"column":9}, "end": {"line":41,"column":14}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 41,"column":9}, "end": {"line":41,"column":14}},"value":"count"},"arguments":null,"directives":null,"selectionSet":null}]}},{"kind":"Field","loc":{"start": {"line": 43,"column":7}, "end": {"line":45,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 43,"column":7}, "end": {"line":43,"column":19}},"value":"likeSentence"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 43,"column":20}, "end": {"line":45,"column":8}},"selections":[{"kind":"Field","loc":{"start": {"line": 44,"column":9}, "end": {"line":44,"column":13}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 44,"column":9}, "end": {"line":44,"column":13}},"value":"text"},"arguments":null,"directives":null,"selectionSet":null}]}}]}}]}}]}},{"kind":"FragmentDefinition","loc":{"start": {"line": 50,"column":1}, "end": {"line":52,"column":2}},"name":{"kind":"Name","loc":{"start": {"line": 50,"column":10}, "end": {"line":50,"column":14}},"value":"frag"},"typeCondition":{"kind":"NamedType","loc":{"start": {"line": 50,"column":18}, "end": {"line":50,"column":24}},"name":{"kind":"Name","loc":{"start": {"line": 50,"column":18}, "end": {"line":50,"column":24}},"value":"Friend"}},"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 50,"column":25}, "end": {"line":52,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 51,"column":3}, "end": {"line":51,"column":49}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 51,"column":3}, "end": {"line":51,"column":6}},"value":"foo"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 51,"column":7}, "end": {"line":51,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 51,"column":7}, "end": {"line":51,"column":11}},"value":"size"},"value":{"kind":"Variable","loc":{"start": {"line": 51,"column":13}, "end": {"line":51,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 51,"column":13}, "end": {"line":51,"column":18}},"value":"size"}}},{"kind":"Argument","loc":{"start": {"line": 51,"column":20}, "end": {"line":51,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 51,"column":20}, "end": {"line":51,"column":23}},"value":"bar"},"value":{"kind":"Variable","loc":{"start": {"line": 51,"column":25}, "end": {"line":51,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 51,"column":25}, "end": {"line":51,"column":27}},"value":"b"}}},{"kind":"Argument","loc":{"start": {"line": 51,"column":29}, "end": {"line":51,"column":48}},"name":{"kind":"Name","loc":{"start": {"line": 51,"column":29}, "end": {"line":51,"column":32}},"value":"obj"},"value":{"kind":"ObjectValue","loc":{"start": {"line": 51,"column":34}, "end": {"line":51,"column":48}},"fields":[{"kind":"ObjectField","loc":{"start": {"line": 51,"column":35}, "end": {"line":51,"column":47}},"name":{"kind":"Name","loc":{"start": {"line": 51,"column":35}, "end": {"line":51,"column":38}},"value":"key"},"value":{"kind":"StringValue","loc":{"start": {"line": 51,"column":40}, "end": {"line":51,"column":47}},"value":"value"}}]}}],"directives":null,"selectionSet":null}]}},{"kind":"OperationDefinition","loc":{"start": {"line": 54,"column":1}, "end": {"line":57,"column":2}},"operation":"query","name":null,"variableDefinitions":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 54,"column":1}, "end": {"line":57,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 55,"column":3}, "end": {"line":55,"column":54}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 55,"column":3}, "end": {"line":55,"column":10}},"value":"unnamed"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 55,"column":11}, "end": {"line":55,"column":23}},"name":{"kind":"Name","loc":{"start": {"line": 55,"column":11}, "end": {"line":55,"column":17}},"value":"truthy"},"value":{"kind":"BooleanValue","loc":{"start": {"line": 55,"column":19}, "end": {"line":55,"column":23}},"value":true}},{"kind":"Argument","loc":{"start": {"line": 55,"column":25}, "end": {"line":55,"column":38}},"name":{"kind":"Name","loc":{"start": {"line": 55,"column":25}, "end": {"line":55,"column":31}},"value":"falsey"},"value":{"kind":"BooleanValue","loc":{"start": {"line": 55,"column":33}, "end": {"line":55,"column":38}},"value":false}},{"kind":"Argument","loc":{"start": {"line": 55,"column":40}, "end": {"line":55,"column":53}},"name":{"kind":"Name","loc":{"start": {"line": 55,"column":40}, "end": {"line":55,"column":47}},"value":"nullish"},"value":{"kind":"NullValue","loc":{"start": {"line": 55,"column":49}, "end": {"line":55,"column":53}}}}],"directives":null,"selectionSet":null},{"kind":"Field","loc":{"start": {"line": 56,"column":3}, "end": {"line":56,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 56,"column":3}, "end": {"line":56,"column":8}},"value":"query"},"arguments":null,"directives":null,"selectionSet":null}]}}]} \ No newline at end of file +{"kind":"Document","loc":{"start": {"line": 6,"column":1}, "end": {"line":55,"column":2}},"definitions":[{"kind":"OperationDefinition","loc":{"start": {"line": 6,"column":1}, "end": {"line":25,"column":2}},"operation":"query","name":{"kind":"Name","loc":{"start": {"line": 6,"column":7}, "end": {"line":6,"column":16}},"value":"queryName"},"variableDefinitions":[{"kind":"VariableDefinition","loc":{"start": {"line": 6,"column":17}, "end": {"line":6,"column":34}},"variable":{"kind":"Variable","loc":{"start": {"line": 6,"column":17}, "end": {"line":6,"column":21}},"name":{"kind":"Name","loc":{"start": {"line": 6,"column":17}, "end": {"line":6,"column":21}},"value":"foo"}},"type":{"kind":"NamedType","loc":{"start": {"line": 6,"column":23}, "end": {"line":6,"column":34}},"name":{"kind":"Name","loc":{"start": {"line": 6,"column":23}, "end": {"line":6,"column":34}},"value":"ComplexType"}},"defaultValue":null},{"kind":"VariableDefinition","loc":{"start": {"line": 6,"column":36}, "end": {"line":6,"column":56}},"variable":{"kind":"Variable","loc":{"start": {"line": 6,"column":36}, "end": {"line":6,"column":41}},"name":{"kind":"Name","loc":{"start": {"line": 6,"column":36}, "end": {"line":6,"column":41}},"value":"site"}},"type":{"kind":"NamedType","loc":{"start": {"line": 6,"column":43}, "end": {"line":6,"column":47}},"name":{"kind":"Name","loc":{"start": {"line": 6,"column":43}, "end": {"line":6,"column":47}},"value":"Site"}},"defaultValue":{"kind":"EnumValue","loc":{"start": {"line": 6,"column":50}, "end": {"line":6,"column":56}},"value":"MOBILE"}}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 6,"column":58}, "end": {"line":25,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 7,"column":3}, "end": {"line":24,"column":4}},"alias":{"kind":"Name","loc":{"start": {"line": 7,"column":3}, "end": {"line":7,"column":15}},"value":"whoever123is"},"name":{"kind":"Name","loc":{"start": {"line": 7,"column":17}, "end": {"line":7,"column":21}},"value":"node"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 7,"column":22}, "end": {"line":7,"column":36}},"name":{"kind":"Name","loc":{"start": {"line": 7,"column":22}, "end": {"line":7,"column":24}},"value":"id"},"value":{"kind":"ListValue","loc":{"start": {"line": 7,"column":26}, "end": {"line":7,"column":36}},"values":[{"kind":"IntValue","loc":{"start": {"line": 7,"column":27}, "end": {"line":7,"column":30}},"value":"123"},{"kind":"IntValue","loc":{"start": {"line": 7,"column":32}, "end": {"line":7,"column":35}},"value":"456"}]}}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 7,"column":38}, "end": {"line":24,"column":4}},"selections":[{"kind":"Field","loc":{"start": {"line": 8,"column":5}, "end": {"line":8,"column":7}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 8,"column":5}, "end": {"line":8,"column":7}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null},{"kind":"InlineFragment","loc":{"start": {"line": 9,"column":5}, "end": {"line":17,"column":6}},"typeCondition":{"kind":"NamedType","loc":{"start": {"line": 9,"column":12}, "end": {"line":9,"column":16}},"name":{"kind":"Name","loc":{"start": {"line": 9,"column":12}, "end": {"line":9,"column":16}},"value":"User"}},"directives":[{"kind":"Directive","loc":{"start": {"line": 9,"column":17}, "end": {"line":9,"column":23}},"name":{"kind":"Name","loc":{"start": {"line": 9,"column":18}, "end": {"line":9,"column":23}},"value":"defer"},"arguments":null}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 9,"column":24}, "end": {"line":17,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 10,"column":7}, "end": {"line":16,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 10,"column":7}, "end": {"line":10,"column":13}},"value":"field2"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 10,"column":14}, "end": {"line":16,"column":8}},"selections":[{"kind":"Field","loc":{"start": {"line": 11,"column":9}, "end": {"line":11,"column":11}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 11,"column":9}, "end": {"line":11,"column":11}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null},{"kind":"Field","loc":{"start": {"line": 12,"column":9}, "end": {"line":15,"column":10}},"alias":{"kind":"Name","loc":{"start": {"line": 12,"column":9}, "end": {"line":12,"column":14}},"value":"alias"},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":16}, "end": {"line":12,"column":22}},"value":"field1"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 12,"column":23}, "end": {"line":12,"column":31}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":23}, "end": {"line":12,"column":28}},"value":"first"},"value":{"kind":"IntValue","loc":{"start": {"line": 12,"column":29}, "end": {"line":12,"column":31}},"value":"10"}},{"kind":"Argument","loc":{"start": {"line": 12,"column":33}, "end": {"line":12,"column":43}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":33}, "end": {"line":12,"column":38}},"value":"after"},"value":{"kind":"Variable","loc":{"start": {"line": 12,"column":39}, "end": {"line":12,"column":43}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":39}, "end": {"line":12,"column":43}},"value":"foo"}}}],"directives":[{"kind":"Directive","loc":{"start": {"line": 12,"column":46}, "end": {"line":12,"column":64}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":47}, "end": {"line":12,"column":54}},"value":"include"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 12,"column":55}, "end": {"line":12,"column":63}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":55}, "end": {"line":12,"column":57}},"value":"if"},"value":{"kind":"Variable","loc":{"start": {"line": 12,"column":59}, "end": {"line":12,"column":63}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":59}, "end": {"line":12,"column":63}},"value":"foo"}}}]}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 12,"column":65}, "end": {"line":15,"column":10}},"selections":[{"kind":"Field","loc":{"start": {"line": 13,"column":11}, "end": {"line":13,"column":13}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 13,"column":11}, "end": {"line":13,"column":13}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null},{"kind":"FragmentSpread","loc":{"start": {"line": 14,"column":11}, "end": {"line":14,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 14,"column":14}, "end": {"line":14,"column":18}},"value":"frag"},"directives":null}]}}]}}]}},{"kind":"InlineFragment","loc":{"start": {"line": 18,"column":5}, "end": {"line":20,"column":6}},"typeCondition":null,"directives":[{"kind":"Directive","loc":{"start": {"line": 18,"column":9}, "end": {"line":18,"column":28}},"name":{"kind":"Name","loc":{"start": {"line": 18,"column":10}, "end": {"line":18,"column":14}},"value":"skip"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 18,"column":15}, "end": {"line":18,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 18,"column":15}, "end": {"line":18,"column":21}},"value":"unless"},"value":{"kind":"Variable","loc":{"start": {"line": 18,"column":23}, "end": {"line":18,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 18,"column":23}, "end": {"line":18,"column":27}},"value":"foo"}}}]}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 18,"column":29}, "end": {"line":20,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 19,"column":7}, "end": {"line":19,"column":9}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 19,"column":7}, "end": {"line":19,"column":9}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null}]}},{"kind":"InlineFragment","loc":{"start": {"line": 21,"column":5}, "end": {"line":23,"column":6}},"typeCondition":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 21,"column":9}, "end": {"line":23,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 22,"column":7}, "end": {"line":22,"column":9}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 22,"column":7}, "end": {"line":22,"column":9}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null}]}}]}}]}},{"kind":"OperationDefinition","loc":{"start": {"line": 27,"column":1}, "end": {"line":33,"column":2}},"operation":"mutation","name":{"kind":"Name","loc":{"start": {"line": 27,"column":10}, "end": {"line":27,"column":19}},"value":"likeStory"},"variableDefinitions":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 27,"column":20}, "end": {"line":33,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 28,"column":3}, "end": {"line":32,"column":4}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 28,"column":3}, "end": {"line":28,"column":7}},"value":"like"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 28,"column":8}, "end": {"line":28,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 28,"column":8}, "end": {"line":28,"column":13}},"value":"story"},"value":{"kind":"IntValue","loc":{"start": {"line": 28,"column":15}, "end": {"line":28,"column":18}},"value":"123"}}],"directives":[{"kind":"Directive","loc":{"start": {"line": 28,"column":20}, "end": {"line":28,"column":26}},"name":{"kind":"Name","loc":{"start": {"line": 28,"column":21}, "end": {"line":28,"column":26}},"value":"defer"},"arguments":null}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 28,"column":27}, "end": {"line":32,"column":4}},"selections":[{"kind":"Field","loc":{"start": {"line": 29,"column":5}, "end": {"line":31,"column":6}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 29,"column":5}, "end": {"line":29,"column":10}},"value":"story"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 29,"column":11}, "end": {"line":31,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 30,"column":7}, "end": {"line":30,"column":9}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 30,"column":7}, "end": {"line":30,"column":9}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null}]}}]}}]}},{"kind":"OperationDefinition","loc":{"start": {"line": 35,"column":1}, "end": {"line":46,"column":2}},"operation":"subscription","name":{"kind":"Name","loc":{"start": {"line": 35,"column":14}, "end": {"line":35,"column":35}},"value":"StoryLikeSubscription"},"variableDefinitions":[{"kind":"VariableDefinition","loc":{"start": {"line": 35,"column":36}, "end": {"line":35,"column":67}},"variable":{"kind":"Variable","loc":{"start": {"line": 35,"column":36}, "end": {"line":35,"column":42}},"name":{"kind":"Name","loc":{"start": {"line": 35,"column":36}, "end": {"line":35,"column":42}},"value":"input"}},"type":{"kind":"NamedType","loc":{"start": {"line": 35,"column":44}, "end": {"line":35,"column":67}},"name":{"kind":"Name","loc":{"start": {"line": 35,"column":44}, "end": {"line":35,"column":67}},"value":"StoryLikeSubscribeInput"}},"defaultValue":null}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 35,"column":69}, "end": {"line":46,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 36,"column":3}, "end": {"line":45,"column":4}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 36,"column":3}, "end": {"line":36,"column":21}},"value":"storyLikeSubscribe"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 36,"column":22}, "end": {"line":36,"column":35}},"name":{"kind":"Name","loc":{"start": {"line": 36,"column":22}, "end": {"line":36,"column":27}},"value":"input"},"value":{"kind":"Variable","loc":{"start": {"line": 36,"column":29}, "end": {"line":36,"column":35}},"name":{"kind":"Name","loc":{"start": {"line": 36,"column":29}, "end": {"line":36,"column":35}},"value":"input"}}}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 36,"column":37}, "end": {"line":45,"column":4}},"selections":[{"kind":"Field","loc":{"start": {"line": 37,"column":5}, "end": {"line":44,"column":6}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 37,"column":5}, "end": {"line":37,"column":10}},"value":"story"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 37,"column":11}, "end": {"line":44,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 38,"column":7}, "end": {"line":40,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 38,"column":7}, "end": {"line":38,"column":13}},"value":"likers"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 38,"column":14}, "end": {"line":40,"column":8}},"selections":[{"kind":"Field","loc":{"start": {"line": 39,"column":9}, "end": {"line":39,"column":14}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 39,"column":9}, "end": {"line":39,"column":14}},"value":"count"},"arguments":null,"directives":null,"selectionSet":null}]}},{"kind":"Field","loc":{"start": {"line": 41,"column":7}, "end": {"line":43,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 41,"column":7}, "end": {"line":41,"column":19}},"value":"likeSentence"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 41,"column":20}, "end": {"line":43,"column":8}},"selections":[{"kind":"Field","loc":{"start": {"line": 42,"column":9}, "end": {"line":42,"column":13}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 42,"column":9}, "end": {"line":42,"column":13}},"value":"text"},"arguments":null,"directives":null,"selectionSet":null}]}}]}}]}}]}},{"kind":"FragmentDefinition","loc":{"start": {"line": 48,"column":1}, "end": {"line":50,"column":2}},"name":{"kind":"Name","loc":{"start": {"line": 48,"column":10}, "end": {"line":48,"column":14}},"value":"frag"},"typeCondition":{"kind":"NamedType","loc":{"start": {"line": 48,"column":18}, "end": {"line":48,"column":24}},"name":{"kind":"Name","loc":{"start": {"line": 48,"column":18}, "end": {"line":48,"column":24}},"value":"Friend"}},"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 48,"column":25}, "end": {"line":50,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 49,"column":3}, "end": {"line":49,"column":98}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 49,"column":3}, "end": {"line":49,"column":6}},"value":"foo"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 49,"column":7}, "end": {"line":49,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":7}, "end": {"line":49,"column":11}},"value":"size"},"value":{"kind":"Variable","loc":{"start": {"line": 49,"column":13}, "end": {"line":49,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":13}, "end": {"line":49,"column":18}},"value":"size"}}},{"kind":"Argument","loc":{"start": {"line": 49,"column":20}, "end": {"line":49,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":20}, "end": {"line":49,"column":23}},"value":"bar"},"value":{"kind":"Variable","loc":{"start": {"line": 49,"column":25}, "end": {"line":49,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":25}, "end": {"line":49,"column":27}},"value":"b"}}},{"kind":"Argument","loc":{"start": {"line": 49,"column":29}, "end": {"line":49,"column":97}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":29}, "end": {"line":49,"column":32}},"value":"obj"},"value":{"kind":"ObjectValue","loc":{"start": {"line": 49,"column":34}, "end": {"line":49,"column":97}},"fields":[{"kind":"ObjectField","loc":{"start": {"line": 49,"column":35}, "end": {"line":49,"column":47}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":35}, "end": {"line":49,"column":38}},"value":"key"},"value":{"kind":"StringValue","loc":{"start": {"line": 49,"column":40}, "end": {"line":49,"column":47}},"value":"value"}},{"kind":"ObjectField","loc":{"start": {"line": 49,"column":49}, "end": {"line":49,"column":96}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":49}, "end": {"line":49,"column":54}},"value":"block"},"value":{"kind":"StringValue","loc":{"start": {"line": 49,"column":56}, "end": {"line":49,"column":96}},"value":"block string uses \"\"\""}}]}}],"directives":null,"selectionSet":null}]}},{"kind":"OperationDefinition","loc":{"start": {"line": 52,"column":1}, "end": {"line":55,"column":2}},"operation":"query","name":null,"variableDefinitions":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 52,"column":1}, "end": {"line":55,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 53,"column":3}, "end": {"line":53,"column":54}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 53,"column":3}, "end": {"line":53,"column":10}},"value":"unnamed"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 53,"column":11}, "end": {"line":53,"column":23}},"name":{"kind":"Name","loc":{"start": {"line": 53,"column":11}, "end": {"line":53,"column":17}},"value":"truthy"},"value":{"kind":"BooleanValue","loc":{"start": {"line": 53,"column":19}, "end": {"line":53,"column":23}},"value":true}},{"kind":"Argument","loc":{"start": {"line": 53,"column":25}, "end": {"line":53,"column":38}},"name":{"kind":"Name","loc":{"start": {"line": 53,"column":25}, "end": {"line":53,"column":31}},"value":"falsey"},"value":{"kind":"BooleanValue","loc":{"start": {"line": 53,"column":33}, "end": {"line":53,"column":38}},"value":false}},{"kind":"Argument","loc":{"start": {"line": 53,"column":40}, "end": {"line":53,"column":53}},"name":{"kind":"Name","loc":{"start": {"line": 53,"column":40}, "end": {"line":53,"column":47}},"value":"nullish"},"value":{"kind":"NullValue","loc":{"start": {"line": 53,"column":49}, "end": {"line":53,"column":53}}}}],"directives":null,"selectionSet":null},{"kind":"Field","loc":{"start": {"line": 54,"column":3}, "end": {"line":54,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 54,"column":3}, "end": {"line":54,"column":8}},"value":"query"},"arguments":null,"directives":null,"selectionSet":null}]}}]} \ No newline at end of file