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