From 08be124a58f07e4e41c58ea794f3e9eb04230e2b Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 10 Oct 2014 08:44:24 +0000 Subject: =?UTF-8?q?Re-write=20of=20eqn(7)=20parser=20and=20MathML=20output?= =?UTF-8?q?.=20This=20adds=20parser-level=20support=20for=20the=20grammar?= =?UTF-8?q?=20described=20by=20the=20eqn=20second-edition=20technical=20pa?= =?UTF-8?q?per,=20"Typesetting=20Mathematics=20=E2=80=94=20User's=20Guide"?= =?UTF-8?q?=20(Kernighan,=20Cherry).=20The=20reason=20for=20this=20re-writ?= =?UTF-8?q?e=20is=20the=20grouping=20rules,=20which=20were=20not=20possibl?= =?UTF-8?q?e=20given=20the=20existing=20implementation.=20The=20re-write?= =?UTF-8?q?=20has=20also=20considerably=20simplified=20the=20HTML=20(and,?= =?UTF-8?q?=20if=20it=20ever=20is=20completed,=20terminal)=20front-end.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tree.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tree.c') diff --git a/tree.c b/tree.c index 20386632..087ab55a 100644 --- a/tree.c +++ b/tree.c @@ -1,4 +1,4 @@ -/* $Id: tree.c,v 1.55 2014/09/28 11:32:33 kristaps Exp $ */ +/* $Id: tree.c,v 1.56 2014/10/10 08:44:24 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2011 Kristaps Dzonsons * Copyright (c) 2013, 2014 Ingo Schwarze @@ -275,6 +275,7 @@ print_box(const struct eqn_box *ep, int indent) case EQN_ROOT: t = "eqn-root"; break; + case EQN_LISTONE: case EQN_LIST: t = "eqn-list"; break; @@ -284,15 +285,19 @@ print_box(const struct eqn_box *ep, int indent) case EQN_TEXT: t = "eqn-text"; break; + case EQN_PILE: + t = "eqn-pile"; + break; case EQN_MATRIX: t = "eqn-matrix"; break; } assert(t); - printf("%s(size=%d, pos=%d, font=%d, mark=%d, pile=%d, l=\"%s\", r=\"%s\") %s\n", + printf("%s(size=%d, args=%zu(%zu), pos=%d, font=%d, pile=%d, l=\"%s\", r=\"%s\") %s\n", t, EQN_DEFSIZE == ep->size ? 0 : ep->size, - ep->pos, ep->font, ep->mark, ep->pile, + ep->args, ep->expectargs, + ep->pos, ep->font, ep->pile, ep->left ? ep->left : "", ep->right ? ep->right : "", ep->text ? ep->text : ""); -- cgit v1.2.3