version 1.78, 2011/07/15 10:14:12 |
version 1.86, 2011/07/21 13:37:04 |
Line 104 enum mandocerr { |
|
Line 104 enum mandocerr { |
|
MANDOCERR_BADESCAPE, /* unknown escape sequence */ |
MANDOCERR_BADESCAPE, /* unknown escape sequence */ |
MANDOCERR_BADQUOTE, /* unterminated quoted string */ |
MANDOCERR_BADQUOTE, /* unterminated quoted string */ |
|
|
|
/* related to equations */ |
|
MANDOCERR_EQNQUOTE, /* unexpected literal in equation */ |
|
|
MANDOCERR_ERROR, /* ===== start of errors ===== */ |
MANDOCERR_ERROR, /* ===== start of errors ===== */ |
|
|
|
/* related to equations */ |
|
MANDOCERR_EQNARGS, /* bad equation macro arguments */ |
|
MANDOCERR_EQNNEST, /* too many nested equation defines */ |
|
MANDOCERR_EQNNSCOPE, /* unexpected equation scope closure*/ |
|
MANDOCERR_EQNSCOPE, /* equation scope open on exit */ |
|
|
/* related to tables */ |
/* related to tables */ |
MANDOCERR_TBL, /* bad table syntax */ |
MANDOCERR_TBL, /* bad table syntax */ |
MANDOCERR_TBLOPT, /* bad table option */ |
MANDOCERR_TBLOPT, /* bad table option */ |
Line 270 struct tbl_span { |
|
Line 279 struct tbl_span { |
|
struct tbl_span *next; |
struct tbl_span *next; |
}; |
}; |
|
|
|
enum eqn_boxt { |
|
EQN_ROOT, /* root of parse tree */ |
|
EQN_TEXT, /* text (number, variable, whatever) */ |
|
EQN_SUBEXPR /* nested subexpression */ |
|
}; |
|
|
|
enum eqn_markt { |
|
EQNMARK_NONE = 0, |
|
EQNMARK_DOT, |
|
EQNMARK_DOTDOT, |
|
EQNMARK_HAT, |
|
EQNMARK_TILDE, |
|
EQNMARK_VEC, |
|
EQNMARK_DYAD, |
|
EQNMARK_BAR, |
|
EQNMARK_UNDER, |
|
EQNMARK__MAX |
|
}; |
|
|
|
enum eqn_fontt { |
|
EQNFONT_NONE = 0, |
|
EQNFONT_ROMAN, |
|
EQNFONT_BOLD, |
|
EQNFONT_ITALIC, |
|
EQNFONT__MAX |
|
}; |
|
|
|
/* |
|
* A "box" is a parsed mathematical expression as defined by the eqn.7 |
|
* grammar. |
|
*/ |
|
struct eqn_box { |
|
enum eqn_boxt type; /* type of node */ |
|
struct eqn_box *child; /* child node */ |
|
struct eqn_box *next; /* next in tree */ |
|
char *text; /* text (or NULL) */ |
|
enum eqn_markt mark; /* a mark about the box */ |
|
enum eqn_fontt font; /* font of box */ |
|
}; |
|
|
struct eqn { |
struct eqn { |
size_t sz; |
struct eqn_box *root; /* root mathematical expression */ |
char *data; |
int ln; /* invocation line */ |
int line; /* invocation line */ |
|
int pos; /* invocation position */ |
int pos; /* invocation position */ |
}; |
}; |
|
|