diff options
Diffstat (limited to 'src/analysis/scan/context-int.h')
-rw-r--r-- | src/analysis/scan/context-int.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/analysis/scan/context-int.h b/src/analysis/scan/context-int.h index 94302bf..3a971b8 100644 --- a/src/analysis/scan/context-int.h +++ b/src/analysis/scan/context-int.h @@ -29,9 +29,12 @@ #include "expr.h" +#include "../../common/fnv1a.h" +#define ALLOCATION_STEP 10 + /* Mémorisation des correspondances partielles */ typedef struct _atom_match_tracker_t { @@ -41,12 +44,22 @@ typedef struct _atom_match_tracker_t } atom_match_tracker_t; -#define ALLOCATION_STEP 10 +/* Mémorisation des correspondances complètes, par motif */ +typedef struct _full_match_tracker_t +{ + GSearchPattern *pattern; /* Motif commun aux trouvailles*/ + + GScanMatch **matches; /* Correspondances confirmées */ + size_t allocated; /* Taille du talbeau préparé */ + size_t used; /* Nombre d'éléments présents */ + +} full_match_tracker_t; /* Condition définissant une règle de correspondance */ typedef struct _rule_condition_t { char *name; /* Désignation de la règle */ + fnv64_t name_hash; /* Empreinte de la désignation */ GScanExpression *expr; /* Condition de correspondance */ bool final_reduced; /* Réduction finale tentée ? */ @@ -66,9 +79,8 @@ struct _GScanContext atom_match_tracker_t *atom_trackers; /* Correspondances partielles */ - GScanMatch **full_matches; /* Correspondances confirmées */ - size_t full_allocated; /* Taille du talbeau préparé */ - size_t full_used; /* Nombre d'éléments présents */ + full_match_tracker_t **full_trackers; /* Correspondances confirmées */ + size_t full_count; /* Quantité de correspondances */ rule_condition_t *conditions; /* Ensemble de règles suivies */ size_t cond_count; /* Quantité de ces conditions */ |