1vgrindefs(5) Standards, Environments, and Macros vgrindefs(5)
2
3
4
6 vgrindefs - vgrind's language definition data base
7
9 /usr/lib/vgrindefs
10
11
13 vgrindefs contains all language definitions for vgrind(1). Capabilities
14 in vgrindefs are of two types: Boolean capabilities which indicate that
15 the language has some particular feature and string capabilities which
16 give a regular expression or keyword list. Entries may continue onto
17 multiple lines by giving a \ as the last character of a line. Lines
18 starting with # are comments.
19
20 Capabilities
21 The following table names and describes each capability.
22
23
24
25
26 ┌───────┬─────────┬────────────────────────────────────────────┐
27 │ Name │ Type │ Description │
28 ├───────┼─────────┼────────────────────────────────────────────┤
29 │ab │ str │Regular expression for the start of an │
30 │ │ │alternate form comment │
31 ├───────┼─────────┼────────────────────────────────────────────┤
32 │ae │ str │Regular expression for the end of an alter‐ │
33 │ │ │nate form comment │
34 ├───────┼─────────┼────────────────────────────────────────────┤
35 │bb │ str │Regular expression for the start of a block │
36 ├───────┼─────────┼────────────────────────────────────────────┤
37 │be │ str │Regular expression for the end of a lexical │
38 │ │ │block │
39 ├───────┼─────────┼────────────────────────────────────────────┤
40 │cb │ str │Regular expression for the start of a com‐ │
41 │ │ │ment │
42 ├───────┼─────────┼────────────────────────────────────────────┤
43 │ce │ str │Regular expression for the end of a comment │
44 ├───────┼─────────┼────────────────────────────────────────────┤
45 │id │ str │String giving characters other than letters │
46 │ │ │and digits that may legally occur in iden‐ │
47 │ │ │tifiers (default `_') │
48 ├───────┼─────────┼────────────────────────────────────────────┤
49 │kw │ str │A list of keywords separated by spaces │
50 ├───────┼─────────┼────────────────────────────────────────────┤
51 │lb │ str │Regular expression for the start of a char‐ │
52 │ │ │acter constant │
53 ├───────┼─────────┼────────────────────────────────────────────┤
54 │le │ str │Regular expression for the end of a charac‐ │
55 │ │ │ter constant │
56 ├───────┼─────────┼────────────────────────────────────────────┤
57 │oc │ bool │Present means upper and lower case are │
58 │ │ │equivalent │
59 ├───────┼─────────┼────────────────────────────────────────────┤
60 │pb │ str │Regular expression for start of a procedure │
61 ├───────┼─────────┼────────────────────────────────────────────┤
62 │pl │ bool │Procedure definitions are constrained to │
63 │ │ │the lexical level matched by the `px' capa‐ │
64 │ │ │bility │
65 ├───────┼─────────┼────────────────────────────────────────────┤
66 │px │ str │A match for this regular expression indi‐ │
67 │ │ │cates that procedure definitions may occur │
68 │ │ │at the next lexical level. Useful for lisp- │
69 │ │ │like languages in which procedure defini‐ │
70 │ │ │tions occur as subexpressions of defuns. │
71 ├───────┼─────────┼────────────────────────────────────────────┤
72 │sb │ str │Regular expression for the start of a │
73 │ │ │string │
74 ├───────┼─────────┼────────────────────────────────────────────┤
75 │se │ str │Regular expression for the end of a string │
76 ├───────┼─────────┼────────────────────────────────────────────┤
77 │tc │ str │Use the named entry as a continuation of │
78 │ │ │this one │
79 ├───────┼─────────┼────────────────────────────────────────────┤
80 │tl │ bool │Present means procedures are only defined │
81 │ │ │at the top lexical level │
82 └───────┴─────────┴────────────────────────────────────────────┘
83
84 Regular Expressions
85 vgrindefs uses regular expressions similar to those of ex(1) and
86 lex(1). The characters `^', `$', `:', and `\' are reserved characters
87 and must be `quoted' with a preceding \ if they are to be included as
88 normal characters. The metasymbols and their meanings are:
89
90 $ The end of a line
91
92
93 ^ The beginning of a line
94
95
96 \d A delimiter (space, tab, newline, start of line)
97
98
99 \a Matches any string of symbols (like `.*' in lex)
100
101
102 \p Matches any identifier. In a procedure definition (the `pb'
103 capability) the string that matches this symbol is used as the
104 procedure name.
105
106
107 () Grouping
108
109
110 | Alternation
111
112
113 ? Last item is optional
114
115
116 \e Preceding any string means that the string will not match an
117 input string if the input string is preceded by an escape char‐
118 acter (\). This is typically used for languages (like C) that
119 can include the string delimiter in a string by escaping it.
120
121
122
123 Unlike other regular expressions in the system, these match words and
124 not characters. Hence something like `(tramp|steamer)flies?' would
125 match `tramp', `steamer', `trampflies', or `steamerflies'. Contrary to
126 some forms of regular expressions, vgrindef alternation binds very
127 tightly. Grouping parentheses are likely to be necessary in expressions
128 involving alternation.
129
130 Keyword List
131 The keyword list is just a list of keywords in the language separated
132 by spaces. If the `oc' boolean is specified, indicating that upper and
133 lower case are equivalent, then all the keywords should be specified in
134 lower case.
135
137 Example 1 A sample program.
138
139
140 The following entry, which describes the C language, is typical of a
141 language entry.
142
143
144 C|c|the C programming language:\
145 :pb=^\d?*?\d?\p\d?(\a?\)(\d|{):bb={:be=}:cb=/*:ce=*/:sb=":se=\e":\
146 :le=\e':tl:\
147 :kw=asm auto break case char continue default do double else enum\
148 extern float for fortran goto if int long register return short\
149 sizeof static struct switch typedef union unsigned void while #define\
150 #else #endif #if #ifdef #ifndef #include #undef # define endif\
151 ifdef ifndef include undef defined:
152
153
154
155
156 Note that the first field is just the language name (and any variants
157 of it). Thus the C language could be specified to vgrind(1) as `c' or
158 `C'.
159
160
162 /usr/lib/vgrindefs file containing vgrind descriptions
163
164
166 ex(1), lex(1), troff(1), vgrind(1)
167
168
169
170SunOS 5.11 10 Aug 1994 vgrindefs(5)