diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-10-20 02:00:51 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-10-20 02:00:51 +0000 |
commit | eb8ac7a62bcf763450f4e522081c9dd6be5467fd (patch) | |
tree | e0c4ee91c9251e2e40ee1a53c89a416edd72eaaf /usr.bin/mandoc/libmdoc.h | |
parent | 84be747d3db6f035175b51a8d3850c50e4eb6ce9 (diff) |
In order to become able to generate syntax tree nodes on the roff(7)
level, validation must be separated from parsing and rewinding.
This first big step moves calling of the mdoc(7) post_*() functions
out of the parser loop into their own mdoc_validate() pass, while
using a new mdoc_state() module to make syntax tree state handling
available to both the parser loop and the validation pass.
Diffstat (limited to 'usr.bin/mandoc/libmdoc.h')
-rw-r--r-- | usr.bin/mandoc/libmdoc.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/mandoc/libmdoc.h b/usr.bin/mandoc/libmdoc.h index ef3f17bce24..99b3360b000 100644 --- a/usr.bin/mandoc/libmdoc.h +++ b/usr.bin/mandoc/libmdoc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libmdoc.h,v 1.77 2015/10/17 00:19:58 schwarze Exp $ */ +/* $OpenBSD: libmdoc.h,v 1.78 2015/10/20 02:00:49 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -73,10 +73,14 @@ void mdoc_tail_alloc(struct roff_man *, int, int, int); struct roff_node *mdoc_endbody_alloc(struct roff_man *, int, int, int, struct roff_node *, enum mdoc_endbody); void mdoc_node_relink(struct roff_man *, struct roff_node *); +void mdoc_node_validate(struct roff_man *); +void mdoc_state(struct roff_man *, struct roff_node *); +void mdoc_state_reset(struct roff_man *); int mdoc_hash_find(const char *); +const char *mdoc_a2arch(const char *); const char *mdoc_a2att(const char *); +enum roff_sec mdoc_a2sec(const char *); const char *mdoc_a2st(const char *); -const char *mdoc_a2arch(const char *); void mdoc_argv(struct roff_man *, int, int, struct mdoc_arg **, int *, char *); enum margserr mdoc_args(struct roff_man *, int, |