BSD 4_2 development
[unix-history] / usr / man / man5 / vgrindefs.5
CommitLineData
f7600ca8
C
1.tr ||
2.TH VGRINDEFS 5 "11 February 1981"
3.UC 4
4.SH NAME
5vgrindefs \- vgrind's language definition data base
6.SH SYNOPSIS
7.B /usr/lib/vgrindefs
8.SH DESCRIPTION
9.I Vgrindefs
10contains all language definitions for vgrind. The data base is
11very similar to
12.IR termcap (5).
13.SH FIELDS
14The following table names and describes each field.
15.PP
16.nf
17.ta \w'k0-k9 'u +\w'Type 'u
18\fBName Type Description\fR
19pb str regular expression for start of a procedure
20bb str regular expression for start of a lexical block
21be str regular expression for the end of a lexical block
22cb str regular expression for the start of a comment
23ce str regular expression for the end of a comment
24sb str regular expression for the start of a string
25se str regular expression for the end of a string
26lb str regular expression for the start of a character constant
27le str regular expression for the end of a character constant
28tl bool present means procedures are only defined at the top
29 lexical level
30oc bool present means upper and lower case are equivalent
31kw str a list of keywords separated by spaces
32.fi
33.PP
34.B Example
35.PP
36The following entry, which describes the C language, is
37typical of a language entry.
38.PP
39.nf
40C|c:\
41 :pb=^\ed?*?\ed?\ep\ed?\(\ea?\):bb={:be=}:cb=/*:ce=*/:sb=":se=\ee":\e
42 :lb=':le=\ee':tl:\e
43 :kw=asm auto break case char continue default do double else enum\e
44 extern float for fortran goto if int long register return short\e
45 sizeof static struct switch typedef union unsigned while #define\e
46 #else #endif #if #ifdef #ifndef #include #undef # define else endif\e
47 if ifdef ifndef include undef:
48.fi
49.PP
50Note that the first field is just the language name (and any variants
51of it). Thus the C language could be specified to
52.IR vgrind (1)
53as "c" or "C".
54.PP
55Entries may continue onto multiple lines by giving a \e as the last
56character of a line.
57Capabilities in
58.I vgrindefs
59are of two types:
60Boolean capabilities which indicate that the language has
61some particular feature
62and string
63capabilities which give a regular expression or
64keyword list.
65.PP
66.B REGULAR EXPRESSIONS
67.PP
68.I Vgrindefs
69uses regular expression which are very similar to those of
70.IR ex (1)
71and
72.IR lex (1).
73The characters `^', `$', `:' and `\e'
74are reserved characters and must be
75"quoted" with a preceding \e if they
76are to be included as normal characters.
77The metasymbols and their meanings are:
78.IP $
79the end of a line
80.IP ^
81the beginning of a line
82.IP \ed
83a delimiter (space, tab, newline, start of line)
84.IP \ea
85matches any string of symbols (like .* in lex)
86.IP \ep
87matches any alphanumeric name. In a procedure definition (pb) the string
88that matches this symbol is used as the procedure name.
89.IP ()
90grouping
91.IP |
92alternation
93.IP ?
94last item is optional
95.IP \ee
96preceding any string means that the string will not match an
97input string if the input string is preceded by an escape character (\e).
98This is typically used for languages (like C) which can include the
99string delimiter in a string b escaping it.
100.PP
101Unlike other regular expressions in the system, these match words
102and not characters. Hence something like "(tramp|steamer)flies?"
103would match "tramp", "steamer", "trampflies", or "steamerflies".
104.PP
105.B KEYWORD LIST
106.PP
107The keyword list is just a list of keywords in the language separated
108by spaces. If the "oc" boolean is specified, indicating that upper
109and lower case are equivalent, then all the keywords should be
110specified in lower case.
111.SH FILES
112.DT
113/usr/lib/vgrindefs file containing terminal descriptions
114.SH SEE ALSO
115vgrind(1), troff(1)
116.SH AUTHOR
117Dave Presotto
118.SH BUGS