]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/ocaml/contrib/tools/keywords.r
Update
[l4.git] / l4 / pkg / ocaml / ocaml / contrib / tools / keywords.r
1 /***********************************************************************/
2 /*                                                                     */
3 /*                           Objective Caml                            */
4 /*                                                                     */
5 /*             Damien Doligez, projet Para, INRIA Rocquencourt         */
6 /*                                                                     */
7 /*  Copyright 1996 Institut National de Recherche en Informatique et   */
8 /*  en Automatique.  All rights reserved.  This file is distributed    */
9 /*  under the terms of the GNU Library General Public License, with    */
10 /*  the special exception on linking described in file ../LICENSE.     */
11 /*                                                                     */
12 /***********************************************************************/
13
14 /* $Id: keywords.r 4144 2001-12-07 13:41:02Z xleroy $ */
15
16 type 'Odds' {
17   longint;                  /* resource ID of corresponding 'Sods' */
18   longint = $$CountOf (suffixes);
19   wide array suffixes { pstring; };
20 };
21
22 type 'Sods' {
23   longint = 0xA5666D66;
24   pstring;                  /* default token breaks */
25   longint = $$CountOf (keywords);
26   wide array keywords {
27     pstring;                /* the keyword itself */
28     longint                 /* the keyword type */
29       case=0,
30       caseWord=1,
31       noCase=2,
32       noCaseWord=3,
33       line=4,
34       mystery=0xB,
35       opening=0x10000,
36       closing=0x20000,
37       openingFill=0x50000,
38       closingFill=0x60000,
39       quote=0x80000;
40     literal longint;        /* scoping parameter */
41     longint                 /* color */
42       red=0,
43       blue=1,
44       bluegreen=2,
45       bluepurple=3,
46       grey=4,
47       darkgreen=7,
48       black=255;
49   };
50 };
51
52 resource 'Odds' (26087, "O'Caml") {
53   26087,
54   { ".ml", ".mli", ".mll", ".mly", ".mlp" }
55 };
56
57 resource 'Sods' (26087, "O'Caml Keywords") {
58   "\t\r\n ~!$%^&*()/-+=<>,[]{};",
59   { 
60     "(*", openingFill, '(**)', red,
61     "*)", closingFill, '(**)', red,
62     "\"", quote, 0, grey,
63 #define KEY caseWord, 0, blue
64     "and", KEY,
65     "as", KEY,
66     "assert", KEY,
67     "begin", KEY,
68     "class", KEY,
69     "constraint", KEY,
70     "do", KEY,
71     "done", KEY,
72     "downto", KEY,
73     "else", KEY,
74     "end", KEY,
75     "exception", KEY,
76     "external", KEY,
77     "false", KEY,
78     "for", KEY,
79     "fun", KEY,
80     "function", KEY,
81     "functor", KEY,
82     "if", KEY,
83     "in", KEY,
84     "include", KEY,
85     "inherit", KEY,
86     "initializer", KEY,
87     "lazy", KEY,
88     "let", KEY,
89     "match", KEY,
90     "method", KEY,
91     "module", KEY,
92     "mutable", KEY,
93     "new", KEY,
94     "object", KEY,
95     "of", KEY,
96     "open", KEY,
97     "or", KEY,
98     "parser", KEY,
99     "private", KEY,
100     "rec", KEY,
101     "sig", KEY,
102     "struct", KEY,
103     "then", KEY,
104     "to", KEY,
105     "true", KEY,
106     "try", KEY,
107     "type", KEY,
108     "val", KEY,
109     "virtual", KEY,
110     "when", KEY,
111     "while", KEY,
112     "with", KEY,
113     "mod", KEY,
114     "land", KEY,
115     "lor", KEY,
116     "lxor", KEY,
117     "lsl", KEY,
118     "lsr", KEY,
119     "asr", KEY,
120   }
121 };