scdoc2mdoc

A fork of scdoc to output mdoc(7)
git clone git://git.sgregoratto.me/scdoc2mdoc
Log | Files | Refs | README | LICENSE

parser.h (623B)


      1 #ifndef _UTIL_H
      2 #define _UTIL_H
      3 #define QUEUELEN 32
      4 
      5 struct parser {
      6 	FILE *input;
      7 	const char *fname;
      8 	int line, col;
      9 	int qhead;
     10 	uint32_t queue[QUEUELEN];
     11 	uint32_t flags;
     12 	const char *str;
     13 	int fmt_line, fmt_col;
     14 	int inpara;
     15 };
     16 
     17 enum formatting {
     18 	FORMAT_BOLD = 1,
     19 	FORMAT_UNDERLINE = 2,
     20 	FORMAT_LAST = 4,
     21 };
     22 
     23 void parser_close(struct parser *);
     24 void parser_fatal(struct parser *, const char *);
     25 uint32_t parser_getch(struct parser *);
     26 void parser_pushch(struct parser *, uint32_t);
     27 void parser_pushstr(struct parser *, const char *);
     28 void parse_preamble(struct parser *);
     29 void parse_document(struct parser *);
     30 #endif