Hello everyone,
I'd like to get back to help documenting semantic and other cedet
tools. I've been busy with work and family last few months ...
Here is a small patch to get my feet wet again.
This patch replaces use of "@table...@... table" with "@deffn ... @end
deffn". One advantage is that a proper index entry is create for each
BNF setting so that `M-x info-look' can work.
For example add the following to your ~/.emacs.
(eval-after-load "info-look"
'(let ()
(info-lookup-add-help
:mode 'semantic-bnf-mode
:regexp "%[_a-zA-Z][_a-zA-Z0-9]*"
:ignore-case t
:doc-spec '(
("(semantic)Index" nil
"^[ \t]+- [^:]+:[ \t]*" "\\b")
))
))
Then visit any "*.bnf" file. With cursor over `%start', hit `C-h C-i'
then RET. This brings up the *info* buffer and it even highlights
`%start' keyword. If you like this kind of stuff, I'll convert all
key symbols so that proper index entries are created. Then I'll go on
to documenting BNF stuff.
Index: semantic.texi
===================================================================
RCS file: /cvsroot/cedet/cedet/semantic/semantic.texi,v
retrieving revision 1.63
diff -u -r1.63 semantic.texi
--- semantic.texi 23 Mar 2002 03:02:41 -0000 1.63
+++ semantic.texi 7 May 2002 05:24:12 -0000
@@ -652,50 +652,71 @@
There are several settings that can be made in the settings section.
They are:
-@... @code
-@... %start <nonterminal>
+@deffn Setting %start <nonterminal>
Specify an alternative to @code{bovine-toplevel}. (See below)
-@... %scopestart <nonterminal>
+@end deffn
+
+@deffn Setting %scopestart <nonterminal>
Specify an alternative to @code{bovine-inner-scope}.
-@... %outputfile <filename>
+@end deffn
+
+@deffn Setting %outputfile <filename>
Required. Specifies the file into which this files output is stored.
-@... %parsetable <lisp-variable-name>
+@end deffn
+
+@deffn Setting %parsetable <lisp-variable-name>
Required. Specifies a lisp variable into which the output is stored.
-@... %setupfunction <lisp-function-name>
+@end deffn
+
+@deffn Setting %setupfunction <lisp-function-name>
Required. Name of a function into which setup code is to be inserted.
-@... %keywordtable <lisp-variable-name>
+@end deffn
+
+@deffn Setting %keywordtable <lisp-variable-name>
Required if there are @code{%token} keywords.
Specifies a lisp variable into which the output of a keyword table is
stored. This obarray is used to turn symbols into keywords when applicable.
-@... %token <name> "<text>"
+@end deffn
+
+@deffn Setting %token <name> "<text>"
Optional. Specify a new token @var{NAME}. This is added to a lexical
keyword list using @var{TEXT}. The symbol is then converted into a new
lexical terminal. This requires that the @code{%keywordtable} specified
variable is available in the file specified by @code{%outputfile}.
-@... %token <name> type "<text>"
+@end deffn
+
+@deffn Setting %token <name> type "<text>"
Optional. Specify a new token @var{NAME}. It is made from an existing
lexical token of type @var{TYPE}. @var{TEXT} is a string which will be
matched explicitly. @var{NAME} can be used in match rules as though they were
flex tokens, but are converted back to @var{TYPE} "text" internally.
-@... %put <NAME> symbol <VALUE>
-@... %put <NAME> ( symbol1 <VALUE1> symbol2 <VALUE2> ... )
-@... %put ( <NAME1> <NAME2>...) symbol <VALUE>
+@end deffn
+
+@deffn Setting %put <NAME> symbol <VALUE>
+@deffnx Setting %put <NAME> ( symbol1 <VALUE1> symbol2 <VALUE2> ... )
+@deffnx Setting %put ( <NAME1> <NAME2>...) symbol <VALUE>
Tokens created without a type are considered keywords, and placed in a
keyword table. Use @code{%put} to apply properties to that keyword.
(see @ref{Lexing}).
-@... %languagemode <lisp-function-name>
-@... %languagemode ( <lisp-function-name1> <lisp-function-name2> ... )
+@end deffn
+
+@deffn Setting %languagemode <lisp-function-name>
+@deffnx Setting %languagemode ( <lisp-function-name1> <lisp-function-name2> ... )
Optional. Specifies the Emacs major mode associated with the language
being specified. When the language is converted, all buffers of this
mode will get the new table installed.
-@... %quotemode backquote
+@end deffn
+
+@deffn Setting %quotemode backquote
Optional. Specifies how symbol quoting is handled in the Optional
Lambda Expressions. (See below)
-@... %( <lisp-expression> )%
+@end deffn
+
+@deffn Setting {%( <lisp-expression> )%}
Specify setup code to be inserted into the @code{%setupfunction}.
It will be inserted between two specifier strings, or added to
the end of the function.
-@... table
+@end deffn
When working inside @code{%( ... )%} tokens, any lisp expression can be
entered which will be placed inside the setup function. In general, you
|