Remove support for TrxBoundaryMatcher
For the general case, regex matching simply will not do. The regex becomes so hairy so it turns write-only, i.e. unmaintainable. Regex matching is also slower than a handwritten custom parser.
This commit is contained in:
@ -27,7 +27,6 @@ enum test_target_t
|
||||
{
|
||||
TEST_PARSER = 0x1,
|
||||
TEST_QC = 0x2,
|
||||
TEST_REGEX = 0x4,
|
||||
TEST_ALL = (TEST_PARSER | TEST_QC)
|
||||
};
|
||||
|
||||
@ -54,11 +53,6 @@ uint32_t get_qc_trx_type_mask(GWBUF* pBuf)
|
||||
return qc_get_trx_type_mask_using(pBuf, QC_TRX_PARSE_USING_QC);
|
||||
}
|
||||
|
||||
uint32_t get_regex_trx_type_mask(GWBUF* pBuf)
|
||||
{
|
||||
return qc_get_trx_type_mask_using(pBuf, QC_TRX_PARSE_USING_REGEX);
|
||||
}
|
||||
|
||||
uint32_t get_parser_trx_type_mask(GWBUF* pBuf)
|
||||
{
|
||||
return qc_get_trx_type_mask_using(pBuf, QC_TRX_PARSE_USING_PARSER);
|
||||
@ -376,7 +370,7 @@ int main(int argc, char* argv[])
|
||||
bool dont_bail_out = false;
|
||||
|
||||
int c;
|
||||
while ((c = getopt(argc, argv, "dpqr")) != -1)
|
||||
while ((c = getopt(argc, argv, "dpq")) != -1)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
@ -390,11 +384,6 @@ int main(int argc, char* argv[])
|
||||
test_target = TEST_QC;
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
test_all = false;
|
||||
test_target = TEST_REGEX;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
dont_bail_out = true;
|
||||
break;
|
||||
@ -436,17 +425,6 @@ int main(int argc, char* argv[])
|
||||
cout << endl;
|
||||
}
|
||||
|
||||
if (test_target & TEST_REGEX)
|
||||
{
|
||||
cout << "Regex" << endl;
|
||||
cout << "=====" << endl;
|
||||
if (!test(get_regex_trx_type_mask, dont_bail_out))
|
||||
{
|
||||
rc = EXIT_FAILURE;
|
||||
}
|
||||
cout << endl;
|
||||
}
|
||||
|
||||
if (test_target & TEST_PARSER)
|
||||
{
|
||||
cout << "Parser" << endl;
|
||||
|
||||
Reference in New Issue
Block a user