summaryrefslogtreecommitdiffstats
path: root/regress/char/C/delim.in
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2022-06-08 13:23:57 +0000
committerIngo Schwarze <schwarze@openbsd.org>2022-06-08 13:23:57 +0000
commit8b67872465026c8a36f46c94ab7c3c9cf281ba79 (patch)
tree23a341c363e8430f41e73eaa3f7b2faed547674a /regress/char/C/delim.in
parenta20dce04f17b9130249adc2db887746a87808270 (diff)
downloadmandoc-8b67872465026c8a36f46c94ab7c3c9cf281ba79.tar.gz
Surprisingly, every escape sequence can also be used as an argument
delimiter for an outer escape sequence, in which case the delimiting escape sequence retains its syntax but usually ignores its argument and loses its inherent effect. Add rudimentary support for this syntax quirk in order to improve parsing compatibility with groff.
Diffstat (limited to 'regress/char/C/delim.in')
-rw-r--r--regress/char/C/delim.in51
1 files changed, 51 insertions, 0 deletions
diff --git a/regress/char/C/delim.in b/regress/char/C/delim.in
new file mode 100644
index 00000000..db010d22
--- /dev/null
+++ b/regress/char/C/delim.in
@@ -0,0 +1,51 @@
+.\" $OpenBSD: delim.in,v 1.1 2022/06/08 13:08:00 schwarze Exp $
+.Dd $Mdocdate$
+.Dt C-DELIM 1
+.Os
+.Sh NAME
+.Nm C-delim
+.Nd argument delimiters for the C escape sequence
+.Sh DESCRIPTION
+empty: \C''
+.br
+single byte: \C'_'\C'-'
+.br
+two bytes: \C'hy'
+.br
+multiple bytes: \C'integral'
+.Ss Argument delimiters
+unsupported \er: \C\rat\ru
+.br
+ignored \e&: \C\&at\&u
+.br
+useless \e.: \C\.at.u
+.br
+invalid \eG: \C\GatGu
+.br
+special \e-: \C\-at\-u
+.br
+break \ep: \C\pat\pu
+.br
+nospace \ec: \C\cat\cu
+.\".br
+.\"XXX skipchar \ec: \C\zat\zu
+.br
+.ds mystr xatxu
+string expansion: \C\*[mystr]
+.br
+.nr myreg 1341
+register expansion: \C\n[myreg]u
+.br
+ignored \eON: \C\O1at\O2u
+.br
+special character: \C\(hyat\(hyu
+.br
+ignored \eZ\(aqstr\(aq: \C\Z'foo'at\Z'bar'u
+.br
+horizontal motion: \C\h'1'at\h'3'u
+.br
+horizontal line: \C\l'4'at\l'2'u
+.br
+overstrike: \C\o'ab'at\o'cd'u
+.br
+unterminated: \C'at