/contrib/groff/contrib/mom/examples/elvis_syntax.new

https://bitbucket.org/freebsd/freebsd-head/ · Unknown · 106 lines · 97 code · 9 blank · 0 comment · 0 complexity · d0d5bd206523ac0350b4a4713abb52ed MD5 · raw file

  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. #Mom
  16. language mom
  17. extension .mom .tmac
  18. startword .
  19. color startword normal
  20. inword _.'
  21. color inword normal
  22. other initialpunct
  23. mostly normal
  24. backslash none
  25. color args like fixed
  26. color braces like char
  27. color brackets like underlined
  28. color chars like emphasized
  29. color decimals normal
  30. color ellipsis normal
  31. color escapes like keyword
  32. color math like cursor
  33. color misc like string
  34. color operators like string
  35. color parens like comment
  36. color reg_string like math
  37. color tmac_escapes like keyword
  38. color single_slash like char
  39. font args DA DE EN ES FR IT NL NO PT SV
  40. font args DEFAULT CHAPTER NAMED LETTER
  41. font args TYPESET TYPEWRITE
  42. font args FINAL DRAFT
  43. font args BLOCK QUAD
  44. font args LEFT RIGHT CENTER CENTRE JUSTIFY TOP BOTTOM L R C J
  45. font args OFF QUIT END EXIT DONE NO ALL
  46. font args PAGE NUMBER STAR LINE
  47. font args LETTER LEGAL EXECUTIVE LEDGER TABLOID QUARTO FOLIO
  48. font args 10x14 A3 A4 A5 B4 B5
  49. font args SINGLESPACE
  50. font args FACTOR
  51. font args DASH BULLET ALPHA DIGIT USER ROMAN roman alpha
  52. font args SUSPEND RESUME
  53. font args RGB CYM CMYK GRAY GREY
  54. font args COND CONDX EXT EXTX SUP SUPX CONDSUP CONDSUPX EXTSUP EXTSUPX
  55. font args BOLDER BOLDERX SLANT SLANTX
  56. font args UP DOWN BCK FWD BU BP FU FP FN_MARK EN_MARK
  57. font args ROM IT BD BDI PREV
  58. font args ST
  59. prefix { \{ \} \{\ }
  60. font braces { \{ \} \{\ }
  61. prefix [ ]
  62. font brackets [ ]
  63. prefix \(bu \(co \(ct \(de \(dg \(di \(em \(en \(mu \(pl \(rg \(sc \(sq \(lq \(rq
  64. font chars \(bu \(co \(ct \(de \(dg \(di \(em \(en \(mu \(pl \(rg \(sc \(sq \(lq \(rq
  65. prefix \(14 \(12 \(34 \(+-
  66. font chars \(14 \(12 \(34 \(+-
  67. prefix \fR \fB \fI \fP \f0 \f1 \f2 \f3
  68. font chars \fR \fB \fI \fP \f0 \f1 \f2 \f3
  69. prefix .0 .1 .2 .3 .4 .5 .6 .7 .8 .9
  70. font decimals . .0 .1 .2 .3 .4 .5 .6 .7 .8 .9
  71. prefix \/ \/. \/? \/! \/, \/; \/:
  72. font escapes \/ \/. \/? \/! \/, \/; \/:
  73. prefix \, \,. \,? \,! \,, \,; \,:
  74. font escapes \, \,. \,? \,! \,, \,; \,:
  75. prefix \~ \0 \: \| \^ \& \% \!
  76. font escapes \~ \0 \: \| \^ \& \% \!
  77. prefix \b \c \C \d \D \e \f \f( \h \l \L \p \r \s \s+ \s- \S \u \v \w
  78. font escapes \b \c \C \d \D \e \f \f( \h \l \L \p \r \s \s+ \s- \S \u \v \w
  79. prefix ...
  80. font ellipsis ...
  81. prefix + - * / = == < > <= >= <? >? %
  82. font math + - * / = == < > <= >= <? >? %
  83. prefix |
  84. font misc |
  85. prefix ! : &
  86. font operators ! : &
  87. prefix ( )
  88. font parens ( )
  89. prefix # * $
  90. font reg_string # * $
  91. prefix \n \*
  92. font single_slash \n \*
  93. prefix \\n \\* \\$
  94. font tmac_escapes \\n \\* \\$
  95. character \]'
  96. comment \#
  97. comment \"