From 1f1fa3776c03b51f845d9d9f54cbc3c980f6ead6 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Thu, 21 Jul 2011 23:30:39 +0000 Subject: Complete eqn.7 parsing. Features all productions from the original 1975 CACM paper in an LR(1) parse (1 -> eqn_rewind()). Right now the code is a little jungly, but will clear up as I consolidate parse components. The AST structure will also be cleaned up, as right now it's pretty ad hoc (this won't change the parse itself). I added the mandoc_strndup() function will here. --- eqn.7 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'eqn.7') diff --git a/eqn.7 b/eqn.7 index 0bf04700..4d00e89f 100644 --- a/eqn.7 +++ b/eqn.7 @@ -1,4 +1,4 @@ -.\" $Id: eqn.7,v 1.12 2011/07/21 15:21:13 kristaps Exp $ +.\" $Id: eqn.7,v 1.13 2011/07/21 23:30:39 kristaps Exp $ .\" .\" Copyright (c) 2011 Kristaps Dzonsons .\" @@ -69,9 +69,14 @@ box : text | UNDEF text | box pos box | box mark + | pile { list } | font box | SIZE text box + | LEFT text box [RIGHT text] text : TEXT +pile : LPILE + | CPILE + | RPILE pos : OVER | SUP | SUB @@ -88,6 +93,7 @@ mark : DOT font : ROMAN | ITALIC | BOLD +list : eqn | list ABOVE eqn .Ed .Pp Data in TEXT form is a non-empty sequence of non-space characters or a -- cgit v1.2.3-56-ge451