Mercurial > repo
diff src/ploki/re.h @ 4223:ac0403686959
<oerjan> rm -rf src/ploki; mv ploki src
author | HackBot |
---|---|
date | Fri, 20 Dec 2013 22:18:50 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/ploki/re.h Fri Dec 20 22:18:50 2013 +0000 @@ -0,0 +1,31 @@ +#ifndef RE_H_ +#define RE_H_ + +#include "config.h" +#include "IO.h" +#include "Str.h" + +#include <stddef.h> +#include <stdio.h> + +typedef struct my_regex t_regex; + +void re_init(void); +void re_end(void); + +t_regex *re_compile(const String *); +void re_free(t_regex *); +t_regex *re_dup(t_regex *); + +ATTR_PURE +int re_match(t_regex *, const String *, size_t *, size_t *); +int re_iomatch(t_regex *, IO *, size_t *, size_t *); + +ATTR_PURE +size_t re_cabra(const t_regex *); +int re_backref(const t_regex *, size_t, size_t *, size_t *); + +void re_dump(const t_regex *, FILE *); +void re_decompile(const t_regex *, String *); + +#endif /* RE_H_ */