mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
move MultibyteAccelInfo to accelcompile.h
This commit is contained in:
parent
50885f210a
commit
956b86e97a
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, Intel Corporation
|
* Copyright (c) 2015-2016, Intel Corporation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@ -32,12 +32,30 @@
|
|||||||
#include "ue2common.h"
|
#include "ue2common.h"
|
||||||
#include "util/charreach.h"
|
#include "util/charreach.h"
|
||||||
#include "util/ue2_containers.h"
|
#include "util/ue2_containers.h"
|
||||||
#include "nfagraph/ng_limex_accel.h"
|
|
||||||
|
|
||||||
union AccelAux;
|
union AccelAux;
|
||||||
|
|
||||||
namespace ue2 {
|
namespace ue2 {
|
||||||
|
|
||||||
|
struct MultibyteAccelInfo {
|
||||||
|
/* multibyte accel schemes, ordered by strength */
|
||||||
|
enum multiaccel_type {
|
||||||
|
MAT_SHIFT,
|
||||||
|
MAT_SHIFTGRAB,
|
||||||
|
MAT_DSHIFT,
|
||||||
|
MAT_DSHIFTGRAB,
|
||||||
|
MAT_LONG,
|
||||||
|
MAT_LONGGRAB,
|
||||||
|
MAT_MAX,
|
||||||
|
MAT_NONE = MAT_MAX
|
||||||
|
};
|
||||||
|
CharReach cr;
|
||||||
|
u32 offset = 0;
|
||||||
|
u32 len1 = 0;
|
||||||
|
u32 len2 = 0;
|
||||||
|
multiaccel_type type = MAT_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
struct AccelInfo {
|
struct AccelInfo {
|
||||||
AccelInfo() : single_offset(0U), double_offset(0U),
|
AccelInfo() : single_offset(0U), double_offset(0U),
|
||||||
single_stops(CharReach::dot()),
|
single_stops(CharReach::dot()),
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, Intel Corporation
|
* Copyright (c) 2015-2016, Intel Corporation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@ -36,6 +36,7 @@
|
|||||||
#include "ng_holder.h"
|
#include "ng_holder.h"
|
||||||
#include "ng_misc_opt.h"
|
#include "ng_misc_opt.h"
|
||||||
#include "ue2common.h"
|
#include "ue2common.h"
|
||||||
|
#include "nfa/accelcompile.h"
|
||||||
#include "util/charreach.h"
|
#include "util/charreach.h"
|
||||||
#include "util/order_check.h"
|
#include "util/order_check.h"
|
||||||
#include "util/ue2_containers.h"
|
#include "util/ue2_containers.h"
|
||||||
@ -71,25 +72,6 @@ struct DoubleAccelInfo {
|
|||||||
|
|
||||||
DoubleAccelInfo findBestDoubleAccelInfo(const NGHolder &g, NFAVertex v);
|
DoubleAccelInfo findBestDoubleAccelInfo(const NGHolder &g, NFAVertex v);
|
||||||
|
|
||||||
struct MultibyteAccelInfo {
|
|
||||||
/* multibyte accel schemes, ordered by strength */
|
|
||||||
enum multiaccel_type {
|
|
||||||
MAT_SHIFT,
|
|
||||||
MAT_SHIFTGRAB,
|
|
||||||
MAT_DSHIFT,
|
|
||||||
MAT_DSHIFTGRAB,
|
|
||||||
MAT_LONG,
|
|
||||||
MAT_LONGGRAB,
|
|
||||||
MAT_MAX,
|
|
||||||
MAT_NONE = MAT_MAX
|
|
||||||
};
|
|
||||||
CharReach cr;
|
|
||||||
u32 offset = 0;
|
|
||||||
u32 len1 = 0;
|
|
||||||
u32 len2 = 0;
|
|
||||||
multiaccel_type type = MAT_NONE;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct AccelScheme {
|
struct AccelScheme {
|
||||||
AccelScheme(const CharReach &cr_in, u32 offset_in)
|
AccelScheme(const CharReach &cr_in, u32 offset_in)
|
||||||
: cr(cr_in), offset(offset_in) {
|
: cr(cr_in), offset(offset_in) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user