1 rizwank 1.1 /**
2 * Name: sql
3 * Description: Sybase 11 SQL.
4 * Author: Chris Jack <chris_jack@msn.com>
5 */
6
7 state sql_comment extends Highlight
8 {
9 /\\\/\*/ {
10 language_print ($0);
11 call (sql_comment);
12 }
13 /\*\\\// {
14 language_print ($0);
15 return;
16 }
17 }
18
19 state sql_string extends Highlight
20 {
21 /\\\\./ {
22 rizwank 1.1 language_print ($0);
23 }
24 /[\']/ {
25 language_print ($0);
26 return;
27 }
28 }
29
30 state sql extends HighlightEntry
31 {
32 /* Comments. */
33 /\/\*/ {
34 comment_face (true);
35 language_print ($0);
36 call (sql_comment);
37 comment_face (false);
38 }
39
40 /* String constants. */
41 /\"/ {
42 string_face (true);
43 rizwank 1.1 language_print ($0);
44 call (c_string);
45 string_face (false);
46 }
47
48 /* Character constants. */
49 /[\']/ {
50 string_face (true);
51 language_print ($0);
52 call (sql_string);
53 string_face (false);
54 }
55
56 /* Keywords.
57 */
58 /\b(\
59 [Aa][Bb][Ss]|\
60 [Aa][Cc][Oo][Ss]|\
61 [Aa][Dd][Dd]|\
62 [Aa][Ll][Ll]|\
63 [Aa][Ll][Ll][Oo][Ww]_[Dd][Uu][Pp]_[Rr][Oo][Ww]|\
64 rizwank 1.1 [Aa][Ll][Tt][Ee][Rr]|\
65 [Aa][Nn][Dd]|\
66 [Aa][Nn][Ss][Ii][Nn][Uu][Ll][Ll]|\
67 [Aa][Nn][Ss][Ii]_[Pp][Ee][Rr][Mm][Ii][Ss][Ss][Ii][Oo][Nn][Ss]|\
68 [Aa][Nn][Yy]|\
69 [Aa][Rr][Ii][Tt][Hh]_[Oo][Vv][Ee][Rr][Ff][Ll][Oo][Ww]|\
70 [Aa][Rr][Ii][Tt][Hh][Aa][Bb][Oo][Rr][Tt]|\
71 [Aa][Rr][Ii][Tt][Hh][Ii][Gg][Nn][Oo][Rr][Ee]|\
72 [Aa][Ss]|\
73 [Aa][Ss][Cc]|\
74 [Aa][Ss][Cc][Ii][Ii]|\
75 [Aa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ee][Rr]|\
324 [Tt][Rr][Uu][Nn][Cc][Aa][Tt][Ee]|\
325 [Tt][Ss][Ee][Qq][Uu][Aa][Ll]|\
326 [Uu][Nn][Ii][Oo][Nn]|\
327 [Uu][Nn][Ii][Qq][Uu][Ee]|\
328 [Uu][Pp][Dd][Aa][Tt][Ee]|\
329 [Uu][Pp][Pp][Ee][Rr]|\
330 [Uu][Ss][Ee]|\
331 [Uu][Ss][Ee][Dd]_[Pp][Gg][Ss]|\
332 [Uu][Ss][Ee][Rr]|\
333 [Uu][Ss][Ee][Rr]_[Ii][Dd]|\
334 [Uu][Ss][Ee][Rr]_[Nn][Aa][Mm][Ee]|\
335 [Uu][Ss][Ee][Rr]_[Oo][Pp][Tt][Ii][Oo][Nn]|\
336 [Uu][Ss][Ii][Nn][Gg]|\
337 rizwank 1.1 [Vv][Aa][Ll][Ii][Dd]_[Nn][Aa][Mm][Ee]|\
338 [Vv][Aa][Ll][Ii][Dd]_[Uu][Ss][Ee][Rr]|\
339 [Vv][Aa][Ll][Uu][Ee][Ss]|\
340 [Vv][Aa][Rr][Bb][Ii][Nn][Aa][Rr][Yy]|\
341 [Vv][Aa][Rr][Cc][Hh][Aa][Rr]|\
342 [Vv][Aa][Rr][Yy][Ii][Nn][Gg]|\
343 [Vv][Ii][Ee][Ww]|\
344 [Ww][Aa][Ii][Tt][Ff][Oo][Rr]|\
345 [Ww][Hh][Ee][Rr][Ee]|\
346 [Ww][Hh][Ii][Ll][Ee]|\
347 [Ww][Ii][Tt][Hh]|\
348 [Ww][Oo][Rr][Kk]|\
349 [Ww][Rr][Ii][Tt][Ee][Tt][Ee][Xx][Tt]\
350 )\b/ {
351 keyword_face (true);
352 language_print ($0);
353 keyword_face (false);
354 }
355 }
356
357
358 rizwank 1.1 /*
359 Local variables:
360 mode: c
361 End:
362 */
|