1 rizwank 1.1 /**
2 * Name: nroff
3 * Description: Manual pages formatted with the nroff program.
4 * Author: Markku Rossi <mtr@iki.fi>
5 */
6
7 state nroff_italic extends Highlight
8 {
9 /_\010(.)/ {
10 language_print ($1);
11 }
12 /([^_])\010.\010.\010./ {
13 bold (true);
14 language_print ($1);
15 call (nroff_bold);
16 bold (false);
17 italic (true);
18 }
19 /.|\n/ {
20 italic (false);
21 language_print ($0);
22 rizwank 1.1 return;
23 }
24 }
25
26 state nroff_bold extends Highlight
27 {
28 /([^_])\010.\010.\010./ {
29 language_print ($1);
30 }
31 /_\010(.)/ {
32 italic (true);
33 language_print ($1);
34 call (nroff_italic);
35 italic (false);
36 bold (true);
37 }
38 /.|\n/ {
39 bold (false);
40 language_print ($0);
41 return;
42 }
43 rizwank 1.1 }
44
45 state nroff extends HighlightEntry
46 {
47 /_\010(.)/ {
48 italic (true);
49 language_print ($1);
50 call (nroff_italic);
51 }
52 /([^_])\010.\010.\010./ {
53 bold (true);
54 language_print ($1);
55 call (nroff_bold);
56 }
57 }
58
59
60 /*
61 Local variables:
62 mode: c
63 End:
64 rizwank 1.1 */
|