Annotation of 43BSDReno/pgrm/vgrind/vgrindefs.5, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1989 The Regents of the University of California.
                      2: .\" All rights reserved.
                      3: .\"
                      4: .\" Redistribution and use in source and binary forms are permitted provided
                      5: .\" that: (1) source distributions retain this entire copyright notice and
                      6: .\" comment, and (2) distributions including binaries display the following
                      7: .\" acknowledgement:  ``This product includes software developed by the
                      8: .\" University of California, Berkeley and its contributors'' in the
                      9: .\" documentation or other materials provided with the distribution and in
                     10: .\" all advertising materials mentioning features or use of this software.
                     11: .\" Neither the name of the University nor the names of its contributors may
                     12: .\" be used to endorse or promote products derived from this software without
                     13: .\" specific prior written permission.
                     14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
                     15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
                     16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     17: .\"
                     18: .\"    @(#)vgrindefs.5 6.5 (Berkeley) 6/23/90
                     19: .\"
                     20: .tr ||
                     21: .TH VGRINDEFS 5 "June 23, 1990"
                     22: .UC 5
                     23: .SH NAME
                     24: vgrindefs \- vgrind's language definition data base
                     25: .SH SYNOPSIS
                     26: .B /usr/share/misc/vgrindefs
                     27: .SH DESCRIPTION
                     28: .I Vgrindefs
                     29: contains all language definitions for vgrind.  The data base is
                     30: very similar to 
                     31: .IR termcap (5).
                     32: .SH FIELDS
                     33: The following table names and describes each field.  
                     34: .PP
                     35: .nf
                     36: .ta \w'k0-k9  'u +\w'Type  'u
                     37: \fBName        Type    Description\fR
                     38: pb     str     regular expression for start of a procedure
                     39: bb     str     regular expression for start of a lexical block
                     40: be     str     regular expression for the end of a lexical block
                     41: cb     str     regular expression for the start of a comment
                     42: ce     str     regular expression for the end of a comment
                     43: sb     str     regular expression for the start of a string
                     44: se     str     regular expression for the end of a string
                     45: lb     str     regular expression for the start of a character constant
                     46: le     str     regular expression for the end of a character constant
                     47: tl     bool    present means procedures are only defined at the top 
                     48:                lexical level
                     49: oc     bool    present means upper and lower case are equivalent
                     50: kw     str     a list of keywords separated by spaces
                     51: .fi
                     52: .PP
                     53: .B Example
                     54: .PP
                     55: The following entry, which describes the C language, is 
                     56: typical of a language entry.
                     57: .PP
                     58: .nf
                     59: C|c:\
                     60:        :pb=^\ed?*?\ed?\ep\ed?\(\ea?\):bb={:be=}:cb=/*:ce=*/:sb=":se=\ee":\e
                     61:        :lb=':le=\ee':tl:\e
                     62:        :kw=asm auto break case char continue default do double else enum\e
                     63:        extern float for fortran goto if int long register return short\e
                     64:        sizeof static struct switch typedef union unsigned while #define\e
                     65:        #else #endif #if #ifdef #ifndef #include #undef # define else endif\e
                     66:        if ifdef ifndef include undef:
                     67: .fi
                     68: .PP
                     69: Note that the first field is just the language name (and any variants
                     70: of it).  Thus the C language could be specified to
                     71: .IR vgrind (1)
                     72: as "c" or "C".
                     73: .PP
                     74: Entries may continue onto multiple lines by giving a \e as the last
                     75: character of a line.
                     76: Capabilities in
                     77: .I vgrindefs
                     78: are of two types:
                     79: Boolean capabilities which indicate that the language has
                     80: some particular feature
                     81: and string
                     82: capabilities which give a regular expression or 
                     83: keyword list.
                     84: .PP
                     85: .B REGULAR EXPRESSIONS
                     86: .PP
                     87: .I Vgrindefs
                     88: uses regular expression which are very similar to those of 
                     89: .IR ex (1)
                     90: and
                     91: .IR lex (1).
                     92: The characters `^', `$', `:' and `\e'
                     93: are reserved characters and must be
                     94: "quoted" with a preceding \e if they
                     95: are to be included as normal characters.
                     96: The metasymbols and their meanings are:
                     97: .IP $
                     98: the end of a line
                     99: .IP ^
                    100: the beginning of a line
                    101: .IP \ed
                    102: a delimiter (space, tab, newline, start of line)
                    103: .IP \ea
                    104: matches any string of symbols (like .* in lex)
                    105: .IP \ep
                    106: matches any alphanumeric name.  In a procedure definition (pb) the string
                    107: that matches this symbol is used as the procedure name.
                    108: .IP ()
                    109: grouping
                    110: .IP |
                    111: alternation
                    112: .IP ?
                    113: last item is optional
                    114: .IP \ee
                    115: preceding any string means that the string will not match an
                    116: input string if the input string is preceded by an escape character (\e).
                    117: This is typically used for languages (like C) which can include the
                    118: string delimiter in a string by escaping it.
                    119: .PP
                    120: Unlike other regular expressions in the system,  these match words
                    121: and not characters.  Hence something like "(tramp|steamer)flies?"
                    122: would match "tramp", "steamer", "trampflies", or "steamerflies".
                    123: .PP
                    124: .B KEYWORD LIST
                    125: .PP
                    126: The keyword list is just a list of keywords in the language separated
                    127: by spaces.  If the "oc" boolean is specified, indicating that upper
                    128: and lower case are equivalent, then all the keywords should be 
                    129: specified in lower case.
                    130: .SH FILES
                    131: .DT
                    132: /usr/share/misc/vgrindefs      file containing terminal descriptions
                    133: .SH SEE ALSO
                    134: vgrind(1), troff(1)
                    135: .SH AUTHOR
                    136: Dave Presotto
                    137: .SH BUGS

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.