(file) Return to delphi.st CVS log (file) (dir) Up to [RizwankCVS] / testProject / share / enscript / hl

 1 rizwank 1.1 /**
 2              * Name: delphi
 3              * Description: Delphi programming language.
 4              * Author: Michael Van Canneyt <michael@tfdec1.fys.kuleuven.ac.be>
 5              */
 6             
 7             state delphi extends HighlightEntry
 8             {
 9               BEGIN {
10                 require_state (pascal);
11               }
12             
13               /* comments */
14               /(\{|\(\*)/ {
15                 comment_face (true);
16                 language_print ($0);
17                 call (pascal_comment);
18                 comment_face (false);
19               }
20               /* C++ -style comments */
21               /\/\// {
22 rizwank 1.1     comment_face (true);
23                 language_print ($0);
24                 call (eat_one_line);
25                 comment_face (false);
26               }
27               /* strings */
28               /[\']/ {
29                 string_face (true);
30                 language_print ($0);
31                 call (pascal_string);
32                 string_face (false);
33               }
34               /* Keywords.
35                  (build-re '(and asm array begin case const constructor destructor
36                  div do downto else end file for function goto if implementation
37                  in inline interface label mod nil not object of or packed
38                  procedure program record repeat set shlr string then to type
39                  unit until uses var while with xor As class except exports
40                  finalization finally inherited initialization is library property
41                  raise threAdvar try absolute abstract assembler automated cdecl
42                  default dispid dynamic export external far forward index message
43 rizwank 1.1      name near nodefault override pascal private protected public
44                  published read register resident stdcall stored virtual write)
45                  t)
46                */
47               /\b(A[sS]\
48             |[aA]([bB][sS]([oO][lL][uU][tT][eE]|[tT][rR][aA][cC][tT])|[nN][dD]\
49             |[rR][rR][aA][yY]|[sS]([mM]|[sS][eE][mM][bB][lL][eE][rR])\
50             |[uU][tT][oO][mM][aA][tT][eE][dD])\
51             |[bB][eE][gG][iI][nN]\
52             |[cC]([aA][sS][eE]|[dD][eE][cC][lL]|[lL][aA][sS][sS]\
53             |[oO][nN][sS][tT](|[rR][uU][cC][tT][oO][rR]))\
54             |[dD]([eE]([fF][aA][uU][lL][tT]|[sS][tT][rR][uU][cC][tT][oO][rR])\
55             |[iI]([sS][pP][iI][dD]|[vV])|[oO](|[wW][nN][tT][oO])\
56             |[yY][nN][aA][mM][iI][cC])\
57             |[eE]([lL][sS][eE]|[nN][dD]\
58             |[xX]([cC][eE][pP][tT]|[pP][oO][rR][tT](|[sS])|[tT][eE][rR][nN][aA][lL]))\
59             |[fF]([aA][rR]\
60             |[iI]([lL][eE]|[nN][aA][lL]([iI][zZ][aA][tT][iI][oO][nN]|[lL][yY]))\
61             |[oO][rR](|[wW][aA][rR][dD])|[uU][nN][cC][tT][iI][oO][nN])\
62             |[gG][oO][tT][oO]\
63             |[iI]([fF]|[mM][pP][lL][eE][mM][eE][nN][tT][aA][tT][iI][oO][nN]\
64 rizwank 1.1 |[nN](|[dD][eE][xX]|[hH][eE][rR][iI][tT][eE][dD]\
65             |[iI][tT][iI][aA][lL][iI][zZ][aA][tT][iI][oO][nN]|[lL][iI][nN][eE]\
66             |[tT][eE][rR][fF][aA][cC][eE])\
67             |[sS])\
68             |[lL]([aA][bB][eE][lL]|[iI][bB][rR][aA][rR][yY])\
69             |[mM]([eE][sS][sS][aA][gG][eE]|[oO][dD])\
70             |[nN]([aA][mM][eE]|[eE][aA][rR]|[iI][lL]\
71             |[oO]([dD][eE][fF][aA][uU][lL][tT]|[tT]))\
72             |[oO]([bB][jJ][eE][cC][tT]|[fF]|[rR]|[vV][eE][rR][rR][iI][dD][eE])\
73             |[pP]([aA]([cC][kK][eE][dD]|[sS][cC][aA][lL])\
74             |[rR]([iI][vV][aA][tT][eE]\
75             |[oO]([cC][eE][dD][uU][rR][eE]|[gG][rR][aA][mM]|[pP][eE][rR][tT][yY]\
76             |[tT][eE][cC][tT][eE][dD]))\
77             |[uU][bB][lL][iI]([cC]|[sS][hH][eE][dD]))\
78             |[rR]([aA][iI][sS][eE]\
79             |[eE]([aA][dD]|[cC][oO][rR][dD]|[gG][iI][sS][tT][eE][rR]|[pP][eE][aA][tT]\
80             |[sS][iI][dD][eE][nN][tT]))\
81             |[sS]([eE][tT]|[hH][lL][rR]\
82             |[tT]([dD][cC][aA][lL][lL]|[oO][rR][eE][dD]|[rR][iI][nN][gG]))\
83             |[tT]([hH]([eE][nN]|[rR][eE]A[dD][vV][aA][rR])|[oO]|[rR][yY]|[yY][pP][eE])\
84             |[uU]([nN]([iI][tT]|[tT][iI][lL])|[sS][eE][sS])\
85 rizwank 1.1 |[vV]([aA][rR]|[iI][rR][tT][uU][aA][lL])\
86             |[wW]([hH][iI][lL][eE]|[iI][tT][hH]|[rR][iI][tT][eE])|[xX][oO][rR])\b/ {
87                 keyword_face (true);
88                 language_print ($0);
89                 keyword_face (false);
90               }
91             }
92             
93             
94             /*
95             Local variables:
96             mode: c
97             End:
98             */

Rizwan Kassim
Powered by
ViewCVS 0.9.2