summaryrefslogtreecommitdiffstats
path: root/eqn.7
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-07-21 23:30:39 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-07-21 23:30:39 +0000
commit561fdaf67b6be484562a755697a834c21b10e4d9 (patch)
tree3f7792cc5662c919c2fc20e0490f6ec09d7e41a4 /eqn.7
parentff6ddfd72fee08b3063dffb618af31325e51beea (diff)
downloadmandoc-561fdaf67b6be484562a755697a834c21b10e4d9.tar.gz
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.
Diffstat (limited to 'eqn.7')
-rw-r--r--eqn.76
1 files changed, 6 insertions, 0 deletions
diff --git a/eqn.7 b/eqn.7
index 3f8b7f7c..b4910b2e 100644
--- a/eqn.7
+++ b/eqn.7
@@ -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