vgrindefs.5

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 5 代码 · 共 113 行

5
113
字号
.\" SCCSID: @(#)vgrindefs.5	8.1	9/11/90.tr ||.TH vgrindefs 5 VAX "" Unsupported.SH Namevgrindefs \- vgrind's language definition data base.SH Syntax.B /usr/lib/vgrindefs.SH DescriptionThe.PN vgrindefsdatabase contains all language definitions for vgrind.  The database isvery similar to .MS termcap 5 ..SS FieldsThe following table names and describes each field.  .PP.nf.ta \w'k0-k9  'u +\w'Type  'u\fBName	Type	Description\fRpb	str	regular expression for start of a procedurebb	str	regular expression for start of a lexical blockbe	str	regular expression for the end of a lexical blockcb	str	regular expression for the start of a commentce	str	regular expression for the end of a commentsb	str	regular expression for the start of a stringse	str	regular expression for the end of a stringlb	str	regular expression for the start of a character constantle	str	regular expression for the end of a character constanttl	bool	present means procedures are only defined at the top 		lexical leveloc	bool	present means upper and lower case are equivalentkw	str	a list of keywords separated by spaces.fi.PP.PPEntries may continue onto multiple lines by giving a \e as the lastcharacter of a line.Capabilities in.I vgrindefsare of two types:Boolean capabilities which indicate that the language hassome particular featureand stringcapabilities which give a regular expression or keyword list..SS Regular ExpressionsThe .PN vgrindefsdatabase  uses regular expression which are very similar to those of .MS ex 1and.MS lex 1 .The characters `^', `$', `:' and `\e'are reserved characters and must bequoted with a preceding \e if theyare to be included as normal characters.The metasymbols and their meanings are:.IP $the end of a line.IP ^the beginning of a line.IP \eda delimiter (space, tab, newline, start of line).IP \eamatches any string of symbols (like .* in lex).IP \epmatches any alphanumeric name.  In a procedure definition (pb) the stringthat matches this symbol is used as the procedure name..IP ()grouping.IP |alternation.IP ?last item is optional.IP \eepreceding any string means that the string will not match aninput string if the input string is preceded by an escape character (\e).This is typically used for languages (like C) which can include thestring delimiter in a string by escaping it..PPUnlike other regular expressions in the system,  these match wordsand not characters.  Hence something like "(tramp|steamer)flies?"would match "tramp", "steamer", "trampflies", or "steamerflies"..SS Keyword ListThe keyword list is just a list of keywords in the language separatedby spaces.  If the "oc" boolean is specified, indicating that upperand lower case are equivalent, then all the keywords should be specified in lower case..SH ExamplesThe following entry, which describes the C language, is typical of a language entry..PP.nfC|c:\	:pb=^\ed?*?\ed?\ep\ed?\(\ea?\):bb={:be=}:cb=/*:ce=*/:sb=":se=\ee":\e	:lb=':le=\ee':tl:\e	:kw=asm auto break case char continue default do double else enum\e	extern float for fortran goto if int long register return short\e	sizeof static struct switch typedef union unsigned while #define\e	#else #endif #if #ifdef #ifndef #include #undef # define else endif\e	if ifdef ifndef include undef:.fi.PPNote that the first field is just the language name (and any variantsof it).  Thus the C language could be specified to.MS vgrind 1 as c or C..SH Files.DT/usr/lib/vgrindefs	file containing terminal descriptions.SH See Alsotroff(1), vgrind(1)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?