Contains the language definition database for the vgrind command.
The vgrindefs file format contains all the language definitions for the vgrind command. The database is very similar to the terminfo file format (file of terminal capabilities).
The following table contains the name and description of each field:
Name | Type | Description |
---|---|---|
ab | str | Alternate regular expression for the start of a comment. |
ae | str | Alternate regular expression for the end of a comment. |
pb | str | Regular expression for the start of a procedure. |
bb | str | Regular expression for the start of a lexical block. |
be | str | Regular expression for the end of a lexical block. |
cb | str | Regular expression for the start of a comment. |
ce | str | Regular expression for the end of a comment. |
sb | str | Regular expression for the start of a string. |
se | str | Regular expression for the end of a string. |
lb | str | Regular expression for the start of a character constant. |
le | str | Regular expression for the end of a character constant. |
tl | bool | Presence means procedures are only defined at the top lexical level. |
oc | bool | Presence means upper and lowercase are equivalent. |
kw | str | List of keywords separated by spaces. |
The following entry, which describes the C language, is typical of a language entry:
C|c: :pb=^\d?*?\d?\p\d??):bb={:be=}:cb=/*:ce=*/:sb=":se=\e":\ :lb=':le=\e':tl:\ :kw=asm auto break case char continue default do double else enum\ extern float for fortran goto if int long register return short\ sizeof static struct switch typedef union unsigned while #define\ #else #endif #if #ifdef #ifndef #include #undef # define else endif\ if ifdef ifndef include undef:
The first field is the language name or any variants of the name. Thus the C language can be specified to the vgrind command in either lowercase or uppercase c.
Entries can continue onto multiple lines by giving a \ (backslash) as the last character of a line. The vgrindefs file format has the following two capabilities:
In Java, where comments can be delimited either by a starting "/*" or an ending "*", or by a starting "//" and "end" at the end of the line, the Java vgrindefs definition might be:
cb=/*:ce=*/:ab=//:ae=$
The vgrindefs file format uses regular expressions similar to those of the ex command and the lex command. The characters ^ (caret), $ (dollar sign), : (colon), and \ (backslash) are reserved characters and must be quoted with a preceding \ (backslash) if they are to be included as normal characters. The metasymbols and their meanings follow:
Unlike other regular expressions in the system, these metasymbols match words and not characters. Hence the pattern "(tramp|steamer)flies?" matches "tramp," "steamer," "trampflies," or "steamerflies."
The keyword list lists keywords in the language, separated by spaces. If the oc field is specified, indicating that uppercase and lowercase are equivalent, then all the keywords should be specified in lowercase.
/usr/share/lib/vgrindefs | Contains terminal descriptions. |
The ex command, lex command, troff command, vgrind command.
The terminfo file format.