diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-01-15 19:35:39 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-01-15 19:35:39 -0800 |
| commit | 13c45645948d16719e748ffeed2bdbf819698ebd (patch) | |
| tree | 7e0cd356a291b5c9aaf32a4c0cf6485a4e73677b /definitions.h | |
| parent | 44573fc224796f712254d7ff7fdc0a87aeb6a84c (diff) | |
Renamed grammar -> definitions
Diffstat (limited to 'definitions.h')
| -rw-r--r-- | definitions.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/definitions.h b/definitions.h new file mode 100644 index 0000000..5a006b4 --- /dev/null +++ b/definitions.h @@ -0,0 +1,22 @@ +// +// definitions.h - Header file defining pattern rules +// +#ifndef DEFINITIONS__H +#define DEFINITIONS__H + +#include "files.h" +#include "types.h" + +__attribute__((nonnull(2,4,5), returns_nonnull)) +def_t *with_def(def_t *defs, file_t *f, size_t namelen, const char *name, pat_t *pat); +__attribute__((nonnull(2,3,4), returns_nonnull)) +def_t *with_backref(def_t *defs, file_t *f, const char *name, match_t *m); +__attribute__((nonnull(2))) +def_t *load_grammar(def_t *defs, file_t *f); +__attribute__((pure, nonnull(2))) +def_t *lookup(def_t *defs, const char *name); +__attribute__((nonnull(1))) +void free_defs(def_t **defs, def_t *stop); + +#endif +// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1 |
