graphql-c_parser 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/graphql_c_parser_ext/graphql_c_parser_ext.c +3 -3
- data/ext/graphql_c_parser_ext/lexer.c +149 -104
- data/ext/graphql_c_parser_ext/lexer.h +1 -1
- data/ext/graphql_c_parser_ext/parser.c +435 -428
- data/lib/graphql/c_parser/version.rb +1 -1
- data/lib/graphql/c_parser.rb +27 -12
- metadata +3 -3
@@ -1,6 +1,6 @@
|
|
1
1
|
#line 1 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
2
2
|
|
3
|
-
#line
|
3
|
+
#line 106 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
4
4
|
|
5
5
|
|
6
6
|
|
@@ -682,7 +682,7 @@ static const int graphql_c_lexer_error = -1;
|
|
682
682
|
static const int graphql_c_lexer_en_main = 21;
|
683
683
|
|
684
684
|
|
685
|
-
#line
|
685
|
+
#line 108 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
686
686
|
|
687
687
|
|
688
688
|
#include <ruby.h>
|
@@ -776,8 +776,11 @@ typedef struct Meta {
|
|
776
776
|
char *query_cstr;
|
777
777
|
char *pe;
|
778
778
|
VALUE tokens;
|
779
|
-
VALUE previous_token;
|
780
779
|
int dedup_identifiers;
|
780
|
+
int reject_numbers_followed_by_names;
|
781
|
+
int preceeded_by_number;
|
782
|
+
int max_tokens;
|
783
|
+
int tokens_count;
|
781
784
|
} Meta;
|
782
785
|
|
783
786
|
#define STATIC_VALUE_TOKEN(token_type, content_str) \
|
@@ -793,11 +796,25 @@ token_content = rb_utf8_str_new(ts, te - ts); \
|
|
793
796
|
break;
|
794
797
|
|
795
798
|
void emit(TokenType tt, char *ts, char *te, Meta *meta) {
|
799
|
+
meta->tokens_count++;
|
800
|
+
// -1 indicates that there is no limit:
|
801
|
+
if (meta->max_tokens > 0 && meta->tokens_count > meta->max_tokens) {
|
802
|
+
VALUE mGraphQL = rb_const_get_at(rb_cObject, rb_intern("GraphQL"));
|
803
|
+
VALUE cParseError = rb_const_get_at(mGraphQL, rb_intern("ParseError"));
|
804
|
+
VALUE exception = rb_funcall(
|
805
|
+
cParseError, rb_intern("new"), 4,
|
806
|
+
rb_str_new_cstr("This query is too large to execute."),
|
807
|
+
LONG2NUM(meta->line),
|
808
|
+
LONG2NUM(meta->col),
|
809
|
+
rb_str_new_cstr(meta->query_cstr)
|
810
|
+
);
|
811
|
+
rb_exc_raise(exception);
|
812
|
+
}
|
796
813
|
int quotes_length = 0; // set by string tokens below
|
797
814
|
int line_incr = 0;
|
798
815
|
VALUE token_sym = Qnil;
|
799
816
|
VALUE token_content = Qnil;
|
800
|
-
|
817
|
+
int this_token_is_number = 0;
|
801
818
|
switch(tt) {
|
802
819
|
STATIC_VALUE_TOKEN(ON, "on")
|
803
820
|
STATIC_VALUE_TOKEN(FRAGMENT, "fragment")
|
@@ -846,6 +863,20 @@ void emit(TokenType tt, char *ts, char *te, Meta *meta) {
|
|
846
863
|
token_content = GraphQL_null_str;
|
847
864
|
break;
|
848
865
|
case IDENTIFIER:
|
866
|
+
if (meta->reject_numbers_followed_by_names && meta->preceeded_by_number) {
|
867
|
+
VALUE mGraphQL = rb_const_get_at(rb_cObject, rb_intern("GraphQL"));
|
868
|
+
VALUE mCParser = rb_const_get_at(mGraphQL, rb_intern("CParser"));
|
869
|
+
VALUE prev_token = rb_ary_entry(meta->tokens, -1);
|
870
|
+
VALUE exception = rb_funcall(
|
871
|
+
mCParser, rb_intern("prepare_number_name_parse_error"), 5,
|
872
|
+
LONG2NUM(meta->line),
|
873
|
+
LONG2NUM(meta->col),
|
874
|
+
rb_str_new_cstr(meta->query_cstr),
|
875
|
+
rb_ary_entry(prev_token, 3),
|
876
|
+
rb_utf8_str_new(ts, te - ts)
|
877
|
+
);
|
878
|
+
rb_exc_raise(exception);
|
879
|
+
}
|
849
880
|
token_sym = ID2SYM(rb_intern("IDENTIFIER"));
|
850
881
|
if (meta->dedup_identifiers) {
|
851
882
|
token_content = rb_enc_interned_str(ts, te - ts, rb_utf8_encoding());
|
@@ -853,8 +884,19 @@ void emit(TokenType tt, char *ts, char *te, Meta *meta) {
|
|
853
884
|
token_content = rb_utf8_str_new(ts, te - ts);
|
854
885
|
}
|
855
886
|
break;
|
856
|
-
|
857
|
-
DYNAMIC_VALUE_TOKEN(
|
887
|
+
// Can't use these while we're in backwards-compat mode:
|
888
|
+
// DYNAMIC_VALUE_TOKEN(INT)
|
889
|
+
// DYNAMIC_VALUE_TOKEN(FLOAT)
|
890
|
+
case INT:
|
891
|
+
token_sym = ID2SYM(rb_intern("INT"));
|
892
|
+
token_content = rb_utf8_str_new(ts, te - ts);
|
893
|
+
this_token_is_number = 1;
|
894
|
+
break;
|
895
|
+
case FLOAT:
|
896
|
+
token_sym = ID2SYM(rb_intern("FLOAT"));
|
897
|
+
token_content = rb_utf8_str_new(ts, te - ts);
|
898
|
+
this_token_is_number = 1;
|
899
|
+
break;
|
858
900
|
DYNAMIC_VALUE_TOKEN(COMMENT)
|
859
901
|
case UNKNOWN_CHAR:
|
860
902
|
if (ts[0] == '\0') {
|
@@ -909,40 +951,39 @@ void emit(TokenType tt, char *ts, char *te, Meta *meta) {
|
|
909
951
|
}
|
910
952
|
}
|
911
953
|
|
912
|
-
VALUE token = rb_ary_new_from_args(
|
954
|
+
VALUE token = rb_ary_new_from_args(5,
|
913
955
|
token_sym,
|
914
956
|
rb_int2inum(meta->line),
|
915
957
|
rb_int2inum(meta->col),
|
916
958
|
token_content,
|
917
|
-
meta->previous_token,
|
918
959
|
INT2FIX(200 + (int)tt)
|
919
960
|
);
|
920
961
|
|
921
|
-
// COMMENTs are retained as `previous_token` but aren't pushed to the normal token list
|
922
962
|
if (tt != COMMENT) {
|
923
963
|
rb_ary_push(meta->tokens, token);
|
924
964
|
}
|
925
|
-
meta->
|
965
|
+
meta->preceeded_by_number = this_token_is_number;
|
926
966
|
}
|
927
967
|
// Bump the column counter for the next token
|
928
968
|
meta->col += te - ts;
|
929
969
|
meta->line += line_incr;
|
930
970
|
}
|
931
971
|
|
932
|
-
VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
972
|
+
VALUE tokenize(VALUE query_rbstr, int fstring_identifiers, int reject_numbers_followed_by_names, int max_tokens) {
|
933
973
|
int cs = 0;
|
934
974
|
int act = 0;
|
935
|
-
char *p =
|
936
|
-
|
975
|
+
char *p = StringValuePtr(query_rbstr);
|
976
|
+
long query_len = RSTRING_LEN(query_rbstr);
|
977
|
+
char *pe = p + query_len;
|
937
978
|
char *eof = pe;
|
938
979
|
char *ts = 0;
|
939
980
|
char *te = 0;
|
940
981
|
VALUE tokens = rb_ary_new();
|
941
|
-
struct Meta meta_s = {1, 1, p, pe, tokens,
|
982
|
+
struct Meta meta_s = {1, 1, p, pe, tokens, fstring_identifiers, reject_numbers_followed_by_names, 0, max_tokens, 0};
|
942
983
|
Meta *meta = &meta_s;
|
943
984
|
|
944
985
|
|
945
|
-
#line
|
986
|
+
#line 987 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
946
987
|
{
|
947
988
|
cs = (int)graphql_c_lexer_start;
|
948
989
|
ts = 0;
|
@@ -950,10 +991,10 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
950
991
|
act = 0;
|
951
992
|
}
|
952
993
|
|
953
|
-
#line
|
994
|
+
#line 407 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
954
995
|
|
955
996
|
|
956
|
-
#line
|
997
|
+
#line 998 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
957
998
|
{
|
958
999
|
unsigned int _trans = 0;
|
959
1000
|
const char * _keys;
|
@@ -968,7 +1009,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
968
1009
|
#line 1 "NONE"
|
969
1010
|
{ts = p;}}
|
970
1011
|
|
971
|
-
#line
|
1012
|
+
#line 1013 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
972
1013
|
|
973
1014
|
|
974
1015
|
break;
|
@@ -1006,7 +1047,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1006
1047
|
#line 1 "NONE"
|
1007
1048
|
{te = p+1;}}
|
1008
1049
|
|
1009
|
-
#line
|
1050
|
+
#line 1051 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1010
1051
|
|
1011
1052
|
|
1012
1053
|
break;
|
@@ -1019,7 +1060,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1019
1060
|
emit(RCURLY, ts, te, meta); }
|
1020
1061
|
}}
|
1021
1062
|
|
1022
|
-
#line
|
1063
|
+
#line 1064 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1023
1064
|
|
1024
1065
|
|
1025
1066
|
break;
|
@@ -1032,7 +1073,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1032
1073
|
emit(LCURLY, ts, te, meta); }
|
1033
1074
|
}}
|
1034
1075
|
|
1035
|
-
#line
|
1076
|
+
#line 1077 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1036
1077
|
|
1037
1078
|
|
1038
1079
|
break;
|
@@ -1045,7 +1086,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1045
1086
|
emit(RPAREN, ts, te, meta); }
|
1046
1087
|
}}
|
1047
1088
|
|
1048
|
-
#line
|
1089
|
+
#line 1090 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1049
1090
|
|
1050
1091
|
|
1051
1092
|
break;
|
@@ -1058,7 +1099,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1058
1099
|
emit(LPAREN, ts, te, meta); }
|
1059
1100
|
}}
|
1060
1101
|
|
1061
|
-
#line
|
1102
|
+
#line 1103 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1062
1103
|
|
1063
1104
|
|
1064
1105
|
break;
|
@@ -1071,7 +1112,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1071
1112
|
emit(RBRACKET, ts, te, meta); }
|
1072
1113
|
}}
|
1073
1114
|
|
1074
|
-
#line
|
1115
|
+
#line 1116 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1075
1116
|
|
1076
1117
|
|
1077
1118
|
break;
|
@@ -1084,7 +1125,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1084
1125
|
emit(LBRACKET, ts, te, meta); }
|
1085
1126
|
}}
|
1086
1127
|
|
1087
|
-
#line
|
1128
|
+
#line 1129 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1088
1129
|
|
1089
1130
|
|
1090
1131
|
break;
|
@@ -1097,7 +1138,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1097
1138
|
emit(COLON, ts, te, meta); }
|
1098
1139
|
}}
|
1099
1140
|
|
1100
|
-
#line
|
1141
|
+
#line 1142 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1101
1142
|
|
1102
1143
|
|
1103
1144
|
break;
|
@@ -1110,7 +1151,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1110
1151
|
emit(BLOCK_STRING, ts, te, meta); }
|
1111
1152
|
}}
|
1112
1153
|
|
1113
|
-
#line
|
1154
|
+
#line 1155 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1114
1155
|
|
1115
1156
|
|
1116
1157
|
break;
|
@@ -1123,7 +1164,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1123
1164
|
emit(QUOTED_STRING, ts, te, meta); }
|
1124
1165
|
}}
|
1125
1166
|
|
1126
|
-
#line
|
1167
|
+
#line 1168 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1127
1168
|
|
1128
1169
|
|
1129
1170
|
break;
|
@@ -1136,7 +1177,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1136
1177
|
emit(VAR_SIGN, ts, te, meta); }
|
1137
1178
|
}}
|
1138
1179
|
|
1139
|
-
#line
|
1180
|
+
#line 1181 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1140
1181
|
|
1141
1182
|
|
1142
1183
|
break;
|
@@ -1149,7 +1190,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1149
1190
|
emit(DIR_SIGN, ts, te, meta); }
|
1150
1191
|
}}
|
1151
1192
|
|
1152
|
-
#line
|
1193
|
+
#line 1194 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1153
1194
|
|
1154
1195
|
|
1155
1196
|
break;
|
@@ -1162,7 +1203,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1162
1203
|
emit(ELLIPSIS, ts, te, meta); }
|
1163
1204
|
}}
|
1164
1205
|
|
1165
|
-
#line
|
1206
|
+
#line 1207 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1166
1207
|
|
1167
1208
|
|
1168
1209
|
break;
|
@@ -1175,7 +1216,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1175
1216
|
emit(EQUALS, ts, te, meta); }
|
1176
1217
|
}}
|
1177
1218
|
|
1178
|
-
#line
|
1219
|
+
#line 1220 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1179
1220
|
|
1180
1221
|
|
1181
1222
|
break;
|
@@ -1188,7 +1229,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1188
1229
|
emit(BANG, ts, te, meta); }
|
1189
1230
|
}}
|
1190
1231
|
|
1191
|
-
#line
|
1232
|
+
#line 1233 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1192
1233
|
|
1193
1234
|
|
1194
1235
|
break;
|
@@ -1201,7 +1242,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1201
1242
|
emit(PIPE, ts, te, meta); }
|
1202
1243
|
}}
|
1203
1244
|
|
1204
|
-
#line
|
1245
|
+
#line 1246 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1205
1246
|
|
1206
1247
|
|
1207
1248
|
break;
|
@@ -1214,7 +1255,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1214
1255
|
emit(AMP, ts, te, meta); }
|
1215
1256
|
}}
|
1216
1257
|
|
1217
|
-
#line
|
1258
|
+
#line 1259 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1218
1259
|
|
1219
1260
|
|
1220
1261
|
break;
|
@@ -1227,23 +1268,24 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1227
1268
|
|
1228
1269
|
meta->line += 1;
|
1229
1270
|
meta->col = 1;
|
1271
|
+
meta->preceeded_by_number = 0;
|
1230
1272
|
}
|
1231
1273
|
}}
|
1232
1274
|
|
1233
|
-
#line
|
1275
|
+
#line 1276 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1234
1276
|
|
1235
1277
|
|
1236
1278
|
break;
|
1237
1279
|
}
|
1238
1280
|
case 11: {
|
1239
1281
|
{
|
1240
|
-
#line
|
1282
|
+
#line 104 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1241
1283
|
{te = p+1;{
|
1242
|
-
#line
|
1284
|
+
#line 104 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1243
1285
|
emit(UNKNOWN_CHAR, ts, te, meta); }
|
1244
1286
|
}}
|
1245
1287
|
|
1246
|
-
#line
|
1288
|
+
#line 1289 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1247
1289
|
|
1248
1290
|
|
1249
1291
|
break;
|
@@ -1256,7 +1298,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1256
1298
|
emit(INT, ts, te, meta); }
|
1257
1299
|
}}
|
1258
1300
|
|
1259
|
-
#line
|
1301
|
+
#line 1302 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1260
1302
|
|
1261
1303
|
|
1262
1304
|
break;
|
@@ -1269,7 +1311,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1269
1311
|
emit(FLOAT, ts, te, meta); }
|
1270
1312
|
}}
|
1271
1313
|
|
1272
|
-
#line
|
1314
|
+
#line 1315 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1273
1315
|
|
1274
1316
|
|
1275
1317
|
break;
|
@@ -1282,7 +1324,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1282
1324
|
emit(BLOCK_STRING, ts, te, meta); }
|
1283
1325
|
}}
|
1284
1326
|
|
1285
|
-
#line
|
1327
|
+
#line 1328 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1286
1328
|
|
1287
1329
|
|
1288
1330
|
break;
|
@@ -1295,7 +1337,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1295
1337
|
emit(QUOTED_STRING, ts, te, meta); }
|
1296
1338
|
}}
|
1297
1339
|
|
1298
|
-
#line
|
1340
|
+
#line 1341 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1299
1341
|
|
1300
1342
|
|
1301
1343
|
break;
|
@@ -1308,7 +1350,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1308
1350
|
emit(IDENTIFIER, ts, te, meta); }
|
1309
1351
|
}}
|
1310
1352
|
|
1311
|
-
#line
|
1353
|
+
#line 1354 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1312
1354
|
|
1313
1355
|
|
1314
1356
|
break;
|
@@ -1321,33 +1363,36 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1321
1363
|
emit(COMMENT, ts, te, meta); }
|
1322
1364
|
}}
|
1323
1365
|
|
1324
|
-
#line
|
1366
|
+
#line 1367 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1325
1367
|
|
1326
1368
|
|
1327
1369
|
break;
|
1328
1370
|
}
|
1329
1371
|
case 27: {
|
1330
1372
|
{
|
1331
|
-
#line
|
1373
|
+
#line 99 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1332
1374
|
{te = p;p = p - 1;{
|
1333
|
-
#line
|
1334
|
-
|
1375
|
+
#line 99 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1376
|
+
|
1377
|
+
meta->col += te - ts;
|
1378
|
+
meta->preceeded_by_number = 0;
|
1379
|
+
}
|
1335
1380
|
}}
|
1336
1381
|
|
1337
|
-
#line
|
1382
|
+
#line 1383 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1338
1383
|
|
1339
1384
|
|
1340
1385
|
break;
|
1341
1386
|
}
|
1342
1387
|
case 28: {
|
1343
1388
|
{
|
1344
|
-
#line
|
1389
|
+
#line 104 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1345
1390
|
{te = p;p = p - 1;{
|
1346
|
-
#line
|
1391
|
+
#line 104 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1347
1392
|
emit(UNKNOWN_CHAR, ts, te, meta); }
|
1348
1393
|
}}
|
1349
1394
|
|
1350
|
-
#line
|
1395
|
+
#line 1396 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1351
1396
|
|
1352
1397
|
|
1353
1398
|
break;
|
@@ -1361,7 +1406,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1361
1406
|
emit(INT, ts, te, meta); }
|
1362
1407
|
}}
|
1363
1408
|
|
1364
|
-
#line
|
1409
|
+
#line 1410 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1365
1410
|
|
1366
1411
|
|
1367
1412
|
break;
|
@@ -1375,21 +1420,21 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1375
1420
|
emit(FLOAT, ts, te, meta); }
|
1376
1421
|
}}
|
1377
1422
|
|
1378
|
-
#line
|
1423
|
+
#line 1424 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1379
1424
|
|
1380
1425
|
|
1381
1426
|
break;
|
1382
1427
|
}
|
1383
1428
|
case 1: {
|
1384
1429
|
{
|
1385
|
-
#line
|
1430
|
+
#line 104 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1386
1431
|
{p = ((te))-1;
|
1387
1432
|
{
|
1388
|
-
#line
|
1433
|
+
#line 104 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1389
1434
|
emit(UNKNOWN_CHAR, ts, te, meta); }
|
1390
1435
|
}}
|
1391
1436
|
|
1392
|
-
#line
|
1437
|
+
#line 1438 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1393
1438
|
|
1394
1439
|
|
1395
1440
|
break;
|
@@ -1555,7 +1600,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1555
1600
|
}}
|
1556
1601
|
}
|
1557
1602
|
|
1558
|
-
#line
|
1603
|
+
#line 1604 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1559
1604
|
|
1560
1605
|
|
1561
1606
|
break;
|
@@ -1565,13 +1610,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1565
1610
|
#line 1 "NONE"
|
1566
1611
|
{te = p+1;}}
|
1567
1612
|
|
1568
|
-
#line
|
1613
|
+
#line 1614 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1569
1614
|
|
1570
1615
|
{
|
1571
1616
|
#line 56 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1572
1617
|
{act = 3;}}
|
1573
1618
|
|
1574
|
-
#line
|
1619
|
+
#line 1620 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1575
1620
|
|
1576
1621
|
|
1577
1622
|
break;
|
@@ -1581,13 +1626,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1581
1626
|
#line 1 "NONE"
|
1582
1627
|
{te = p+1;}}
|
1583
1628
|
|
1584
|
-
#line
|
1629
|
+
#line 1630 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1585
1630
|
|
1586
1631
|
{
|
1587
1632
|
#line 57 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1588
1633
|
{act = 4;}}
|
1589
1634
|
|
1590
|
-
#line
|
1635
|
+
#line 1636 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1591
1636
|
|
1592
1637
|
|
1593
1638
|
break;
|
@@ -1597,13 +1642,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1597
1642
|
#line 1 "NONE"
|
1598
1643
|
{te = p+1;}}
|
1599
1644
|
|
1600
|
-
#line
|
1645
|
+
#line 1646 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1601
1646
|
|
1602
1647
|
{
|
1603
1648
|
#line 58 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1604
1649
|
{act = 5;}}
|
1605
1650
|
|
1606
|
-
#line
|
1651
|
+
#line 1652 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1607
1652
|
|
1608
1653
|
|
1609
1654
|
break;
|
@@ -1613,13 +1658,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1613
1658
|
#line 1 "NONE"
|
1614
1659
|
{te = p+1;}}
|
1615
1660
|
|
1616
|
-
#line
|
1661
|
+
#line 1662 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1617
1662
|
|
1618
1663
|
{
|
1619
1664
|
#line 59 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1620
1665
|
{act = 6;}}
|
1621
1666
|
|
1622
|
-
#line
|
1667
|
+
#line 1668 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1623
1668
|
|
1624
1669
|
|
1625
1670
|
break;
|
@@ -1629,13 +1674,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1629
1674
|
#line 1 "NONE"
|
1630
1675
|
{te = p+1;}}
|
1631
1676
|
|
1632
|
-
#line
|
1677
|
+
#line 1678 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1633
1678
|
|
1634
1679
|
{
|
1635
1680
|
#line 60 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1636
1681
|
{act = 7;}}
|
1637
1682
|
|
1638
|
-
#line
|
1683
|
+
#line 1684 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1639
1684
|
|
1640
1685
|
|
1641
1686
|
break;
|
@@ -1645,13 +1690,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1645
1690
|
#line 1 "NONE"
|
1646
1691
|
{te = p+1;}}
|
1647
1692
|
|
1648
|
-
#line
|
1693
|
+
#line 1694 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1649
1694
|
|
1650
1695
|
{
|
1651
1696
|
#line 61 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1652
1697
|
{act = 8;}}
|
1653
1698
|
|
1654
|
-
#line
|
1699
|
+
#line 1700 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1655
1700
|
|
1656
1701
|
|
1657
1702
|
break;
|
@@ -1661,13 +1706,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1661
1706
|
#line 1 "NONE"
|
1662
1707
|
{te = p+1;}}
|
1663
1708
|
|
1664
|
-
#line
|
1709
|
+
#line 1710 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1665
1710
|
|
1666
1711
|
{
|
1667
1712
|
#line 62 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1668
1713
|
{act = 9;}}
|
1669
1714
|
|
1670
|
-
#line
|
1715
|
+
#line 1716 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1671
1716
|
|
1672
1717
|
|
1673
1718
|
break;
|
@@ -1677,13 +1722,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1677
1722
|
#line 1 "NONE"
|
1678
1723
|
{te = p+1;}}
|
1679
1724
|
|
1680
|
-
#line
|
1725
|
+
#line 1726 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1681
1726
|
|
1682
1727
|
{
|
1683
1728
|
#line 63 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1684
1729
|
{act = 10;}}
|
1685
1730
|
|
1686
|
-
#line
|
1731
|
+
#line 1732 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1687
1732
|
|
1688
1733
|
|
1689
1734
|
break;
|
@@ -1693,13 +1738,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1693
1738
|
#line 1 "NONE"
|
1694
1739
|
{te = p+1;}}
|
1695
1740
|
|
1696
|
-
#line
|
1741
|
+
#line 1742 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1697
1742
|
|
1698
1743
|
{
|
1699
1744
|
#line 64 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1700
1745
|
{act = 11;}}
|
1701
1746
|
|
1702
|
-
#line
|
1747
|
+
#line 1748 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1703
1748
|
|
1704
1749
|
|
1705
1750
|
break;
|
@@ -1709,13 +1754,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1709
1754
|
#line 1 "NONE"
|
1710
1755
|
{te = p+1;}}
|
1711
1756
|
|
1712
|
-
#line
|
1757
|
+
#line 1758 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1713
1758
|
|
1714
1759
|
{
|
1715
1760
|
#line 65 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1716
1761
|
{act = 12;}}
|
1717
1762
|
|
1718
|
-
#line
|
1763
|
+
#line 1764 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1719
1764
|
|
1720
1765
|
|
1721
1766
|
break;
|
@@ -1725,13 +1770,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1725
1770
|
#line 1 "NONE"
|
1726
1771
|
{te = p+1;}}
|
1727
1772
|
|
1728
|
-
#line
|
1773
|
+
#line 1774 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1729
1774
|
|
1730
1775
|
{
|
1731
1776
|
#line 66 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1732
1777
|
{act = 13;}}
|
1733
1778
|
|
1734
|
-
#line
|
1779
|
+
#line 1780 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1735
1780
|
|
1736
1781
|
|
1737
1782
|
break;
|
@@ -1741,13 +1786,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1741
1786
|
#line 1 "NONE"
|
1742
1787
|
{te = p+1;}}
|
1743
1788
|
|
1744
|
-
#line
|
1789
|
+
#line 1790 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1745
1790
|
|
1746
1791
|
{
|
1747
1792
|
#line 67 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1748
1793
|
{act = 14;}}
|
1749
1794
|
|
1750
|
-
#line
|
1795
|
+
#line 1796 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1751
1796
|
|
1752
1797
|
|
1753
1798
|
break;
|
@@ -1757,13 +1802,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1757
1802
|
#line 1 "NONE"
|
1758
1803
|
{te = p+1;}}
|
1759
1804
|
|
1760
|
-
#line
|
1805
|
+
#line 1806 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1761
1806
|
|
1762
1807
|
{
|
1763
1808
|
#line 68 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1764
1809
|
{act = 15;}}
|
1765
1810
|
|
1766
|
-
#line
|
1811
|
+
#line 1812 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1767
1812
|
|
1768
1813
|
|
1769
1814
|
break;
|
@@ -1773,13 +1818,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1773
1818
|
#line 1 "NONE"
|
1774
1819
|
{te = p+1;}}
|
1775
1820
|
|
1776
|
-
#line
|
1821
|
+
#line 1822 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1777
1822
|
|
1778
1823
|
{
|
1779
1824
|
#line 69 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1780
1825
|
{act = 16;}}
|
1781
1826
|
|
1782
|
-
#line
|
1827
|
+
#line 1828 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1783
1828
|
|
1784
1829
|
|
1785
1830
|
break;
|
@@ -1789,13 +1834,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1789
1834
|
#line 1 "NONE"
|
1790
1835
|
{te = p+1;}}
|
1791
1836
|
|
1792
|
-
#line
|
1837
|
+
#line 1838 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1793
1838
|
|
1794
1839
|
{
|
1795
1840
|
#line 70 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1796
1841
|
{act = 17;}}
|
1797
1842
|
|
1798
|
-
#line
|
1843
|
+
#line 1844 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1799
1844
|
|
1800
1845
|
|
1801
1846
|
break;
|
@@ -1805,13 +1850,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1805
1850
|
#line 1 "NONE"
|
1806
1851
|
{te = p+1;}}
|
1807
1852
|
|
1808
|
-
#line
|
1853
|
+
#line 1854 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1809
1854
|
|
1810
1855
|
{
|
1811
1856
|
#line 71 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1812
1857
|
{act = 18;}}
|
1813
1858
|
|
1814
|
-
#line
|
1859
|
+
#line 1860 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1815
1860
|
|
1816
1861
|
|
1817
1862
|
break;
|
@@ -1821,13 +1866,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1821
1866
|
#line 1 "NONE"
|
1822
1867
|
{te = p+1;}}
|
1823
1868
|
|
1824
|
-
#line
|
1869
|
+
#line 1870 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1825
1870
|
|
1826
1871
|
{
|
1827
1872
|
#line 72 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1828
1873
|
{act = 19;}}
|
1829
1874
|
|
1830
|
-
#line
|
1875
|
+
#line 1876 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1831
1876
|
|
1832
1877
|
|
1833
1878
|
break;
|
@@ -1837,13 +1882,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1837
1882
|
#line 1 "NONE"
|
1838
1883
|
{te = p+1;}}
|
1839
1884
|
|
1840
|
-
#line
|
1885
|
+
#line 1886 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1841
1886
|
|
1842
1887
|
{
|
1843
1888
|
#line 73 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1844
1889
|
{act = 20;}}
|
1845
1890
|
|
1846
|
-
#line
|
1891
|
+
#line 1892 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1847
1892
|
|
1848
1893
|
|
1849
1894
|
break;
|
@@ -1853,13 +1898,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1853
1898
|
#line 1 "NONE"
|
1854
1899
|
{te = p+1;}}
|
1855
1900
|
|
1856
|
-
#line
|
1901
|
+
#line 1902 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1857
1902
|
|
1858
1903
|
{
|
1859
1904
|
#line 74 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1860
1905
|
{act = 21;}}
|
1861
1906
|
|
1862
|
-
#line
|
1907
|
+
#line 1908 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1863
1908
|
|
1864
1909
|
|
1865
1910
|
break;
|
@@ -1869,13 +1914,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1869
1914
|
#line 1 "NONE"
|
1870
1915
|
{te = p+1;}}
|
1871
1916
|
|
1872
|
-
#line
|
1917
|
+
#line 1918 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1873
1918
|
|
1874
1919
|
{
|
1875
1920
|
#line 82 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1876
1921
|
{act = 29;}}
|
1877
1922
|
|
1878
|
-
#line
|
1923
|
+
#line 1924 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1879
1924
|
|
1880
1925
|
|
1881
1926
|
break;
|
@@ -1885,13 +1930,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1885
1930
|
#line 1 "NONE"
|
1886
1931
|
{te = p+1;}}
|
1887
1932
|
|
1888
|
-
#line
|
1933
|
+
#line 1934 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1889
1934
|
|
1890
1935
|
{
|
1891
1936
|
#line 83 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1892
1937
|
{act = 30;}}
|
1893
1938
|
|
1894
|
-
#line
|
1939
|
+
#line 1940 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1895
1940
|
|
1896
1941
|
|
1897
1942
|
break;
|
@@ -1901,13 +1946,13 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1901
1946
|
#line 1 "NONE"
|
1902
1947
|
{te = p+1;}}
|
1903
1948
|
|
1904
|
-
#line
|
1949
|
+
#line 1950 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1905
1950
|
|
1906
1951
|
{
|
1907
1952
|
#line 91 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1908
1953
|
{act = 38;}}
|
1909
1954
|
|
1910
|
-
#line
|
1955
|
+
#line 1956 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1911
1956
|
|
1912
1957
|
|
1913
1958
|
break;
|
@@ -1927,7 +1972,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1927
1972
|
#line 1 "NONE"
|
1928
1973
|
{ts = 0;}}
|
1929
1974
|
|
1930
|
-
#line
|
1975
|
+
#line 1976 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.c"
|
1931
1976
|
|
1932
1977
|
|
1933
1978
|
break;
|
@@ -1940,7 +1985,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers) {
|
|
1940
1985
|
_out: {}
|
1941
1986
|
}
|
1942
1987
|
|
1943
|
-
#line
|
1988
|
+
#line 408 "graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl"
|
1944
1989
|
|
1945
1990
|
|
1946
1991
|
return tokens;
|