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

 1 rizwank 1.1 /**
 2              * Name: pascal
 3              * Description: Pascal programming language
 4              * Author: Michael Van Canneyt <michael@tfdec1.fys.kuleuven.ac.be>
 5              */
 6             
 7             state pascal_comment extends Highlight
 8             {
 9               /(\}|\*\))/ {
10                 language_print ($0);
11                 return;
12               }
13             }
14             
15             state pascal_string extends Highlight
16             {
17               /[\']/ {
18                 language_print ($0);
19                 return;
20               }
21             }
22 rizwank 1.1 
23             state pascal extends HighlightEntry
24             {
25               /* comments */
26               /(\{|\(\*)/ {
27                 comment_face (true);
28                 language_print ($0);
29                 call (pascal_comment);
30                 comment_face (false);
31               }
32               /* strings */
33               /[\']/ {
34                 string_face (true);
35                 language_print ($0);
36                 call (pascal_string);
37                 string_face (false);
38               }
39               /* Keywords.
40                  (build-re '(and asm array begin case const constructor destructor div
41                  do downto else end file for function goto if implementation in inline
42                  interface label mod nil not object of or packed procedure program record
43 rizwank 1.1      repeat set shlr string then to type unit until uses var while with xor)
44                  t)
45                */
46               /\b([aA]([nN][dD]|[rR][rR][aA][yY]|[sS][mM])|[bB][eE][gG][iI][nN]\
47             |[cC]([aA][sS][eE]|[oO][nN][sS][tT](|[rR][uU][cC][tT][oO][rR]))\
48             |[dD]([eE][sS][tT][rR][uU][cC][tT][oO][rR]|[iI][vV]|[oO](|[wW][nN][tT][oO]))\
49             |[eE]([lL][sS][eE]|[nN][dD])\
50             |[fF]([iI][lL][eE]|[oO][rR]|[uU][nN][cC][tT][iI][oO][nN])\
51             |[gG][oO][tT][oO]\
52             |[iI]([fF]|[mM][pP][lL][eE][mM][eE][nN][tT][aA][tT][iI][oO][nN]\
53             |[nN](|[lL][iI][nN][eE]|[tT][eE][rR][fF][aA][cC][eE]))\
54             |[lL][aA][bB][eE][lL]|[mM][oO][dD]|[nN]([iI][lL]|[oO][tT])\
55             |[oO]([bB][jJ][eE][cC][tT]|[fF]|[rR])\
56             |[pP]([aA][cC][kK][eE][dD]\
57             |[rR][oO]([cC][eE][dD][uU][rR][eE]|[gG][rR][aA][mM]))\
58             |[rR][eE]([cC][oO][rR][dD]|[pP][eE][aA][tT])\
59             |[sS]([eE][tT]|[hH][lL][rR]|[tT][rR][iI][nN][gG])\
60             |[tT]([hH][eE][nN]|[oO]|[yY][pP][eE])\
61             |[uU]([nN]([iI][tT]|[tT][iI][lL])|[sS][eE][sS])|[vV][aA][rR]\
62             |[wW]([hH][iI][lL][eE]|[iI][tT][hH])|[xX][oO][rR])\b/ {
63               keyword_face (true);
64 rizwank 1.1   language_print ($0);
65               keyword_face (false);
66               }
67             }
68             
69             
70             /*
71             Local variables:
72             mode: c
73             End:
74             */

Rizwan Kassim
Powered by
ViewCVS 0.9.2