1VGRINDEFS(5)                  File Formats Manual                 VGRINDEFS(5)
2
3
4

NAME

6       vgrindefs - vgrind's language definition data base
7

SYNOPSIS

9       /usr/share/misc/vgrindefs
10

DESCRIPTION

12       Vgrindefs  contains all language definitions for vgrind.  The data base
13       is very similar to termcap(5).
14

FIELDS

16       The following table names and describes each field.
17
18       Name   Type  Description
19       pb     str   regular expression for start of a procedure
20       bb     str   regular expression for start of a lexical block
21       be     str   regular expression for the end of a lexical block
22       cb     str   regular expression for the start of a comment
23       ce     str   regular expression for the end of a comment
24       sb     str   regular expression for the start of a string
25       se     str   regular expression for the end of a string
26       lb     str   regular expression for the start of a character constant
27       le     str   regular expression for the end of a character constant
28       tl     bool  present means procedures are only defined at the top
29                    lexical level
30       oc     bool  present means upper and lower case are equivalent
31       kw     str   a list of keywords separated by spaces
32
33       Example
34
35       The following entry, which describes the C language, is  typical  of  a
36       language entry.
37
38       C|c:   :pb=^\d?*?\d?\p\d?a?:bb={:be=}:cb=/*:ce=*/:sb=":se=\e":\
39              :lb=':le=\e':tl:\
40              :kw=asm auto break case char continue default do double else enum\
41              extern float for fortran goto if int long register return short\
42              sizeof static struct switch typedef union unsigned while #define\
43              #else #endif #if #ifdef #ifndef #include #undef # define else endif\
44              if ifdef ifndef include undef:
45
46       Note  that  the first field is just the language name (and any variants
47       of it).  Thus the C language could be specified to vgrind(1) as "c"  or
48       "C".
49
50       Entries  may  continue  onto  multiple  lines by giving a \ as the last
51       character of a line.  Capabilities in vgrindefs are of two types: Bool‐
52       ean  capabilities  which indicate that the language has some particular
53       feature and string capabilities which give a regular expression or key‐
54       word list.
55
56       REGULAR EXPRESSIONS
57
58       Vgrindefs  uses  regular  expression which are very similar to those of
59       ex(1) and lex(1).  The characters `^', `$', `:' and  `\'  are  reserved
60       characters  and  must  be "quoted" with a preceding \ if they are to be
61       included as normal characters.  The metasymbols and their meanings are:
62
63       $      the end of a line
64
65       ^      the beginning of a line
66
67       \d     a delimiter (space, tab, newline, start of line)
68
69       \a     matches any string of symbols (like .* in lex)
70
71       \p     matches any alphanumeric name.  In a procedure  definition  (pb)
72              the  string  that  matches  this symbol is used as the procedure
73              name.
74
75       ()     grouping
76
77       |      alternation
78
79       ?      last item is optional
80
81       \e     preceding any string means that the string  will  not  match  an
82              input  string if the input string is preceded by an escape char‐
83              acter (\).  This is typically used for languages (like C)  which
84              can include the string delimiter in a string b escaping it.
85
86       Unlike  other regular expressions in the system,  these match words and
87       not characters.  Hence something  like  "(tramp|steamer)flies?"   would
88       match "tramp", "steamer", "trampflies", or "steamerflies".
89
90       KEYWORD LIST
91
92       The  keyword  list is just a list of keywords in the language separated
93       by spaces.  If the "oc" boolean is specified, indicating that upper and
94       lower case are equivalent, then all the keywords should be specified in
95       lower case.
96

FILES

98       /usr/share/misc/vgrindefs     file containing terminal descriptions
99

SEE ALSO

101       vgrind(1), troff(1)
102

AUTHOR

104       Dave Presotto
105

BUGS

1074.2 Berkeley Distribution      October 22, 1996                   VGRINDEFS(5)
Impressum