diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-26 18:42:30 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-01-26 18:42:30 +0000 |
commit | fb1f845c9ebafe8648f3df58f8a4581041ff067e (patch) | |
tree | 07765bfe61b2b3ed91ec2f3e112706b0a88c6a8b /mandoc.h | |
parent | ba5583393dfa12234c2752e45824ac58a3851700 (diff) | |
download | mandoc-fb1f845c9ebafe8648f3df58f8a4581041ff067e.tar.gz |
Rework tbl(7) layout parsing:
* Continue parsing even if part of the input is invalid.
* Do not require whitespace between cell specifications.
* Allow tabs as well as blanks between modifiers.
* Mark the 'm' modifier as unsupported.
* Parse and ignore the 'p' and 'v' modifiers.
* Better warning and error messages.
* Get rid of a static buffer.
Improved functionality but minus 50 lines of code.
Diffstat (limited to 'mandoc.h')
-rw-r--r-- | mandoc.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -127,6 +127,11 @@ enum mandocerr { MANDOCERR_ESC_BAD, /* invalid escape sequence: esc */ MANDOCERR_STR_UNDEF, /* undefined string, using "": name */ + /* related to tables */ + MANDOCERR_TBLLAYOUT_SPAN, /* tbl line starts with span */ + MANDOCERR_TBLLAYOUT_DOWN, /* tbl column starts with span */ + MANDOCERR_TBLLAYOUT_VERT, /* skipping vertical bar in tbl layout */ + MANDOCERR_ERROR, /* ===== start of errors ===== */ /* related to equations */ @@ -140,7 +145,9 @@ enum mandocerr { MANDOCERR_TBLOPT_BAD, /* skipping unknown tbl option: option */ MANDOCERR_TBLOPT_NOARG, /* missing tbl option argument */ MANDOCERR_TBLOPT_ARGSZ, /* wrong tbl option argument size */ - MANDOCERR_TBLNOLAYOUT, /* no table layout cells specified */ + MANDOCERR_TBLLAYOUT_NONE, /* empty tbl layout */ + MANDOCERR_TBLLAYOUT_CHAR, /* invalid character in tbl layout: char */ + MANDOCERR_TBLLAYOUT_PAR, /* unmatched parenthesis in tbl layout */ MANDOCERR_TBLNODATA, /* no table data cells specified */ MANDOCERR_TBLIGNDATA, /* ignore data in cell */ MANDOCERR_TBLBLOCK, /* data block still open */ @@ -179,7 +186,7 @@ enum mandocerr { MANDOCERR_TOOLARGE, /* input too large */ MANDOCERR_CHAR_UNSUPP, /* unsupported control character: number */ MANDOCERR_REQ_UNSUPP, /* unsupported roff request: request */ - MANDOCERR_TBLLAYOUT, /* unsupported table layout */ + MANDOCERR_TBLLAYOUT_MOD, /* unsupported tbl layout modifier: m */ MANDOCERR_TBLMACRO, /* ignoring macro in table: macro */ MANDOCERR_TBLEQN, /* eqn in tbl */ |