ferret 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/index.c +19 -11
- data/ext/priorityqueue.c +1 -1
- data/ext/q_parser.c +102 -98
- data/ext/r_index.c +1 -1
- data/ext/r_qparser.c +1 -1
- data/ext/search.c +2 -2
- data/lib/ferret/document.rb +5 -5
- data/lib/ferret/index.rb +7 -2
- data/test/unit/analysis/tc_analyzer.rb +5 -5
- data/test/unit/analysis/tc_token_stream.rb +19 -17
- data/test/unit/index/tc_index.rb +23 -5
- data/test/unit/index/tc_index_reader.rb +1 -0
- data/test/unit/query_parser/tc_query_parser.rb +15 -0
- metadata +137 -138
- data/ext/tags +0 -7841
data/ext/index.c
CHANGED
@@ -575,7 +575,7 @@ void sis_del_at(SegmentInfos *sis, int at)
|
|
575
575
|
}
|
576
576
|
}
|
577
577
|
|
578
|
-
void sis_del_from_to(SegmentInfos *sis, int from,
|
578
|
+
void sis_del_from_to(SegmentInfos *sis, int from, int to)
|
579
579
|
{
|
580
580
|
int i, num_to_del = to - from;
|
581
581
|
const int sis_size = sis->size -= num_to_del;
|
@@ -1138,9 +1138,9 @@ void fw_write_tv_index(FieldsWriter *fw)
|
|
1138
1138
|
void fw_add_postings(FieldsWriter *fw,
|
1139
1139
|
int field_num,
|
1140
1140
|
PostingList **plists,
|
1141
|
-
|
1141
|
+
int posting_count,
|
1142
1142
|
Offset *offsets,
|
1143
|
-
|
1143
|
+
int offset_count)
|
1144
1144
|
{
|
1145
1145
|
int i, delta_start, delta_length;
|
1146
1146
|
const char *last_term = EMPTY_STRING;
|
@@ -1184,8 +1184,8 @@ void fw_add_postings(FieldsWriter *fw,
|
|
1184
1184
|
|
1185
1185
|
if (fi_store_offsets(fi)) {
|
1186
1186
|
/* use delta encoding for offsets */
|
1187
|
+
int last_end = 0;
|
1187
1188
|
os_write_vint(fdt_out, offset_count); /* write shared prefix length */
|
1188
|
-
int last_end = 0;
|
1189
1189
|
for (i = 0; i < offset_count; i++) {
|
1190
1190
|
int start = offsets[i].start;
|
1191
1191
|
int end = offsets[i].end;
|
@@ -1852,6 +1852,10 @@ void tir_close(TermInfosReader *tir)
|
|
1852
1852
|
{
|
1853
1853
|
ary_destroy(tir->te_bucket, (free_ft)&ste_close);
|
1854
1854
|
ste_close(tir->orig_te);
|
1855
|
+
|
1856
|
+
/* fix for some dodgy old versions of pthread */
|
1857
|
+
thread_setspecific(tir->thread_te, NULL);
|
1858
|
+
|
1855
1859
|
thread_key_delete(tir->thread_te);
|
1856
1860
|
free(tir);
|
1857
1861
|
}
|
@@ -3335,6 +3339,7 @@ static void sr_close_i(IndexReader *ir)
|
|
3335
3339
|
h_destroy(sr->norms);
|
3336
3340
|
|
3337
3341
|
if (sr->fr_bucket) {
|
3342
|
+
thread_setspecific(sr->thread_fr, NULL);
|
3338
3343
|
thread_key_delete(sr->thread_fr);
|
3339
3344
|
ary_destroy(sr->fr_bucket, (free_ft)&fr_close);
|
3340
3345
|
}
|
@@ -3489,10 +3494,11 @@ static void sr_open_norms(IndexReader *ir, Store *cfs_store)
|
|
3489
3494
|
char file_name[SEGMENT_NAME_MAX_LENGTH];
|
3490
3495
|
FieldInfos *fis = ir->fis;
|
3491
3496
|
char *ext_ptr;
|
3497
|
+
const int field_cnt = fis->size;
|
3498
|
+
|
3492
3499
|
sprintf(file_name, "%s.", SR(ir)->segment);
|
3493
3500
|
ext_ptr = file_name + strlen(file_name);
|
3494
3501
|
|
3495
|
-
const int field_cnt = fis->size;
|
3496
3502
|
for (i = 0; i < field_cnt; i++) {
|
3497
3503
|
Store *store = ir->store;
|
3498
3504
|
if (fi_has_norms(fis->fields[i])) {
|
@@ -3931,9 +3937,10 @@ IndexReader *mr_open(IndexReader **sub_readers, const int r_cnt)
|
|
3931
3937
|
if (need_field_map) {
|
3932
3938
|
mr->field_num_map = ALLOC_N(int *, r_cnt);
|
3933
3939
|
for (i = 0; i < r_cnt; i++) {
|
3934
|
-
mr->field_num_map[i] = ALLOC_N(int, fis->size);
|
3935
3940
|
FieldInfos *sub_fis = sub_readers[i]->fis;
|
3936
3941
|
const int fis_size = fis->size;
|
3942
|
+
|
3943
|
+
mr->field_num_map[i] = ALLOC_N(int, fis_size);
|
3937
3944
|
for (j = 0; j < fis_size; j++) {
|
3938
3945
|
FieldInfo *fi = fis->fields[j];
|
3939
3946
|
FieldInfo *fi_sub = fis_get_field(sub_fis, fi->name);
|
@@ -4438,13 +4445,14 @@ HashTable *dw_invert_field(DocWriter *dw,
|
|
4438
4445
|
fld_inv->length = num_terms;
|
4439
4446
|
}
|
4440
4447
|
else {
|
4448
|
+
char buf[MAX_WORD_SIZE];
|
4449
|
+
buf[MAX_WORD_SIZE - 1] = '\0';
|
4441
4450
|
for (i = 0; i < df_size; i++) {
|
4442
4451
|
int len = df->lengths[i];
|
4443
|
-
char buf[MAX_WORD_SIZE];
|
4444
4452
|
char *data_ptr = df->data[i];
|
4445
4453
|
if (len > MAX_WORD_SIZE) {
|
4446
4454
|
len = MAX_WORD_SIZE - 1;
|
4447
|
-
data_ptr = memcpy(buf, df->data[i],
|
4455
|
+
data_ptr = memcpy(buf, df->data[i], len);
|
4448
4456
|
}
|
4449
4457
|
dw_add_posting(mp, curr_plists, fld_plists, doc_num, data_ptr,
|
4450
4458
|
len, i);
|
@@ -5448,9 +5456,9 @@ static void iw_cp_fields(IndexWriter *iw, SegmentReader *sr,
|
|
5448
5456
|
/* Write TermVectors */
|
5449
5457
|
/* write TVs up to TV index */
|
5450
5458
|
is2os_copy_bytes(fdt_in, fdt_out,
|
5451
|
-
is_read_u64(fdx_in)
|
5452
|
-
|
5453
|
-
|
5459
|
+
(int)(is_read_u64(fdx_in)
|
5460
|
+
+ (f_u64)is_read_u32(fdx_in)
|
5461
|
+
- (f_u64)is_pos(fdt_in)));
|
5454
5462
|
|
5455
5463
|
/* Write TV index pos */
|
5456
5464
|
os_write_u32(fdx_out, (f_u32)(os_pos(fdt_out) - doc_start_ptr));
|
data/ext/priorityqueue.c
CHANGED
data/ext/q_parser.c
CHANGED
@@ -133,7 +133,7 @@ typedef union YYSTYPE {
|
|
133
133
|
char *str;
|
134
134
|
} YYSTYPE;
|
135
135
|
/* Line 196 of yacc.c. */
|
136
|
-
#line 137 "
|
136
|
+
#line 137 "src/q_parser.c"
|
137
137
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
138
138
|
# define YYSTYPE_IS_DECLARED 1
|
139
139
|
# define YYSTYPE_IS_TRIVIAL 1
|
@@ -188,12 +188,16 @@ static Query *get_range_q(const char *field, const char *from, const char *to,
|
|
188
188
|
sq = func;\
|
189
189
|
if (sq) bq_add_query_nr(q, sq, BC_SHOULD);\
|
190
190
|
}\
|
191
|
+
if (((BooleanQuery *)q)->clause_cnt == 0) {\
|
192
|
+
q_deref(q);\
|
193
|
+
q = NULL;\
|
194
|
+
}\
|
191
195
|
}\
|
192
196
|
} while (0)
|
193
197
|
|
194
198
|
|
195
199
|
/* Line 219 of yacc.c. */
|
196
|
-
#line
|
200
|
+
#line 201 "src/q_parser.c"
|
197
201
|
|
198
202
|
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
|
199
203
|
# define YYSIZE_T __SIZE_TYPE__
|
@@ -432,12 +436,12 @@ static const yysigned_char yyrhs[] =
|
|
432
436
|
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
|
433
437
|
static const unsigned char yyrline[] =
|
434
438
|
{
|
435
|
-
0,
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
439
|
+
0, 99, 99, 100, 102, 103, 104, 105, 107, 108,
|
440
|
+
109, 111, 112, 114, 115, 116, 117, 118, 119, 121,
|
441
|
+
122, 123, 125, 127, 127, 129, 129, 129, 132, 133,
|
442
|
+
135, 136, 137, 138, 140, 141, 142, 143, 144, 146,
|
443
|
+
147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
|
444
|
+
157
|
441
445
|
};
|
442
446
|
#endif
|
443
447
|
|
@@ -1245,218 +1249,218 @@ yyreduce:
|
|
1245
1249
|
switch (yyn)
|
1246
1250
|
{
|
1247
1251
|
case 2:
|
1248
|
-
#line
|
1249
|
-
{ qp->result = (yyval.query) = NULL; }
|
1252
|
+
#line 99 "src/q_parser.y"
|
1253
|
+
{ qp->result = (yyval.query) = NULL; ;}
|
1250
1254
|
break;
|
1251
1255
|
|
1252
1256
|
case 3:
|
1253
|
-
#line
|
1254
|
-
{ qp->result = (yyval.query) = get_bool_q((yyvsp[0].bclss)); }
|
1257
|
+
#line 100 "src/q_parser.y"
|
1258
|
+
{ qp->result = (yyval.query) = get_bool_q((yyvsp[0].bclss)); ;}
|
1255
1259
|
break;
|
1256
1260
|
|
1257
1261
|
case 4:
|
1258
|
-
#line
|
1259
|
-
{ (yyval.bclss) = first_cls((yyvsp[0].bcls)); }
|
1262
|
+
#line 102 "src/q_parser.y"
|
1263
|
+
{ (yyval.bclss) = first_cls((yyvsp[0].bcls)); ;}
|
1260
1264
|
break;
|
1261
1265
|
|
1262
1266
|
case 5:
|
1263
|
-
#line
|
1264
|
-
{ (yyval.bclss) = add_and_cls((yyvsp[-2].bclss), (yyvsp[0].bcls)); }
|
1267
|
+
#line 103 "src/q_parser.y"
|
1268
|
+
{ (yyval.bclss) = add_and_cls((yyvsp[-2].bclss), (yyvsp[0].bcls)); ;}
|
1265
1269
|
break;
|
1266
1270
|
|
1267
1271
|
case 6:
|
1268
|
-
#line
|
1269
|
-
{ (yyval.bclss) = add_or_cls((yyvsp[-2].bclss), (yyvsp[0].bcls)); }
|
1272
|
+
#line 104 "src/q_parser.y"
|
1273
|
+
{ (yyval.bclss) = add_or_cls((yyvsp[-2].bclss), (yyvsp[0].bcls)); ;}
|
1270
1274
|
break;
|
1271
1275
|
|
1272
1276
|
case 7:
|
1273
|
-
#line
|
1274
|
-
{ (yyval.bclss) = add_default_cls(qp, (yyvsp[-1].bclss), (yyvsp[0].bcls)); }
|
1277
|
+
#line 105 "src/q_parser.y"
|
1278
|
+
{ (yyval.bclss) = add_default_cls(qp, (yyvsp[-1].bclss), (yyvsp[0].bcls)); ;}
|
1275
1279
|
break;
|
1276
1280
|
|
1277
1281
|
case 8:
|
1278
|
-
#line
|
1279
|
-
{ (yyval.bcls) = get_bool_cls((yyvsp[0].query), BC_MUST); }
|
1282
|
+
#line 107 "src/q_parser.y"
|
1283
|
+
{ (yyval.bcls) = get_bool_cls((yyvsp[0].query), BC_MUST); ;}
|
1280
1284
|
break;
|
1281
1285
|
|
1282
1286
|
case 9:
|
1283
|
-
#line
|
1284
|
-
{ (yyval.bcls) = get_bool_cls((yyvsp[0].query), BC_MUST_NOT); }
|
1287
|
+
#line 108 "src/q_parser.y"
|
1288
|
+
{ (yyval.bcls) = get_bool_cls((yyvsp[0].query), BC_MUST_NOT); ;}
|
1285
1289
|
break;
|
1286
1290
|
|
1287
1291
|
case 10:
|
1288
|
-
#line
|
1289
|
-
{ (yyval.bcls) = get_bool_cls((yyvsp[0].query), BC_SHOULD); }
|
1292
|
+
#line 109 "src/q_parser.y"
|
1293
|
+
{ (yyval.bcls) = get_bool_cls((yyvsp[0].query), BC_SHOULD); ;}
|
1290
1294
|
break;
|
1291
1295
|
|
1292
1296
|
case 12:
|
1293
|
-
#line
|
1294
|
-
{ if ((yyvsp[-2].query)) sscanf((yyvsp[0].str),"%f",&((yyvsp[-2].query)->boost)); (yyval.query)=(yyvsp[-2].query); }
|
1297
|
+
#line 112 "src/q_parser.y"
|
1298
|
+
{ if ((yyvsp[-2].query)) sscanf((yyvsp[0].str),"%f",&((yyvsp[-2].query)->boost)); (yyval.query)=(yyvsp[-2].query); ;}
|
1295
1299
|
break;
|
1296
1300
|
|
1297
1301
|
case 14:
|
1298
|
-
#line
|
1299
|
-
{ (yyval.query) = get_bool_q((yyvsp[-1].bclss)); }
|
1302
|
+
#line 115 "src/q_parser.y"
|
1303
|
+
{ (yyval.query) = get_bool_q((yyvsp[-1].bclss)); ;}
|
1300
1304
|
break;
|
1301
1305
|
|
1302
1306
|
case 19:
|
1303
|
-
#line
|
1304
|
-
{ FLDS((yyval.query), get_term_q(qp, field, (yyvsp[0].str))); }
|
1307
|
+
#line 121 "src/q_parser.y"
|
1308
|
+
{ FLDS((yyval.query), get_term_q(qp, field, (yyvsp[0].str))); ;}
|
1305
1309
|
break;
|
1306
1310
|
|
1307
1311
|
case 20:
|
1308
|
-
#line
|
1309
|
-
{ FLDS((yyval.query), get_fuzzy_q(qp, field, (yyvsp[-2].str), (yyvsp[0].str))); }
|
1312
|
+
#line 122 "src/q_parser.y"
|
1313
|
+
{ FLDS((yyval.query), get_fuzzy_q(qp, field, (yyvsp[-2].str), (yyvsp[0].str))); ;}
|
1310
1314
|
break;
|
1311
1315
|
|
1312
1316
|
case 21:
|
1313
|
-
#line
|
1314
|
-
{ FLDS((yyval.query), get_fuzzy_q(qp, field, (yyvsp[-1].str), NULL)); }
|
1317
|
+
#line 123 "src/q_parser.y"
|
1318
|
+
{ FLDS((yyval.query), get_fuzzy_q(qp, field, (yyvsp[-1].str), NULL)); ;}
|
1315
1319
|
break;
|
1316
1320
|
|
1317
1321
|
case 22:
|
1318
|
-
#line
|
1319
|
-
{ FLDS((yyval.query), get_wild_q(qp, field, (yyvsp[0].str))); }
|
1322
|
+
#line 125 "src/q_parser.y"
|
1323
|
+
{ FLDS((yyval.query), get_wild_q(qp, field, (yyvsp[0].str))); ;}
|
1320
1324
|
break;
|
1321
1325
|
|
1322
1326
|
case 23:
|
1323
|
-
#line
|
1324
|
-
{ qp->fields = qp->def_fields; }
|
1327
|
+
#line 127 "src/q_parser.y"
|
1328
|
+
{ qp->fields = qp->def_fields; ;}
|
1325
1329
|
break;
|
1326
1330
|
|
1327
1331
|
case 24:
|
1328
|
-
#line
|
1329
|
-
{ (yyval.query) = (yyvsp[-1].query); }
|
1332
|
+
#line 128 "src/q_parser.y"
|
1333
|
+
{ (yyval.query) = (yyvsp[-1].query); ;}
|
1330
1334
|
break;
|
1331
1335
|
|
1332
1336
|
case 25:
|
1333
|
-
#line
|
1334
|
-
{ qp->fields = qp->all_fields; }
|
1337
|
+
#line 129 "src/q_parser.y"
|
1338
|
+
{ qp->fields = qp->all_fields; ;}
|
1335
1339
|
break;
|
1336
1340
|
|
1337
1341
|
case 26:
|
1338
|
-
#line
|
1339
|
-
{qp->fields = qp->def_fields
|
1342
|
+
#line 129 "src/q_parser.y"
|
1343
|
+
{qp->fields = qp->def_fields;;}
|
1340
1344
|
break;
|
1341
1345
|
|
1342
1346
|
case 27:
|
1343
|
-
#line
|
1344
|
-
{ (yyval.query) = (yyvsp[-1].query); }
|
1347
|
+
#line 130 "src/q_parser.y"
|
1348
|
+
{ (yyval.query) = (yyvsp[-1].query); ;}
|
1345
1349
|
break;
|
1346
1350
|
|
1347
1351
|
case 28:
|
1348
|
-
#line
|
1349
|
-
{ (yyval.hashset) = first_field(qp, (yyvsp[0].str)); }
|
1352
|
+
#line 132 "src/q_parser.y"
|
1353
|
+
{ (yyval.hashset) = first_field(qp, (yyvsp[0].str)); ;}
|
1350
1354
|
break;
|
1351
1355
|
|
1352
1356
|
case 29:
|
1353
|
-
#line
|
1354
|
-
{ (yyval.hashset) = add_field(qp, (yyvsp[0].str))
|
1357
|
+
#line 133 "src/q_parser.y"
|
1358
|
+
{ (yyval.hashset) = add_field(qp, (yyvsp[0].str));;}
|
1355
1359
|
break;
|
1356
1360
|
|
1357
1361
|
case 30:
|
1358
|
-
#line
|
1359
|
-
{ (yyval.query) = get_phrase_q(qp, (yyvsp[-1].phrase), NULL); }
|
1362
|
+
#line 135 "src/q_parser.y"
|
1363
|
+
{ (yyval.query) = get_phrase_q(qp, (yyvsp[-1].phrase), NULL); ;}
|
1360
1364
|
break;
|
1361
1365
|
|
1362
1366
|
case 31:
|
1363
|
-
#line
|
1364
|
-
{ (yyval.query) = get_phrase_q(qp, (yyvsp[-3].phrase), (yyvsp[0].str)); }
|
1367
|
+
#line 136 "src/q_parser.y"
|
1368
|
+
{ (yyval.query) = get_phrase_q(qp, (yyvsp[-3].phrase), (yyvsp[0].str)); ;}
|
1365
1369
|
break;
|
1366
1370
|
|
1367
1371
|
case 32:
|
1368
|
-
#line
|
1369
|
-
{ (yyval.query) = NULL; }
|
1372
|
+
#line 137 "src/q_parser.y"
|
1373
|
+
{ (yyval.query) = NULL; ;}
|
1370
1374
|
break;
|
1371
1375
|
|
1372
1376
|
case 33:
|
1373
|
-
#line
|
1374
|
-
{ (yyval.query) = NULL; }
|
1377
|
+
#line 138 "src/q_parser.y"
|
1378
|
+
{ (yyval.query) = NULL; ;}
|
1375
1379
|
break;
|
1376
1380
|
|
1377
1381
|
case 34:
|
1378
|
-
#line
|
1379
|
-
{ (yyval.phrase) = ph_first_word((yyvsp[0].str)); }
|
1382
|
+
#line 140 "src/q_parser.y"
|
1383
|
+
{ (yyval.phrase) = ph_first_word((yyvsp[0].str)); ;}
|
1380
1384
|
break;
|
1381
1385
|
|
1382
1386
|
case 35:
|
1383
|
-
#line
|
1384
|
-
{ (yyval.phrase) = ph_first_word(NULL); }
|
1387
|
+
#line 141 "src/q_parser.y"
|
1388
|
+
{ (yyval.phrase) = ph_first_word(NULL); ;}
|
1385
1389
|
break;
|
1386
1390
|
|
1387
1391
|
case 36:
|
1388
|
-
#line
|
1389
|
-
{ (yyval.phrase) = ph_add_word((yyvsp[-1].phrase), (yyvsp[0].str)); }
|
1392
|
+
#line 142 "src/q_parser.y"
|
1393
|
+
{ (yyval.phrase) = ph_add_word((yyvsp[-1].phrase), (yyvsp[0].str)); ;}
|
1390
1394
|
break;
|
1391
1395
|
|
1392
1396
|
case 37:
|
1393
|
-
#line
|
1394
|
-
{ (yyval.phrase) = ph_add_word((yyvsp[-2].phrase), NULL); }
|
1397
|
+
#line 143 "src/q_parser.y"
|
1398
|
+
{ (yyval.phrase) = ph_add_word((yyvsp[-2].phrase), NULL); ;}
|
1395
1399
|
break;
|
1396
1400
|
|
1397
1401
|
case 38:
|
1398
|
-
#line
|
1399
|
-
{ (yyval.phrase) = ph_add_multi_word((yyvsp[-2].phrase), (yyvsp[0].str)); }
|
1402
|
+
#line 144 "src/q_parser.y"
|
1403
|
+
{ (yyval.phrase) = ph_add_multi_word((yyvsp[-2].phrase), (yyvsp[0].str)); ;}
|
1400
1404
|
break;
|
1401
1405
|
|
1402
1406
|
case 39:
|
1403
|
-
#line
|
1404
|
-
{ FLDS((yyval.query), get_range_q(field, (yyvsp[-2].str), (yyvsp[-1].str), true, true)); }
|
1407
|
+
#line 146 "src/q_parser.y"
|
1408
|
+
{ FLDS((yyval.query), get_range_q(field, (yyvsp[-2].str), (yyvsp[-1].str), true, true)); ;}
|
1405
1409
|
break;
|
1406
1410
|
|
1407
1411
|
case 40:
|
1408
|
-
#line
|
1409
|
-
{ FLDS((yyval.query), get_range_q(field, (yyvsp[-2].str), (yyvsp[-1].str), true, false)); }
|
1412
|
+
#line 147 "src/q_parser.y"
|
1413
|
+
{ FLDS((yyval.query), get_range_q(field, (yyvsp[-2].str), (yyvsp[-1].str), true, false)); ;}
|
1410
1414
|
break;
|
1411
1415
|
|
1412
1416
|
case 41:
|
1413
|
-
#line
|
1414
|
-
{ FLDS((yyval.query), get_range_q(field, (yyvsp[-2].str), (yyvsp[-1].str), false, true)); }
|
1417
|
+
#line 148 "src/q_parser.y"
|
1418
|
+
{ FLDS((yyval.query), get_range_q(field, (yyvsp[-2].str), (yyvsp[-1].str), false, true)); ;}
|
1415
1419
|
break;
|
1416
1420
|
|
1417
1421
|
case 42:
|
1418
|
-
#line
|
1419
|
-
{ FLDS((yyval.query), get_range_q(field, (yyvsp[-2].str), (yyvsp[-1].str), false, false)); }
|
1422
|
+
#line 149 "src/q_parser.y"
|
1423
|
+
{ FLDS((yyval.query), get_range_q(field, (yyvsp[-2].str), (yyvsp[-1].str), false, false)); ;}
|
1420
1424
|
break;
|
1421
1425
|
|
1422
1426
|
case 43:
|
1423
|
-
#line
|
1424
|
-
{ FLDS((yyval.query), get_range_q(field, NULL,(yyvsp[-1].str), false, false)); }
|
1427
|
+
#line 150 "src/q_parser.y"
|
1428
|
+
{ FLDS((yyval.query), get_range_q(field, NULL,(yyvsp[-1].str), false, false)); ;}
|
1425
1429
|
break;
|
1426
1430
|
|
1427
1431
|
case 44:
|
1428
|
-
#line
|
1429
|
-
{ FLDS((yyval.query), get_range_q(field, NULL,(yyvsp[-1].str), false, true)); }
|
1432
|
+
#line 151 "src/q_parser.y"
|
1433
|
+
{ FLDS((yyval.query), get_range_q(field, NULL,(yyvsp[-1].str), false, true)); ;}
|
1430
1434
|
break;
|
1431
1435
|
|
1432
1436
|
case 45:
|
1433
|
-
#line
|
1434
|
-
{ FLDS((yyval.query), get_range_q(field, (yyvsp[-1].str), NULL,true, false)); }
|
1437
|
+
#line 152 "src/q_parser.y"
|
1438
|
+
{ FLDS((yyval.query), get_range_q(field, (yyvsp[-1].str), NULL,true, false)); ;}
|
1435
1439
|
break;
|
1436
1440
|
|
1437
1441
|
case 46:
|
1438
|
-
#line
|
1439
|
-
{ FLDS((yyval.query), get_range_q(field, (yyvsp[-1].str), NULL,false, false)); }
|
1442
|
+
#line 153 "src/q_parser.y"
|
1443
|
+
{ FLDS((yyval.query), get_range_q(field, (yyvsp[-1].str), NULL,false, false)); ;}
|
1440
1444
|
break;
|
1441
1445
|
|
1442
1446
|
case 47:
|
1443
|
-
#line
|
1444
|
-
{ FLDS((yyval.query), get_range_q(field, NULL,(yyvsp[0].str), false, false)); }
|
1447
|
+
#line 154 "src/q_parser.y"
|
1448
|
+
{ FLDS((yyval.query), get_range_q(field, NULL,(yyvsp[0].str), false, false)); ;}
|
1445
1449
|
break;
|
1446
1450
|
|
1447
1451
|
case 48:
|
1448
|
-
#line
|
1449
|
-
{ FLDS((yyval.query), get_range_q(field, NULL,(yyvsp[0].str), false, true)); }
|
1452
|
+
#line 155 "src/q_parser.y"
|
1453
|
+
{ FLDS((yyval.query), get_range_q(field, NULL,(yyvsp[0].str), false, true)); ;}
|
1450
1454
|
break;
|
1451
1455
|
|
1452
1456
|
case 49:
|
1453
|
-
#line
|
1454
|
-
{ FLDS((yyval.query), get_range_q(field, (yyvsp[0].str), NULL,true, false)); }
|
1457
|
+
#line 156 "src/q_parser.y"
|
1458
|
+
{ FLDS((yyval.query), get_range_q(field, (yyvsp[0].str), NULL,true, false)); ;}
|
1455
1459
|
break;
|
1456
1460
|
|
1457
1461
|
case 50:
|
1458
|
-
#line
|
1459
|
-
{ FLDS((yyval.query), get_range_q(field, (yyvsp[0].str), NULL,false, false)); }
|
1462
|
+
#line 157 "src/q_parser.y"
|
1463
|
+
{ FLDS((yyval.query), get_range_q(field, (yyvsp[0].str), NULL,false, false)); ;}
|
1460
1464
|
break;
|
1461
1465
|
|
1462
1466
|
|
@@ -1464,7 +1468,7 @@ yyreduce:
|
|
1464
1468
|
}
|
1465
1469
|
|
1466
1470
|
/* Line 1126 of yacc.c. */
|
1467
|
-
#line
|
1471
|
+
#line 1472 "src/q_parser.c"
|
1468
1472
|
|
1469
1473
|
yyvsp -= yylen;
|
1470
1474
|
yyssp -= yylen;
|
@@ -1732,11 +1736,11 @@ yyreturn:
|
|
1732
1736
|
}
|
1733
1737
|
|
1734
1738
|
|
1735
|
-
#line
|
1739
|
+
#line 159 "src/q_parser.y"
|
1736
1740
|
|
1737
1741
|
|
1738
|
-
const char *special_char = "&:()[]{}
|
1739
|
-
const char *not_word =
|
1742
|
+
const char *special_char = "&:()[]{}!\"~^|<>=*?+-";
|
1743
|
+
const char *not_word = " \t:()[]{}!\"~^|<>=";
|
1740
1744
|
|
1741
1745
|
static int get_word(YYSTYPE *lvalp, QParser *qp)
|
1742
1746
|
{
|