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"
6 vgrindefs \- vgrind's language definition data base
10 \fB/usr/lib/vgrindefs\fR
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
25 The following table names and describes each capability.
36 Regular expression for the start of an alternate form comment
40 Regular expression for the end of an alternate form comment
44 Regular expression for the start of a block
48 Regular expression for the end of a lexical block
52 Regular expression for the start of a comment
56 Regular expression for the end of a comment
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
66 Regular expression for the start of a character constant
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
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
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.
90 Regular expression for the start of a string
94 Regular expression for the end of a string
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:
128 The beginning of a line
137 A delimiter (space, tab, newline, start of line)
146 Matches any string of symbols (like `.*' in lex)
155 Matches any identifier. In a procedure definition (the `pb' capability) the
156 string that matches this symbol is used as the procedure name.
183 Last item is optional
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
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.
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.
213 \fBExample 1 \fRA sample program.
216 The following entry, which describes the C language, is typical of a language
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
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:
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'.
243 \fB\fB/usr/lib/vgrindefs\fR\fR
246 file containing vgrind descriptions
252 \fBex\fR(1), \fBlex\fR(1), \fBtroff\fR(1), \fBvgrind\fR(1)