mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-18 10:10:35 +03:00
limex: rework accept handling
Rather that iterating over NFAAccept structures and testing individual bits in the state structure, iterate over the state vector and index into accept structures. Adds report list support to this path, unified with the report lists used for exception handling.
This commit is contained in:
committed by
Matthew Barr
parent
3dcfea19e0
commit
77fe1ef6e5
@@ -132,7 +132,6 @@ struct LimExNFA##size { \
|
||||
u32 acceptEodOffset; /* rel. to start of LimExNFA */ \
|
||||
u32 exceptionCount; \
|
||||
u32 exceptionOffset; /* rel. to start of LimExNFA */ \
|
||||
u32 exReportOffset; /* rel. to start of LimExNFA */ \
|
||||
u32 repeatCount; \
|
||||
u32 repeatOffset; \
|
||||
u32 squashOffset; /* rel. to start of LimExNFA; for accept squashing */ \
|
||||
@@ -184,9 +183,16 @@ struct NFARepeatInfo {
|
||||
};
|
||||
|
||||
struct NFAAccept {
|
||||
u32 state; //!< state ID of triggering state
|
||||
ReportID externalId; //!< report ID to raise
|
||||
u32 squash; //!< offset into masks, or MO_INVALID_IDX
|
||||
u8 single_report; //!< If true, 'reports' is report id.
|
||||
|
||||
/**
|
||||
* \brief If single report is true, this is the report id to fire.
|
||||
* Otherwise, it is the offset (relative to the start of the LimExNFA
|
||||
* structure) of a list of reports, terminated with MO_INVALID_IDX.
|
||||
*/
|
||||
u32 reports;
|
||||
|
||||
u32 squash; //!< Offset into squash masks, or MO_INVALID_IDX.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user