summaryrefslogtreecommitdiff
path: root/src/fspec/ragel/lexer-expr.h
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-02-23 12:54:43 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2018-02-23 12:54:43 +0200
commit4750be2da326297830691c54adbab0a5dea14802 (patch)
treeae7b9643ce3fdbf6c0ddc78c2626fb81416f1404 /src/fspec/ragel/lexer-expr.h
parent22fb54a917676e61f19d773cc4f931300ace925e (diff)
wip
Diffstat (limited to 'src/fspec/ragel/lexer-expr.h')
-rw-r--r--src/fspec/ragel/lexer-expr.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/fspec/ragel/lexer-expr.h b/src/fspec/ragel/lexer-expr.h
new file mode 100644
index 0000000..904736d
--- /dev/null
+++ b/src/fspec/ragel/lexer-expr.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <fspec/memory.h>
+
+#include <stdbool.h>
+
+struct fspec_expr;
+struct fspec_expr {
+ struct {
+ size_t (*read)(struct fspec_expr *lexer, void *input, const size_t size, const size_t nmemb);
+ size_t (*write)(struct fspec_expr *lexer, const void *output, const size_t size, const size_t nmemb);
+ } ops;
+
+ struct {
+ struct fspec_mem input;
+ } mem;
+};
+
+bool
+fspec_expr_parse(struct fspec_expr *lexer, const char *name);