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