summaryrefslogtreecommitdiffstats
path: root/src/libserver/css/css_selector_parser.rl
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-01-20 21:18:25 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-01-22 15:58:05 +0000
commite7da191495fe9327700900bbd81a8629af8430f5 (patch)
treefed45a1d84d322de1bdde623d355cec5ee9d474d /src/libserver/css/css_selector_parser.rl
parente422091bab8dd0acc917439e8c0515ee1df1a740 (diff)
downloadrspamd-e7da191495fe9327700900bbd81a8629af8430f5.tar.gz
rspamd-e7da191495fe9327700900bbd81a8629af8430f5.zip
[Project] Add parsers skeleton
Diffstat (limited to 'src/libserver/css/css_selector_parser.rl')
-rw-r--r--src/libserver/css/css_selector_parser.rl27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/libserver/css/css_selector_parser.rl b/src/libserver/css/css_selector_parser.rl
new file mode 100644
index 000000000..f5ae93642
--- /dev/null
+++ b/src/libserver/css/css_selector_parser.rl
@@ -0,0 +1,27 @@
+%%{
+ machine css_parser;
+ alphtype unsigned char;
+ include css_syntax "css_syntax.rl";
+
+ main := selectors_group;
+}%%
+
+%% write data;
+
+#include <cstddef>
+
+namespace rspamd::css {
+
+int
+parse_css_selector (const unsigned char *data, std::size_t len)
+{
+ const unsigned char *p = data, *pe = data + len, *eof;
+ int cs;
+
+ %% write init;
+ %% write exec;
+
+ return cs;
+}
+
+} \ No newline at end of file