diff options
| author | xXx-caillou-xXx | 2017-12-20 18:09:53 +0100 |
|---|---|---|
| committer | jvoisin | 2017-12-20 18:09:53 +0100 |
| commit | e7f541396715ee2895abcf73044b91ae9b746201 (patch) | |
| tree | ba0e9765e7f14f04b92585df1f3fcd1830ab4b00 /src/sp_config.h | |
| parent | 8d6cc4f2b63c3f0dc31fe6cecd34ac023ea1cccb (diff) | |
Better parsing of the rules
Thanks to this huge commit from @xXx-caillou-xXx, we can now write amazingly flexible rules.
Diffstat (limited to 'src/sp_config.h')
| -rw-r--r-- | src/sp_config.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sp_config.h b/src/sp_config.h index 8ef62a2..127c557 100644 --- a/src/sp_config.h +++ b/src/sp_config.h | |||
| @@ -78,7 +78,7 @@ typedef struct { | |||
| 78 | char *hash; | 78 | char *hash; |
| 79 | int simulation; | 79 | int simulation; |
| 80 | 80 | ||
| 81 | char *param; | 81 | sp_tree *param; |
| 82 | pcre *r_param; | 82 | pcre *r_param; |
| 83 | sp_php_type param_type; | 83 | sp_php_type param_type; |
| 84 | int pos; | 84 | int pos; |
| @@ -91,6 +91,9 @@ typedef struct { | |||
| 91 | pcre *value_r; | 91 | pcre *value_r; |
| 92 | char *value; | 92 | char *value; |
| 93 | 93 | ||
| 94 | pcre *r_key; | ||
| 95 | char *key; | ||
| 96 | |||
| 94 | char *dump; | 97 | char *dump; |
| 95 | char *alias; | 98 | char *alias; |
| 96 | bool param_is_array; | 99 | bool param_is_array; |
| @@ -100,7 +103,7 @@ typedef struct { | |||
| 100 | 103 | ||
| 101 | bool allow; | 104 | bool allow; |
| 102 | 105 | ||
| 103 | char *var; | 106 | sp_tree *var; |
| 104 | 107 | ||
| 105 | sp_cidr *cidr; | 108 | sp_cidr *cidr; |
| 106 | } sp_disabled_function; | 109 | } sp_disabled_function; |
| @@ -193,6 +196,8 @@ typedef struct { | |||
| 193 | #define SP_TOKEN_RET_TYPE ".ret_type(" | 196 | #define SP_TOKEN_RET_TYPE ".ret_type(" |
| 194 | #define SP_TOKEN_VALUE ".value(" | 197 | #define SP_TOKEN_VALUE ".value(" |
| 195 | #define SP_TOKEN_VALUE_REGEXP ".value_r(" | 198 | #define SP_TOKEN_VALUE_REGEXP ".value_r(" |
| 199 | #define SP_TOKEN_KEY ".key(" | ||
| 200 | #define SP_TOKEN_KEY_REGEXP ".key_r(" | ||
| 196 | #define SP_TOKEN_VALUE_ARG_POS ".pos(" | 201 | #define SP_TOKEN_VALUE_ARG_POS ".pos(" |
| 197 | #define SP_TOKEN_LINE_NUMBER ".line(" | 202 | #define SP_TOKEN_LINE_NUMBER ".line(" |
| 198 | 203 | ||
