]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/groff/contrib/mom/examples/elvis_syntax.new
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / groff / contrib / mom / examples / elvis_syntax.new
1 " Steve Kirkendall has thoughtfully reworked elvis's syntax
2 " highlighting so that it now supports nroff constructs like \fBword
3 " and \(emword, with \fB and \(em being highlighted while "word" is
4 " not.
5 "
6 " There are some other enhancements as well, making it possible
7 " to have any word beginning with punctuation (i.e. groff
8 " requests) highlighted.  I've decided to take advantage of these
9 " improvements, which apply to elvis-2.2h onwards, and write a new
10 " simplified set of syntax highlighting rules for mom.  Just plug
11 " this file at the end of /etc/elvis/elvis.syn to use them.
12 "
13 " If you're using an older version of elvis, stick with the
14 " highlighting rules in the files elvis_syntax.
15
16 #Mom
17 language mom
18 extension .mom .tmac
19
20 startword .
21 color startword normal
22
23 inword _.'
24 color inword normal
25
26 other initialpunct
27 mostly normal
28
29 backslash none
30
31 color args         like fixed
32 color braces       like char
33 color brackets     like underlined
34 color chars        like emphasized
35 color decimals     normal
36 color ellipsis     normal
37 color escapes      like keyword
38 color math         like cursor
39 color misc         like string
40 color operators    like string
41 color parens       like comment
42 color reg_string   like math
43 color tmac_escapes like keyword
44 color single_slash like char
45
46 font args DA DE EN ES FR IT NL NO PT SV
47 font args DEFAULT CHAPTER NAMED LETTER
48 font args TYPESET TYPEWRITE
49 font args FINAL DRAFT
50 font args BLOCK QUAD
51 font args LEFT RIGHT CENTER CENTRE JUSTIFY TOP BOTTOM L R C J
52 font args OFF QUIT END EXIT DONE NO ALL
53 font args PAGE NUMBER STAR LINE
54 font args LETTER LEGAL EXECUTIVE LEDGER TABLOID QUARTO FOLIO
55 font args 10x14 A3 A4 A5 B4 B5
56 font args SINGLESPACE
57 font args FACTOR
58 font args DASH BULLET ALPHA DIGIT USER ROMAN roman alpha
59 font args SUSPEND RESUME
60 font args RGB CYM CMYK GRAY GREY
61 font args COND CONDX EXT EXTX SUP SUPX CONDSUP CONDSUPX EXTSUP EXTSUPX
62 font args BOLDER BOLDERX SLANT SLANTX
63 font args UP DOWN BCK FWD BU BP FU FP FN_MARK EN_MARK
64 font args ROM IT BD BDI PREV
65 font args ST
66
67 prefix            { \{ \} \{\ }
68 font braces       { \{ \} \{\ }
69 prefix            [ ]
70 font brackets     [ ]
71 prefix            \(bu \(co \(ct \(de \(dg \(di \(em \(en \(mu \(pl \(rg \(sc \(sq \(lq \(rq
72 font chars        \(bu \(co \(ct \(de \(dg \(di \(em \(en \(mu \(pl \(rg \(sc \(sq \(lq \(rq
73 prefix            \(14 \(12 \(34 \(+-
74 font chars        \(14 \(12 \(34 \(+-
75 prefix            \fR \fB \fI \fP \f0 \f1 \f2 \f3
76 font chars        \fR \fB \fI \fP \f0 \f1 \f2 \f3
77 prefix            .0 .1 .2 .3 .4 .5 .6 .7 .8 .9
78 font decimals     . .0 .1 .2 .3 .4 .5 .6 .7 .8 .9
79 prefix            \/ \/. \/? \/! \/, \/; \/:
80 font escapes      \/ \/. \/? \/! \/, \/; \/:
81 prefix            \, \,. \,? \,! \,, \,; \,:
82 font escapes      \, \,. \,? \,! \,, \,; \,:
83 prefix            \~ \0 \: \| \^ \& \% \!
84 font escapes      \~ \0 \: \| \^ \& \% \!
85 prefix            \b \c \C \d \D \e \f \f( \h \l \L \p \r \s \s+ \s- \S \u \v \w
86 font escapes      \b \c \C \d \D \e \f \f( \h \l \L \p \r \s \s+ \s- \S \u \v \w
87 prefix            ...
88 font ellipsis     ...
89 prefix            + - * / = == < > <= >= <? >? %
90 font math         + - * / = == < > <= >= <? >? %
91 prefix            |
92 font misc         |
93 prefix            ! : &
94 font operators    ! : &
95 prefix            ( )
96 font parens       ( )
97 prefix            # * $
98 font reg_string   # * $
99 prefix            \n \*
100 font single_slash \n \*
101 prefix            \\n \\* \\$
102 font tmac_escapes \\n \\* \\$
103
104 character \]'
105 comment   \#
106 comment   \"