summaryrefslogtreecommitdiff
path: root/src/sp_config_scanner.h
diff options
context:
space:
mode:
authorjvoisin2023-04-29 16:46:02 +0200
committerjvoisin2023-04-29 16:46:02 +0200
commitcee55351d6c2865447e72d9e3e8ba5922647162d (patch)
tree8172322ef3cb9560611b00e3addf8ce89d51053a /src/sp_config_scanner.h
parent8532f01c7f3c356fbb2dda593477d3902491de77 (diff)
Improve how the parser is generated
- use long variant of options for re2c in its makefile - use `define` instead of magic numbers - add some consts - trailing `;` are now mandatory for conditions - NULL bytes are no longer allowed in configuration file - the parser shouldn't crash in the absence of trailing new line at the end of its configuration file
Diffstat (limited to 'src/sp_config_scanner.h')
-rw-r--r--src/sp_config_scanner.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sp_config_scanner.h b/src/sp_config_scanner.h
index 8ce1fb7..71f8f7e 100644
--- a/src/sp_config_scanner.h
+++ b/src/sp_config_scanner.h
@@ -18,7 +18,7 @@ typedef struct {
18 long lineno; 18 long lineno;
19} sp_parsed_keyword; 19} sp_parsed_keyword;
20 20
21zend_result sp_config_scan(char *data, zend_result (*process_rule)(sp_parsed_keyword*)); 21zend_result sp_config_scan(const char *data, zend_result (*process_rule)(sp_parsed_keyword*));
22zend_string *sp_get_arg_string(sp_parsed_keyword const *const kw); 22zend_string *sp_get_arg_string(sp_parsed_keyword const *const kw);
23zend_string *sp_get_textual_representation(sp_parsed_keyword const *const parsed_rule); 23zend_string *sp_get_textual_representation(sp_parsed_keyword const *const parsed_rule);
24 24