9330 stack overflow when creating a deeply nested dataset
[unleashed.git] / usr / src / man / man5 / vgrindefs.5
blobff29bfd8a3ec96ffeb357460124b221e53a76426
1 '\" te
2 .\" Copyright (c) 1994, Sun Microsystems, Inc. All Rights Reserved.
3 .\"  Copyright (c) 1983 Regents of the University of California.  All rights reserved.  The Berkeley software License Agreement specifies the terms and conditions for redistribution.
4 .TH VGRINDEFS 5 "Aug 10, 1994"
5 .SH NAME
6 vgrindefs \- vgrind's language definition data base
7 .SH SYNOPSIS
8 .LP
9 .nf
10 \fB/usr/lib/vgrindefs\fR
11 .fi
13 .SH DESCRIPTION
14 .sp
15 .LP
16 \fBvgrindefs\fR contains all language definitions for \fBvgrind\fR(1).
17 Capabilities in \fBvgrindefs\fR are of two types: Boolean capabilities which
18 indicate that the language has some particular feature and string capabilities
19 which give a regular expression or keyword list. Entries may continue onto
20 multiple lines by giving a \e as the last character of a line. Lines starting
21 with # are comments.
22 .SS "Capabilities"
23 .sp
24 .LP
25 The following table names and describes each capability.
26 .sp
28 .sp
29 .TS
30 box;
31 c | c | c
32 l | l | l .
33 Name    Type    Description
35 \fBab\fR        \fBstr\fR       T{
36 Regular expression for the start of an alternate form comment
39 \fBae\fR        \fBstr\fR       T{
40 Regular expression for the end of an alternate form comment
43 \fBbb\fR        \fBstr\fR       T{
44 Regular expression for the start of a block
47 \fBbe\fR        \fBstr\fR       T{
48 Regular expression for the end of a lexical block
51 \fBcb\fR        \fBstr\fR       T{
52 Regular expression for the start of a comment
55 \fBce\fR        \fBstr\fR       T{
56 Regular expression for the end of a comment
59 \fBid\fR        \fBstr\fR       T{
60 String giving characters other than letters and digits that may legally occur in identifiers (default `_')
63 \fBkw\fR        \fBstr\fR       A list of keywords separated by spaces
65 \fBlb\fR        \fBstr\fR       T{
66 Regular expression for the start of a character constant
69 \fBle\fR        \fBstr\fR       T{
70 Regular expression for the end of a character constant
73 \fBoc\fR        \fBbool\fR      T{
74 Present means upper and lower case are equivalent
77 \fBpb\fR        \fBstr\fR       T{
78 Regular expression for start of a procedure
81 \fBpl\fR        \fBbool\fR      T{
82 Procedure definitions are constrained to the lexical level matched by the `px' capability
85 \fBpx\fR        \fBstr\fR       T{
86 A match for this regular expression indicates that procedure definitions may occur at the next lexical level. Useful for lisp-like languages in which procedure definitions occur as subexpressions of defuns.
89 \fBsb\fR        \fBstr\fR       T{
90 Regular expression for the start of a string
93 \fBse\fR        \fBstr\fR       T{
94 Regular expression for the end of a string
97 \fBtc\fR        \fBstr\fR       T{
98 Use the named entry as a continuation of this one
101 \fBtl\fR        \fBbool\fR      T{
102 Present means procedures are only defined at the top lexical level
106 .SS "Regular Expressions"
109 \fBvgrindefs\fR uses regular expressions similar to those of \fBex\fR(1) and
110 \fBlex\fR(1). The characters `^', `$', `:', and `\e' are reserved characters
111 and must be `quoted' with a preceding \e if they are to be included as normal
112 characters. The metasymbols and their meanings are:
114 .ne 2
116 \fB\fB$\fR\fR
118 .RS 7n
119 The end of a line
123 .ne 2
125 \fB\fB^\fR\fR
127 .RS 7n
128 The beginning of a line
132 .ne 2
134 \fB\fB\ed\fR\fR
136 .RS 7n
137 A delimiter (space, tab, newline, start of line)
141 .ne 2
143 \fB\fB\ea\fR\fR
145 .RS 7n
146 Matches any string of symbols (like `.*' in lex)
150 .ne 2
152 \fB\fB\ep\fR\fR
154 .RS 7n
155 Matches any identifier. In a procedure definition (the `pb' capability) the
156 string that matches this symbol is used as the procedure name.
160 .ne 2
162 \fB\fB()\fR\fR
164 .RS 7n
165 Grouping
169 .ne 2
171 \fB\fB|\fR\fR
173 .RS 7n
174 Alternation
178 .ne 2
180 \fB\fB?\fR\fR
182 .RS 7n
183 Last item is optional
187 .ne 2
189 \fB\fB\ee\fR\fR
191 .RS 7n
192 Preceding any string means that the string will not match an input string if
193 the input string is preceded by an escape character (\e). This is typically
194 used for languages (like C) that can include the string delimiter in a string
195 by escaping it.
200 Unlike other regular expressions in the system, these match words and not
201 characters. Hence something like `(tramp|steamer)flies?' would match `tramp',
202 `steamer', `trampflies', or `steamerflies'. Contrary to some forms of regular
203 expressions, \fBvgrindef\fR alternation binds very tightly. Grouping
204 parentheses are likely to be necessary in expressions involving alternation.
205 .SS "Keyword List"
208 The keyword list is just a list of keywords in the language separated by
209 spaces. If the `oc' boolean is specified, indicating that upper and lower case
210 are equivalent, then all the keywords should be specified in lower case.
211 .SH EXAMPLES
213 \fBExample 1 \fRA sample program.
216 The following entry, which describes the C language, is typical of a language
217 entry.
220 .in +2
222 C|c|the C programming language:\e
223     :pb=^\ed?*?\ed?\ep\ed?(\ea?\e)(\ed|{):bb={:be=}:cb=/*:ce=*/:sb=":se=\ee":\e
224     :le=\ee':tl:\e
225     :kw=asm auto break case char continue default do double else enum\e
226     extern float for fortran goto if int long register return short\e
227     sizeof static struct switch typedef union unsigned void while #define\e
228     #else #endif #if #ifdef #ifndef #include #undef # define endif\e
229     ifdef ifndef include undef defined:
231 .in -2
236 Note that the first field is just the language name (and any variants of it).
237 Thus the C language could be specified to \fBvgrind\fR(1) as `c' or `C'.
239 .SH FILES
241 .ne 2
243 \fB\fB/usr/lib/vgrindefs\fR\fR
245 .RS 22n
246 file containing vgrind descriptions
249 .SH SEE ALSO
252 \fBex\fR(1), \fBlex\fR(1), \fBtroff\fR(1), \fBvgrind\fR(1)