summaryrefslogtreecommitdiffstats
path: root/roff.7
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-10 21:42:02 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-10 21:42:02 +0000
commit92fc4a31da7eb79879434d883684209266ac3ff2 (patch)
treee95551d6c9052f1c92423aee19c07cd2adb86de7 /roff.7
parentb33e04fa7bbe5f17c54a8a302bf93d8a56784800 (diff)
downloadmandoc-92fc4a31da7eb79879434d883684209266ac3ff2.tar.gz
Fix adding some minimal intelligence to conditional parser. See roff.7
for what's supported. This simplified the roff_cond() function quite nicely. From a bug report by uqs@. Added regression test based on bug-report example by uqs@. Also added ROFF_DEBUG to see what the hell the parser is actually doing. Obviously turned off by default.
Diffstat (limited to 'roff.7')
-rw-r--r--roff.715
1 files changed, 13 insertions, 2 deletions
diff --git a/roff.7 b/roff.7
index 469b5765..58fb4d19 100644
--- a/roff.7
+++ b/roff.7
@@ -173,8 +173,19 @@ BODY...
BODY
.Ed
.Pp
-COND is a conditional (for the time being, this always evaluates to
-false).
+COND is a conditional statement.
+roff allows for complicated conditionals; mandoc is much simpler.
+At this time, mandoc supports only
+.Sq n ,
+evaluating to true;
+and
+.Sq t ,
+.Sq e ,
+and
+.Sq o ,
+evaluating to false.
+All other invocations are read up to the next end of line or space and
+evaluate as false.
.Pp
If the BODY section is begun by an escaped brace
.Sq \e{ ,