1 This is semantic-appdev.info, produced by makeinfo version 5.2 from
4 This manual documents Application Development with Semantic.
6 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 Eric M.
7 Ludlam Copyright (C) 2001, 2002, 2003, 2004 David Ponce Copyright (C)
8 2002, 2003 Richard Y. Kim
10 Permission is granted to copy, distribute and/or modify this
11 document under the terms of the GNU Free Documentation License,
12 Version 1.1 or any later version published by the Free Software
13 Foundation; with the Invariant Sections being list their titles,
14 with the Front-Cover Texts being list, and with the Back-Cover
15 Texts being list. A copy of the license is included in the section
16 entitled "GNU Free Documentation License".
17 INFO-DIR-SECTION Emacs
19 * Semantic Application Writer's guide: (semantic-appdev).
22 This file documents Application Development with Semantic.
23 _Infrastructure for parser based text analysis in Emacs_
25 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Eric M. Ludlam,
26 David Ponce, and Richard Y. Kim
29 File: semantic-appdev.info, Node: Top, Next: Semantic Tags, Up: (dir)
31 Semantic Application Development Manual
32 ***************************************
34 A semantic application takes the semantic tags generated by semantic
35 parsers then provides useful services to the user. For a list of such
36 applications, *note (semantic-user)the Semantic User's Guide::.
38 An application developer needs to know
39 * when to invoke the parser to generate or regenerate the tag lists.
40 * how to access the tag lists.
41 * how to access information about each tag.
43 This chapter describes semantic fuctions and concepts an application
44 developer needs to know to perform all of the tasks just listed.
49 * Searching Tag Tables:: Searching tag tables.
50 * Tags at Point:: Finding tags at point.
51 * Tag Decoration:: Decorating tags
52 * Tag Sorting:: Reorganizing streams.
53 * Tag Completion:: Completing read functions.
54 * Override Methods:: Language dependent functions covering
55 conversion to text strings, language dependent
56 queries and local context information
57 * Parser Features:: Application available parser features.
58 * Semantic Database:: Persistant storage of tags.
59 * Idle Scheduling:: Scheduling jobs in idle time.
60 * Example Programs:: Simple programming examples.
61 * Current Context:: Local context analysis.
62 * App Debugger:: Application Debugger
63 * GNU Free Documentation License::
67 File: semantic-appdev.info, Node: Semantic Tags, Next: Searching Tag Tables, Prev: Top, Up: Top
72 The end result of a semantic parser is a list of tags per each buffer.
73 This chapter discusses the tag data structure and the API provided by
74 semantic to query, process, and modify tags.
76 The tags list for a buffer can be obtained by calling
77 'semantic-fetch-tags' which returns a parse tree of tags that represent
78 the program structure.
86 * Misc Tag Functions::
90 File: semantic-appdev.info, Node: Tag Basics, Next: Tag Query, Prev: Semantic Tags, Up: Semantic Tags
95 Currently each tag is a list with up to five elements:
96 (NAME CLASS ATTRIBUTES PROPERTIES OVERLAY)
98 Application developers should not rely on this list structure. Instead
99 they should rely on the provided API documented in this chapter. The
100 list structure is explained here primarily to help those reading the
101 semantic source code.
103 * NAME is a required component for all tags, i.e., every tag must
104 have this component. It is also guaranteed to be a string. This
105 string represents the name of the tag, usually a named definition
106 which the language will use elsewhere as a reference to the
107 syntactic element found.
108 * CLASS is the other required component for all tags. It is a symbol
109 representing the class of the tag. Valid CLASSes can be anything,
110 as long is it is an Emacs Lisp symbol. However following are some
111 of the well-known symbols: 'type', 'function', 'variable',
112 'include', 'package', 'code'.
113 * ATTRIBUTES is a property list that keep information related to the
114 tag parsed from the buffer.
116 The symbol names in the property list can be anything, though there
117 is a useful set of predefined attributes. It is best to use the
118 API functions to access the well-known properties. *note Tag
121 * PROPERTIES is generated by the semantic parser harness, and need
122 not be provided by a language author.
124 Properties are used to store transient data on a tag unrelated to
125 the source of the original tag, such as hook functions, dynamic
126 overlays, or other data needed by programs.
128 The semantic incremental parser will attempt to maintain properties
129 when reparsing the source of a tag.
130 * OVERLAY represents positional information for this tag. It is
131 automatically generated by the semantic parser harness, and need
132 not be provided by the language author. Depending on the overlay
133 in a program can be dangerous because sometimes the overlay is
134 replaced with an integer pair
136 when the buffer the tag belongs to is not in memory. This happens
137 when a using has activated the Semantic Database *note
138 (lang-support-guide)semanticdb::.
140 -- Function: semantic-tag-name tag
141 Return the name of TAG. For functions, variables, classes,
142 typedefs, etc., this is the identifier that is being defined. For
143 tags without an obvious associated name, this may be the statement
144 type, e.g., this may return 'print' for python's print statement.
146 *Compatibility*: 'semantic-tag-name' introduced in semantic version
147 2.0 supercedes 'semantic-token-name' which is now obsolete.
149 -- Function: semantic-tag-class tag
150 Return the class of TAG. That is, the symbol ''variable',
151 ''function', ''type', or other. There is no limit to the symbols
152 that may represent the class of a tag. Each parser generates tags
153 with classes defined by it.
155 For functional languages, typical tag classes are:
158 Data types, named map for a memory block.
160 A function or method, or named execution location.
162 A variable, or named storage for data.
164 Statement that represents a file from which more tags can be
167 Statement that declairs this file's package name.
169 Code that has not name or binding to any other symbol, such as
173 *Compatibility*: 'semantic-tag-class' introduced in semantic
174 version 2.0 supercedes 'semantic-token-token' which is now
177 Several functions that deal with ATTRIBUTES component are given in *note
178 Tag Attributes Internals: Tag Attributes Internals. However functions
179 listed in *note Tag Query: Tag Query. should provide most needs of the
180 application developer.
182 Similarly functions that deal with PROPERTIES component are given in
183 *note Tag Properties Internals: Tag Properties Internals. The
184 application developer should not need to use any of these.
186 Finally *note Tag Overlay: Tag Overlay. lists functions dealing with the
190 File: semantic-appdev.info, Node: Tag Query, Next: Tag Overlay, Prev: Tag Basics, Up: Semantic Tags
195 This section lists functions that answers simple questions regarding a
201 -- Function: semantic-tag-p tag
202 Return non-'nil' if TAG is most likely a semantic tag.
204 *Compatibility*: 'semantic-tag-p' introduced in semantic version
205 2.0 supercedes 'semantic-token-p' which is now obsolete.
207 -- Function: semantic-equivalent-tag-p tag1 tag2
208 Compare TAG1 and TAG2 and return non-'nil' if they are equivalent.
209 Use "eq" to test of two tags are the same. Use this function if
210 tags are being copied and regrouped to test for if two tags
211 represent the same thing, but may be constructed of different cons
214 *Compatibility*: 'semantic-equivalent-tag-p' introduced in semantic
215 version 2.0 supercedes 'semantic-equivalent-tokens-p' which is now
218 -- Function: semantic-tag-of-class-p tag class
219 Return non-'nil' if class of TAG is CLASS.
221 -- Function: semantic-tag-faux-p tag
222 Return non-'nil' if TAG is a FAUX tag. FAUX tags are created to
223 represent a construct that is not known to exist in the code.
225 -- Function: semantic-tag-type-compound-p tag
226 Return non-'nil' the type of TAG is compound. Compound implies a
227 structure or similar data type. Returns the list of tag members if
233 -- Function: semantic-tag-docstring tag &optional buffer
234 Return the documentation of TAG. That is the value defined by the
235 ':documentation' attribute. Optional argument BUFFER indicates
236 where to get the text from. If not provided, then only the
237 POSITION can be provided.
239 *Compatibility*: 'semantic-tag-docstring' introduced in semantic
240 version 2.0 supercedes 'semantic-token-docstring' which is now
246 -- Function: semantic-tag-variable-constant-p tag
247 Return non-'nil' if the variable that TAG describes is a constant.
248 That is the value of the attribute ':constant-flag'.
250 *Compatibility*: 'semantic-tag-variable-constant-p' introduced in
251 semantic version 2.0 supercedes 'semantic-token-variable-const'
252 which is now obsolete.
254 -- Function: semantic-tag-function-destructor-p tag
255 Return non-'nil' if TAG describes a destructor function. That is
256 the value of the ':destructor-flag' attribute.
258 *Compatibility*: 'semantic-tag-function-destructor-p' introduced in
259 semantic version 2.0 supercedes
260 'semantic-token-function-destructor' which is now obsolete.
262 -- Function: semantic-tag-function-throws tag
263 Return the exceptions the function that TAG describes can throw.
264 That is the value of the ':throws' attribute.
266 *Compatibility*: 'semantic-tag-function-throws' introduced in
267 semantic version 2.0 supercedes 'semantic-token-function-throws'
268 which is now obsolete.
270 -- Function: semantic-tag-modifiers tag
271 Return the value of the ':typemodifiers' attribute of TAG.
273 *Compatibility*: 'semantic-tag-modifiers' introduced in semantic
274 version 2.0 supercedes 'semantic-token-type-modifiers' which is now
277 *Compatibility*: 'semantic-tag-modifiers' introduced in semantic
278 version 2.0 supercedes 'semantic-token-variable-modifiers' which is
281 *Compatibility*: 'semantic-tag-modifiers' introduced in semantic
282 version 2.0 supercedes 'semantic-token-function-modifiers' which is
288 -- Function: semantic-tag-function-arguments tag
289 Return the arguments of the function that TAG describes. That is
290 the value of the ':arguments' attribute.
292 *Compatibility*: 'semantic-tag-function-arguments' introduced in
293 semantic version 2.0 supercedes 'semantic-token-function-args'
294 which is now obsolete.
299 -- Function: semantic-tag-variable-default tag
300 Return the default value of the variable that TAG describes. That
301 is the value of the attribute ':default-value'.
303 *Compatibility*: 'semantic-tag-variable-default' introduced in
304 semantic version 2.0 supercedes 'semantic-token-variable-default'
305 which is now obsolete.
310 -- Function: semantic-tag-type tag
311 Return the value of the ':type' attribute of TAG.
313 *Compatibility*: 'semantic-tag-type' introduced in semantic version
314 2.0 supercedes 'semantic-token-type' which is now obsolete.
316 -- Function: semantic-tag-of-type-p tag type
317 Compare TAG's type against TYPE. Non 'nil' if equivalent. TYPE
318 can be a string, or a tag of class ''type'.
320 1.2.7 Inheritance and Hierarchy
321 -------------------------------
323 -- Function: semantic-tag-named-parent tag
324 Return the parent of TAG. That is the value of the ':parent'
325 attribute. If a definition can occur outside an actual parent
326 structure, but refers to that parent by name, then the ':parent'
327 attribute should be used.
329 -- Function: semantic-tag-function-parent tag
330 Return the parent of the function that TAG describes. That is the
331 value of the ':parent' attribute. A function has a parent if it is
332 a method of a class, and if the function does not appear in body of
335 *Compatibility*: 'semantic-tag-function-parent' introduced in
336 semantic version 2.0 supercedes 'semantic-token-function-parent'
337 which is now obsolete.
339 -- Function: semantic-tag-type-superclasses tag
340 Return the list of superclasses of the type that TAG describes.
342 *Compatibility*: 'semantic-tag-type-superclasses' introduced in
343 semantic version 2.0 supercedes
344 'semantic-token-type-parent-superclass' which is now obsolete.
346 *Compatibility*: 'semantic-tag-type-superclasses' introduced in
347 semantic version 2.0 supercedes 'semantic-token-type-parent' which
350 -- Function: semantic-tag-type-interfaces tag
351 Return the list of interfaces of the type that TAG describes.
353 *Compatibility*: 'semantic-tag-type-interfaces' introduced in
354 semantic version 2.0 supercedes
355 'semantic-token-type-parent-implement' which is now obsolete.
357 *Compatibility*: 'semantic-tag-type-interfaces' introduced in
358 semantic version 2.0 supercedes 'semantic-token-type-parent' which
361 -- Function: semantic-tag-type-members tag
362 Return the members of the type that TAG describes. That is the
363 value of the ':members' attribute.
365 *Compatibility*: 'semantic-tag-type-members' introduced in semantic
366 version 2.0 supercedes 'semantic-token-type-parts' which is now
372 -- Function: semantic-tag-include-system-p tag
373 Return non-'nil' if the include that TAG describes is a system
374 include. That is the value of the attribute ':system-flag'.
376 *Compatibility*: 'semantic-tag-include-system-p' introduced in
377 semantic version 2.0 supercedes 'semantic-token-include-system'
378 which is now obsolete.
380 -- Function: semantic-tag-include-filename tag
381 Return a filename representation of TAG. The default action is to
382 return the "semantic-tag-name". Some languages do not use full
383 filenames in their include statements. Override this method to
384 translate the code represenation into a filename. (A relative
385 filename if necessary.)
387 See "semantic-dependency-tag-file" to expand an include tag to a
388 full file name. This function can be overloaded (see
389 "define-mode-local-override" for details).
394 -- Function: semantic-tag-code-detail tag
395 Return detail information from code that TAG describes. That is
396 the value of the attribute ':detail'.
401 -- Function: semantic-tag-components tag
402 Return a list of components for TAG. A Component is a part of TAG
403 which itself may be a TAG. Examples include the elements of a
404 structure in a tag of class 'type, or the list of arguments to a
405 tag of class ''function'. This function can be overloaded (see
406 "define-mode-local-override" for details).
408 -- Function: semantic-tag-components-default tag
409 Return a list of components for TAG. Perform the described task in
410 "semantic-tag-components".
412 -- Function: semantic-tag-children-compatibility tag &optional
414 Return children of TAG. If POSITIONONLY is 'nil', use
415 "semantic-tag-components". If POSITIONONLY is non-'nil', use
416 "semantic-tag-components-with-overlays". DO NOT use this fcn in
417 new code. Use one of the above instead.
419 *Compatibility*: 'semantic-tag-children-compatibility' introduced
420 in semantic version 2.0 supercedes 'semantic-nonterminal-children'
421 which is now obsolete.
427 File: semantic-appdev.info, Node: Tag Overlay, Next: Tag Hooks, Prev: Tag Query, Up: Semantic Tags
432 The functions in this answer questions regarding the overly such as the
433 buffer in which the tags is located, the start and/or end position of
434 the tag, and the overlay itself which spans the tags.
436 -- Function: semantic-tag-start tag
437 Return the start location of TAG.
439 *Compatibility*: 'semantic-tag-start' introduced in semantic
440 version 2.0 supercedes 'semantic-token-start' which is now
443 -- Function: semantic-tag-end tag
444 Return the end location of TAG.
446 *Compatibility*: 'semantic-tag-end' introduced in semantic version
447 2.0 supercedes 'semantic-token-end' which is now obsolete.
449 -- Function: semantic-tag-bounds tag
450 Return the location (START END) of data TAG describes.
452 *Compatibility*: 'semantic-tag-bounds' introduced in semantic
453 version 2.0 supercedes 'semantic-token-extent' which is now
456 -- Function: semantic-tag-buffer tag
457 Return the buffer TAG resides in. If TAG has an originating file,
458 read that file into a (maybe new) buffer, and return it. Return
459 'nil' if there is no buffer for this tag.
461 *Compatibility*: 'semantic-tag-buffer' introduced in semantic
462 version 2.0 supercedes 'semantic-token-buffer' which is now
465 -- Function: semantic-tag-file-name tag
466 Return the name of the file from which TAG originated. Return
467 'nil' if that information can't be obtained. If TAG is from a
468 loaded buffer, then that buffer's filename is used. If TAG is
469 unlinked, but has a ':filename' property, then that is used.
471 -- Function: semantic-tag-overlay tag
472 Return the OVERLAY part of TAG. That is, an overlay or an unloaded
473 buffer representation. This function can also return an array of
474 the form [ START END ]. This occurs for tags that are not
475 currently linked into a buffer.
477 *Compatibility*: 'semantic-tag-overlay' introduced in semantic
478 version 2.0 supercedes 'semantic-token-overlay' which is now
481 -- Function: semantic-tag-with-position-p tag
482 Return non-'nil' if TAG has positional information.
484 *Compatibility*: 'semantic-tag-with-position-p' introduced in
485 semantic version 2.0 supercedes 'semantic-token-with-position-p'
486 which is now obsolete.
488 -- Function: semantic-tag-components-with-overlays tag
489 Return the list of top level components belonging to TAG. Children
490 are any sub-tags which contain overlays.
492 Default behavior is to get "semantic-tag-components" in addition to
493 the components of an anonymous types (if applicable.)
495 *Language authors, please note:*
496 If a mode defines a language tag that has tags in it with
497 overlays you should still return them with this function.
498 Ignoring this step will prevent several features from working
499 correctly. This function can be overloaded (see
500 "define-mode-local-override" for details).
502 -- Function: semantic-tag-components-with-overlays-default tag
503 Return the list of top level components belonging to TAG. Children
504 are any sub-tags which contain overlays. The default action
505 collects regular components of TAG, in addition to any components
506 beloning to an anonymous type.
509 File: semantic-appdev.info, Node: Tag Hooks, Next: Misc Tag Functions, Prev: Tag Overlay, Up: Semantic Tags
514 Individual tags can have hooks associated with them. Hooks are saved as
515 properties, but can cause specific tags to have special behaviors after
518 You can manipulate tag hooks with these functions:
520 -- Function: semantic-tag-add-hook tag hook function &optional append
521 Onto TAG, add to the value of HOOK the function FUNCTION. FUNCTION
522 is added (if necessary) at the beginning of the hook list unless
523 the optional argument APPEND is non-'nil', in which case FUNCTION
524 is added at the end. HOOK should be a symbol, and FUNCTION may be
525 any valid function. See also the function "add-hook".
527 -- Function: semantic-tag-remove-hook tag hook function
528 Onto TAG, remove from the value of HOOK the function FUNCTION.
529 HOOK should be a symbol, and FUNCTION may be any valid function.
530 If FUNCTION isn't the value of HOOK, or, if FUNCTION doesn't appear
531 in the list of hooks to run in HOOK, then nothing is done. See
532 also the function "remove-hook".
534 For a developer, if you have an application for which you want to
535 support a special kind of hook on a per tag basis, you can use this to
538 -- Function: semantic--tag-run-hooks tag hook &rest args
539 Run for TAG all expressions saved on the property HOOK. Each hook
540 expression must take at least one argument, the TAG. For any given
541 situation, additional ARGS may be passed.
543 Semantic supports two TAG specific hooks at this time:
546 This hook is run whenever a tag is linked into a buffer. This
547 occurs just after parsing, and whenever a tag is loaded into
548 memory. This hook also executes after a datase save, when all tags
549 are first unlinked from the current buffer before the save.
551 This hook is run whenever a tag is unlinked from a buffer. This
552 ocucrs during a database save, or when a tag is modified by the
555 This hook is run whenever a tag is copied. This occurs in the
556 function 'semantic-tag-copy'. Use this hook to remove properties
557 from the tag that link it to a buffer, as this tag should no longer
558 have direct buffer links.
561 File: semantic-appdev.info, Node: Misc Tag Functions, Next: Tag Internals, Prev: Tag Hooks, Up: Semantic Tags
563 1.5 Misc Tag Functions
564 ======================
566 -- Command: semantic-narrow-to-tag &optional tag
567 Narrow to the region specified by the bounds of TAG. See
568 "semantic-tag-bounds".
570 *Compatibility*: 'semantic-narrow-to-tag' introduced in semantic
571 version 2.0 supercedes 'semantic-narrow-to-token' which is now
574 -- Function: semantic-with-buffer-narrowed-to-current-tag &rest body
575 Execute BODY with the buffer narrowed to the current tag.
577 *Compatibility*: 'semantic-with-buffer-narrowed-to-current-tag'
578 introduced in semantic version 2.0 supercedes
579 'semantic-with-buffer-narrowed-to-current-token' which is now
582 -- Function: semantic-with-buffer-narrowed-to-tag tag &rest body
583 Narrow to TAG, and execute BODY.
585 *Compatibility*: 'semantic-with-buffer-narrowed-to-tag' introduced
586 in semantic version 2.0 supercedes
587 'semantic-with-buffer-narrowed-to-token' which is now obsolete.
590 File: semantic-appdev.info, Node: Tag Internals, Prev: Misc Tag Functions, Up: Semantic Tags
597 * Tag Attributes Internals::
598 * Tag Properties Internals::
599 * Tag Overlay Internals::
601 * Misc Tag Internals::
604 File: semantic-appdev.info, Node: Tag Attributes Internals, Next: Tag Properties Internals, Prev: Tag Internals, Up: Tag Internals
606 1.6.1 Tag Attributes Internals
607 ------------------------------
609 -- Function: semantic-tag-attributes tag
610 Return the list of public attributes of TAG. That is a property
611 list: (ATTRIBUTE-1 VALUE-1 ATTRIBUTE-2 VALUE-2...).
613 *Compatibility*: 'semantic-tag-attributes' introduced in semantic
614 version 2.0 supercedes 'semantic-token-extra-specs' which is now
617 *Compatibility*: 'semantic-tag-attributes' introduced in semantic
618 version 2.0 supercedes 'semantic-token-function-extra-specs' which
621 *Compatibility*: 'semantic-tag-attributes' introduced in semantic
622 version 2.0 supercedes 'semantic-token-variable-extra-specs' which
625 *Compatibility*: 'semantic-tag-attributes' introduced in semantic
626 version 2.0 supercedes 'semantic-token-type-extra-specs' which is
629 -- Function: semantic-tag-get-attribute tag attribute
630 From TAG, return the value of ATTRIBUTE. ATTRIBUTE is a symbol
631 whose specification value to get. Return the value found, or 'nil'
632 if ATTRIBUTE is not one of the attributes of TAG.
634 *Compatibility*: 'semantic-tag-get-attribute' introduced in
635 semantic version 2.0 supercedes 'semantic-token-extra-spec' which
638 *Compatibility*: 'semantic-tag-get-attribute' introduced in
639 semantic version 2.0 supercedes
640 'semantic-token-function-extra-spec' which is now obsolete.
642 *Compatibility*: 'semantic-tag-get-attribute' introduced in
643 semantic version 2.0 supercedes
644 'semantic-token-variable-extra-spec' which is now obsolete.
646 -- Function: semantic-tag-put-attribute tag attribute value
647 Change value in TAG of ATTRIBUTE to VALUE. If ATTRIBUTE already
648 exists, its value is set to VALUE, otherwise the new ATTRIBUTE
649 VALUE pair is added. Return TAG. Use this function in a parser
650 when not all attributes are known at the same time.
652 *Compatibility*: 'semantic-tag-put-attribute' introduced in
653 semantic version 2.0 supercedes 'semantic-token-add-extra-spec'
654 which is now obsolete.
656 -- Function: semantic-tag-put-attribute-no-side-effect tag attribute
658 Change value in TAG of ATTRIBUTE to VALUE without side effects.
659 All cons cells in the attribute list are replicated so that there
660 are no side effects if TAG is in shared lists. If ATTRIBUTE
661 already exists, its value is set to VALUE, otherwise the new
662 ATTRIBUTE VALUE pair is added. Return TAG.
665 File: semantic-appdev.info, Node: Tag Properties Internals, Next: Tag Overlay Internals, Prev: Tag Attributes Internals, Up: Tag Internals
667 1.6.2 Tag Properties Internals
668 ------------------------------
670 -- Function: semantic-tag-properties tag
671 Return the list of private properties of TAG. That is a property
672 list: (PROPERTY-1 VALUE-1 PROPERTY-2 VALUE-2...).
674 *Compatibility*: 'semantic-tag-properties' introduced in semantic
675 version 2.0 supercedes 'semantic-token-properties' which is now
678 -- Function: semantic--tag-put-property tag property value
679 Change value in TAG of PROPERTY to VALUE. If PROPERTY already
680 exists, its value is set to VALUE, otherwise the new PROPERTY VALUE
681 pair is added. Return TAG. That function is for internal use
684 *Compatibility*: 'semantic--tag-put-property' introduced in
685 semantic version 2.0 supercedes 'semantic-token-put' which is now
688 -- Function: semantic--tag-get-property tag property
689 From TAG, extract the value of PROPERTY. Return the value found,
690 or 'nil' if PROPERTY is not one of the properties of TAG. That
691 function is for internal use only.
693 *Compatibility*: 'semantic--tag-get-property' introduced in
694 semantic version 2.0 supercedes 'semantic-token-get' which is now
697 -- Function: semantic--tag-put-property-no-side-effect tag property
699 Change value in TAG of PROPERTY to VALUE without side effects. All
700 cons cells in the property list are replicated so that there are no
701 side effects if TAG is in shared lists. If PROPERTY already
702 exists, its value is set to VALUE, otherwise the new PROPERTY VALUE
703 pair is added. Return TAG. That function is for internal use
706 *Compatibility*: 'semantic--tag-put-property-no-side-effect'
707 introduced in semantic version 2.0 supercedes
708 'semantic-token-put-no-side-effect' which is now obsolete.
710 -- Function: semantic-tag-make-plist args
711 Create a property list with ARGS. Args is a property list of the
712 form (KEY1 VALUE1 ... KEYN VALUEN). Where KEY is a symbol, and
713 VALUE is the value for that symbol. The return value will be a new
714 property list, with these KEY/VALUE pairs eliminated:
716 - KEY associated to 'nil' VALUE. - KEY associated to an empty
717 string VALUE. - KEY associated to a zero VALUE.
719 *Compatibility*: 'semantic-tag-make-plist' introduced in semantic
720 version 2.0 supercedes 'semantic-tag-make-assoc-list' which is now
724 File: semantic-appdev.info, Node: Tag Overlay Internals, Next: Creating Tags, Prev: Tag Properties Internals, Up: Tag Internals
726 1.6.3 Tag Overlay Internals
727 ---------------------------
729 Many of the overlay related functions were already documented in *note
730 Tag Overlay: Tag Overlay.
732 -- Function: semantic-tag-set-bounds tag start end
733 In TAG, set the START and END location of data it describes.
736 File: semantic-appdev.info, Node: Creating Tags, Next: Misc Tag Internals, Prev: Tag Overlay Internals, Up: Tag Internals
741 -- Function: semantic-tag name class &rest attributes
742 Create a generic semantic tag. NAME is a string representing the
743 name of this tag. CLASS is the symbol that represents the class of
744 tag this is, such as ''variable', or ''function'. ATTRIBUTES is a
745 list of additional attributes belonging to this tag.
747 *Compatibility*: 'semantic-tag' introduced in semantic version 2.0
748 supercedes 'semantic-token' which is now obsolete.
750 -- Function: semantic-tag-new-variable name type default-value &rest
752 Create a semantic tag of class ''variable'. NAME is the name of
753 this variable. TYPE is a string or semantic tag representing the
754 type of this variable. DEFAULT-VALUE is a string representing the
755 default value of this variable. ATTRIBUTES is a list of additional
756 attributes belonging to this tag.
758 *Compatibility*: 'semantic-tag-new-variable' introduced in semantic
759 version 2.0 supercedes 'semantic-token-new-variable' which is now
762 -- Function: semantic-tag-new-function name type arg-list &rest
764 Create a semantic tag of class ''function'. NAME is the name of
765 this function. TYPE is a string or semantic tag representing the
766 type of this function. ARG-LIST is a list of strings or semantic
767 tags representing the arguments of this function. ATTRIBUTES is a
768 list of additional attributes belonging to this tag.
770 *Compatibility*: 'semantic-tag-new-function' introduced in semantic
771 version 2.0 supercedes 'semantic-token-new-function' which is now
774 -- Function: semantic-tag-new-type name type members parents &rest
776 Create a semantic tag of class ''type'. NAME is the name of this
777 type. TYPE is a string or semantic tag representing the type of
778 this type. MEMBERS is a list of strings or semantic tags
779 representing the elements that make up this type if it is a
780 composite type. PARENTS is a cons cell. (EXPLICIT-PARENTS .
781 INTERFACE-PARENTS) EXPLICIT-PARENTS can be a single string (Just
782 one parent) or a list of parents (in a multiple inheritance
783 situation). It can also be 'nil'. INTERFACE-PARENTS is a list of
784 strings representing the names of all INTERFACES, or abstract
785 classes inherited from. It can also be 'nil'. This slot can be
786 interesting because the form: ( 'nil' "string") is a valid parent
787 where there is no explicit parent, and only an interface.
788 ATTRIBUTES is a list of additional attributes belonging to this
791 *Compatibility*: 'semantic-tag-new-type' introduced in semantic
792 version 2.0 supercedes 'semantic-token-new-type' which is now
795 -- Function: semantic-tag-new-include name system-flag &rest attributes
796 Create a semantic tag of class ''include'. NAME is the name of
797 this include. SYSTEM-FLAG represents that we were able to identify
798 this include as belonging to the system, as opposed to belonging to
799 the local project. ATTRIBUTES is a list of additional attributes
800 belonging to this tag.
802 *Compatibility*: 'semantic-tag-new-include' introduced in semantic
803 version 2.0 supercedes 'semantic-token-new-include' which is now
806 -- Function: semantic-tag-new-package name detail &rest attributes
807 Create a semantic tag of class ''package'. NAME is the name of
808 this package. DETAIL is extra information about this package, such
809 as a location where it can be found. ATTRIBUTES is a list of
810 additional attributes belonging to this tag.
812 *Compatibility*: 'semantic-tag-new-package' introduced in semantic
813 version 2.0 supercedes 'semantic-token-new-package' which is now
816 -- Function: semantic-tag-new-code name detail &rest attributes
817 Create a semantic tag of class ''code'. NAME is a name for this
818 code. DETAIL is extra information about the code. ATTRIBUTES is a
819 list of additional attributes belonging to this tag.
821 -- Function: semantic-tag-clone tag &optional name
822 Clone TAG, creating a new TAG. If optional argument NAME is not
823 'nil' it specifies a new name for the cloned tag.
825 *Compatibility*: 'semantic-tag-clone' introduced in semantic
826 version 2.0 supercedes 'semantic-clone-tag' which is now obsolete.
828 -- Function: semantic-tag-copy tag &optional name keep-file
829 Return a copy of TAG unlinked from the originating buffer. If
830 optional argument NAME is non-'nil' it specifies a new name for the
831 copied tag. If optional argument KEEP-FILE is non-'nil', and TAG
832 was linked to a buffer, the originating buffer file name is kept in
833 the ':filename' property of the copied tag. This runs the tag hook
837 File: semantic-appdev.info, Node: Misc Tag Internals, Prev: Creating Tags, Up: Tag Internals
839 1.6.5 Misc Tag Internals
840 ------------------------
842 -- Function: semantic--tag-run-hooks tag hook &rest args
843 Run for TAG all expressions saved on the property HOOK. Each hook
844 expression must take at least one argument, the TAG. For any given
845 situation, additional ARGS may be passed.
847 -- Function: semantic--tag-unlink-from-buffer tag
848 Convert TAG from using an overlay to using an overlay proxy. This
849 function is for internal use only. This runs the tag hook
850 'unlink-hook'. *note Tag Hooks::
852 -- Function: semantic--tag-link-to-buffer tag
853 Convert TAG from using an overlay proxy to using an overlay. This
854 function is for internal use only. This runs the tag hook
855 'link-hook'. *note Tag Hooks::
857 -- Function: semantic--tag-unlink-list-from-buffer tags
858 Convert TAGS from using an overlay to using an overlay proxy. This
859 function is for internal use only.
861 -- Function: semantic--tag-link-list-to-buffer tags
862 Convert TAGS from using an overlay proxy to using an overlay. This
863 function is for internal use only.
865 -- Function: semantic--tag-unlink-cache-from-buffer
866 Convert all tags in the current cache to use overlay proxys. This
867 function is for internal use only.
869 -- Function: semantic--tag-link-cache-to-buffer
870 Convert all tags in the current cache to use overlays. This
871 function is for internal use only.
873 -- Function: semantic--tag-expanded-p tag
874 Return non-'nil' if TAG is expanded. This function is for internal
875 use only. See also the function 'semantic--expand-tag'.
877 -- Function: semantic--tag-expand tag
878 Convert TAG from a raw state to a cooked state, and expand it.
879 Returns a list of cooked tags.
881 The parser returns raw tags with positional data START END at the
882 end of the tag data structure (a list for now). We convert it from
883 that to a cooked state that uses an overlay proxy, that is, a
886 The raw tag is changed with side effects and maybe expanded in
887 several derived tags when the variable
888 'semantic-tag-expand-function' is set.
890 This function is for internal use only.
893 File: semantic-appdev.info, Node: Searching Tag Tables, Next: Tags at Point, Prev: Semantic Tags, Up: Top
895 2 Searching Tag Tables
896 **********************
898 These functions take some key, and returns information found in a tag
899 table. Some will return one tag (the first matching item found.)
900 Others will return a list of all items matching a given criterion. Most
901 of these functions work regardless of a buffer being in memory or not.
903 Any specialty search routine that claims to use a function that is an
904 overload method will need to execute in a buffer of the same mode as the
909 * Breadth Search:: Searching only one level of tags.
910 * Deep Search:: Deep searches into types or argument lists.
911 * Specialty Search:: Specialty Searches.
912 * Custom Search:: Write custom search routines.
915 File: semantic-appdev.info, Node: Breadth Search, Next: Deep Search, Up: Searching Tag Tables
920 Searching the breadth of a list of tags means that only one level of the
921 tags will be searched. If one of the tags is a datatype with additional
922 members, those members are not searched.
924 -- Function: semantic-find-first-tag-by-name name &optional table
925 Find the first tag with NAME in TABLE. NAME is a string. TABLE is
926 a semantic tags table. See "semantic-something-to-tag-table".
927 This routine uses "assoc" to quickly find the first matching entry.
929 -- Function: semantic-find-tags-by-name name &optional table
930 Find all tags with NAME in TABLE. NAME is a string. TABLE is a
931 tag table. See "semantic-something-to-tag-table".
933 -- Function: semantic-find-tags-for-completion prefix &optional table
934 Find all tags whos name begins with PREFIX in TABLE. PREFIX is a
935 string. TABLE is a tag table. See
936 "semantic-something-to-tag-table". While it would be nice to use
937 "try-completion" or "all-completions", those functions do not
938 return the tags, only a string. Uses "compare-strings" for fast
941 -- Function: semantic-find-tags-by-name-regexp regexp &optional table
942 Find all tags with name matching REGEXP in TABLE. REGEXP is a
943 string containing a regular expression, TABLE is a tag table. See
944 "semantic-something-to-tag-table". Consider using
945 "semantic-find-tags-for-completion" if you are attempting to do
948 -- Function: semantic-find-tags-by-class class &optional table
949 Find all tags of class CLASS in TABLE. CLASS is a symbol
950 representing the class of the token, such as ''variable', of
951 'function.. TABLE is a tag table. See
952 "semantic-something-to-tag-table".
954 -- Function: semantic-find-tags-by-type type &optional table
955 Find all tags of with a type TYPE in TABLE. TYPE is a string or
956 tag representing a data type as defined in the language the tags
957 were parsed from, such as "int", or perhaps a tag whose name is
958 that of a struct or class. TABLE is a tag table. See
959 "semantic-something-to-tag-table".
961 -- Function: semantic-find-tags-included &optional table
962 Find all tags in TABLE that are of the ''include' class. TABLE is
963 a tag table. See "semantic-something-to-tag-table".
966 File: semantic-appdev.info, Node: Deep Search, Next: Specialty Search, Prev: Breadth Search, Up: Searching Tag Tables
971 -- Function: semantic-brute-find-first-tag-by-name name streamorbuffer
972 &optional search-parts search-include
973 Find a tag NAME within STREAMORBUFFER. NAME is a string. If
974 SEARCH-PARTS is non-'nil', search children of tags. If
975 SEARCH-INCLUDE is non-'nil', search include files.
977 Use "semantic-find-first-tag-by-name" instead.
980 *Compatibility*: 'semantic-brute-find-first-tag-by-name' introduced
981 in semantic version 2.0 supercedes
982 'semantic-find-nonterminal-by-name' which is now obsolete.
984 -- Function: semantic-brute-find-tag-by-property property value
985 streamorbuffer &optional search-parts search-includes
986 Find all tags with PROPERTY equal to VALUE in STREAMORBUFFER.
987 Optional argument SEARCH-PARTS and SEARCH-INCLUDES are passed to
988 "semantic-brute-find-tag-by-function".
991 *Compatibility*: 'semantic-brute-find-tag-by-property' introduced
992 in semantic version 2.0 supercedes
993 'semantic-find-nonterminal-by-property' which is now obsolete.
995 -- Function: semantic-brute-find-tag-by-attribute attr streamorbuffer
996 &optional search-parts search-includes
997 Find all tags with a given ATTR in STREAMORBUFFER. ATTR is a
998 symbol key into the attributes list. Optional argument
999 SEARCH-PARTS and SEARCH-INCLUDES are passed to
1000 "semantic-brute-find-tag-by-function".
1003 *Compatibility*: 'semantic-brute-find-tag-by-attribute' introduced
1004 in semantic version 2.0 supercedes
1005 'semantic-find-nonterminal-by-extra-spec' which is now obsolete.
1007 -- Function: semantic-brute-find-tag-by-attribute-value attr value
1008 streamorbuffer &optional search-parts search-includes
1009 Find all tags with a given ATTR equal to VALUE in STREAMORBUFFER.
1010 ATTR is a symbol key into the attributes list. VALUE is the value
1011 that ATTR should match. Optional argument SEARCH-PARTS and
1012 SEARCH-INCLUDES are passed to
1013 "semantic-brute-find-tag-by-function".
1016 *Compatibility*: 'semantic-brute-find-tag-by-attribute-value'
1017 introduced in semantic version 2.0 supercedes
1018 'semantic-find-nonterminal-by-extra-spec-value' which is now
1021 -- Function: semantic-brute-find-tag-by-position position
1022 streamorbuffer &optional nomedian
1023 Find a nonterminal covering POSITION within STREAMORBUFFER.
1024 POSITION is a number, or marker. If NOMEDIAN is non-'nil', don't
1025 do the median calculation, and return nil.
1028 *Compatibility*: 'semantic-brute-find-tag-by-position' introduced
1029 in semantic version 2.0 supercedes
1030 'semantic-find-nonterminal-by-position' which is now obsolete.
1032 -- Function: semantic-brute-find-innermost-tag-by-position position
1033 streamorbuffer &optional nomedian
1034 Find a list of tags covering POSITION within STREAMORBUFFER.
1035 POSITION is a number, or marker. If NOMEDIAN is non-'nil', don't
1036 do the median calculation, and return nil. This function will find
1037 the topmost item, and recurse until no more details are available
1041 *Compatibility*: 'semantic-brute-find-innermost-tag-by-position'
1042 introduced in semantic version 2.0 supercedes
1043 'semantic-find-innermost-nonterminal-by-position' which is now
1046 -- Function: semantic-brute-find-tag-by-class class streamorbuffer
1047 &optional search-parts search-includes
1048 Find all tags with a class CLASS within STREAMORBUFFER. CLASS is a
1049 symbol representing the class of the tags to find. See
1050 "semantic-tag-class". Optional argument SEARCH-PARTS and
1051 SEARCH-INCLUDES are passed to
1052 "semantic-brute-find-tag-by-function".
1054 Use 'semantic-find-tag-by-class' instead.
1057 *Compatibility*: 'semantic-brute-find-tag-by-class' introduced in
1058 semantic version 2.0 supercedes
1059 'semantic-find-nonterminal-by-token' which is now obsolete.
1061 -- Function: semantic-brute-find-tag-standard streamorbuffer &optional
1062 search-parts search-includes
1063 Find all tags in STREAMORBUFFER which define simple class types.
1064 See "semantic-tag-class". Optional argument SEARCH-PARTS and
1065 SEARCH-INCLUDES are passed to
1066 "semantic-brute-find-tag-by-function".
1069 *Compatibility*: 'semantic-brute-find-tag-standard' introduced in
1070 semantic version 2.0 supercedes
1071 'semantic-find-nonterminal-standard' which is now obsolete.
1073 -- Function: semantic-brute-find-tag-by-type type streamorbuffer
1074 &optional search-parts search-includes
1075 Find all tags with type TYPE within STREAMORBUFFER. TYPE is a
1076 string which is the name of the type of the tags returned. See
1077 "semantic-tag-type". Optional argument SEARCH-PARTS and
1078 SEARCH-INCLUDES are passed to
1079 "semantic-brute-find-tag-by-function".
1082 *Compatibility*: 'semantic-brute-find-tag-by-type' introduced in
1083 semantic version 2.0 supercedes 'semantic-find-nonterminal-by-type'
1084 which is now obsolete.
1086 -- Function: semantic-brute-find-tag-by-function function
1087 streamorbuffer &optional search-parts search-includes
1088 Find all tags for which FUNCTION's value is non-'nil' within
1089 STREAMORBUFFER. FUNCTION must return non-'nil' if an element of
1090 STREAM will be included in the new list.
1092 If optional argument SEARCH-PARTS is non-'nil', all sub-parts of
1093 tags are searched. The overloadable function
1094 'semantic-tag-componenets' is used for the searching child lists.
1095 If SEARCH-PARTS is the symbol ''positiononly', then only children
1096 that have positional information are searched.
1098 If SEARCH-INCLUDES is non-'nil', then all include files are also
1099 searched for matches. This parameter hasn't be active for a while
1103 *Compatibility*: 'semantic-brute-find-tag-by-function' introduced
1104 in semantic version 2.0 supercedes
1105 'semantic-find-nonterminal-by-function' which is now obsolete.
1107 -- Function: semantic-brute-find-first-tag-by-function function
1108 streamorbuffer &optional search-parts search-includes
1109 Find the first nonterminal which FUNCTION match within
1110 STREAMORBUFFER. FUNCTION must return non-'nil' if an element of
1111 STREAM will be included in the new list.
1113 The following parameters were never implemented.
1115 If optional argument SEARCH-PARTS, all sub-parts of tags are
1116 searched. The overloadable function "semantic-tag-components" is
1117 used for searching. If SEARCH-INCLUDES is non-'nil', then all
1118 include files are also searched for matches.
1121 *Compatibility*: 'semantic-brute-find-first-tag-by-function'
1122 introduced in semantic version 2.0 supercedes
1123 'semantic-find-nonterminal-by-function-first-match' which is now
1127 File: semantic-appdev.info, Node: Specialty Search, Next: Custom Search, Prev: Deep Search, Up: Searching Tag Tables
1129 2.3 Specialty Search
1130 ====================
1132 There are some specialty searches needed by some semantic tools that
1133 could prove useful. These specialty searches often do not match against
1134 some single attribute as most breadth searches do.
1136 -- Function: semantic-find-tags-of-compound-type &optional table
1137 Find all tags which are a compound type in TABLE. Compound types
1138 are structures, or other data type which is not of a primitive
1139 nature, such as int or double. Used in completion.
1141 -- Function: semantic-find-tags-by-scope-protection scopeprotection
1142 parent &optional table
1143 Find all tags accessable by SCOPEPROTECTION. SCOPEPROTECTION is a
1144 symbol which can be returned by the method
1145 "semantic-tag-protection". A hard-coded order is used to determine
1146 a match. PARENT is a tag representing the PARENT slot needed for
1147 "semantic-tag-protection". TABLE is a list of tags (a subset of
1148 PARENT members) to scan. If TABLE is 'nil', the type members of
1149 PARENT are used. See "semantic-tag-protected-p" for details on
1150 which tags are returned.
1152 -- Function: semantic-find-tags-external-children-of-type type
1154 Find all tags in whose parent is TYPE in TABLE. These tags are
1155 defined outside the scope of the original TYPE declaration. TABLE
1156 is a tag table. See "semantic-something-to-tag-table".
1159 File: semantic-appdev.info, Node: Custom Search, Prev: Specialty Search, Up: Searching Tag Tables
1164 The searching framework for semantic for tag tables has two basic root
1165 methods. One is a function and the other is a macro. The functional
1166 version is needed if some sort of macro conflict arrises. The macro
1167 version is useful because it eliminates a level of function call, and is
1170 -- Function: semantic--find-tags-by-function predicate &optional table
1171 Find tags for which PREDICATE is non-'nil' in TABLE. PREDICATE is
1172 a lambda expression which accepts on TAG. TABLE is a semantic tags
1173 table. See "semantic-something-to-tag-table".
1175 -- Function: semantic--find-tags-by-macro form &optional table
1176 Find tags for which FORM is non-'nil' in TABLE. TABLE is a
1177 semantic tags table. See "semantic-something-to-tag-table".
1180 File: semantic-appdev.info, Node: Tags at Point, Next: Tag Decoration, Prev: Searching Tag Tables, Up: Top
1185 When you need to get the tag the cursor is on, there is a more efficient
1186 mechanism than using 'semantic-brute-find-tag-by-position'. This
1187 mechanism directly queries the overlays the parsing step leaves in the
1188 buffer. This provides for very rapid retrieval of what function or
1189 variable the cursor is currently in.
1191 These functions query the current buffer's overlay system for tags.
1193 -- Function: semantic-find-tag-by-overlay &optional positionormarker
1195 Find all tags covering POSITIONORMARKER by using overlays. If
1196 POSITIONORMARKER is 'nil', use the current point. Optional BUFFER
1197 is used if POSITIONORMARKER is a number, otherwise the current
1198 buffer is used. This finds all tags covering the specified
1199 position by checking for all overlays covering the current spot.
1200 They are then sorted from largest to smallest via the start
1204 *Compatibility*: 'semantic-find-tag-by-overlay' introduced in
1205 semantic version 2.0 supercedes
1206 'semantic-find-nonterminal-by-overlay' which is now obsolete.
1208 -- Function: semantic-find-tag-by-overlay-in-region start end &optional
1210 Find all tags which exist in whole or in part between START and
1211 END. Uses overlays to determine positin. Optional BUFFER argument
1212 specifies the buffer to use.
1215 *Compatibility*: 'semantic-find-tag-by-overlay-in-region'
1216 introduced in semantic version 2.0 supercedes
1217 'semantic-find-nonterminal-by-overlay-in-region' which is now
1220 -- Function: semantic-find-tag-by-overlay-next &optional start buffer
1221 Find the next tag after START in BUFFER. If START is in an
1222 overlay, find the tag which starts next, not the current tag.
1224 -- Function: semantic-find-tag-by-overlay-prev &optional start buffer
1225 Find the next tag before START in BUFFER. If START is in an
1226 overlay, find the tag which starts next, not the current tag.
1228 -- Function: semantic-current-tag
1229 Return the current tag in the current buffer. If there are more
1230 than one in the same location, return the smallest tag. Return
1231 'nil' if there is no tag here.
1234 *Compatibility*: 'semantic-current-tag' introduced in semantic
1235 version 2.0 supercedes 'semantic-current-nonterminal' which is now
1238 -- Function: semantic-current-tag-parent
1239 Return the current tags parent in the current buffer. A tag's
1240 parent would be a containing structure, such as a type containing a
1241 field. Return 'nil' if there is no parent.
1244 *Compatibility*: 'semantic-current-tag-parent' introduced in
1245 semantic version 2.0 supercedes
1246 'semantic-current-nonterminal-parent' which is now obsolete.
1249 File: semantic-appdev.info, Node: Tag Decoration, Next: Tag Sorting, Prev: Tags at Point, Up: Top
1254 Tags can be decorated in different ways. One way a user can control it
1255 is through 'semantic-decoration-mode'. *note (Tag Decoration
1256 Mode)semantic-user::
1258 Applications can use the same routines to decorate tags as well.
1262 * Tag Highlighting:: Highlighting a tag
1263 * Tag Visible Properties:: Invisible, intangible and read only
1264 * Tag Secondary Overlays:: Decorating parts of a tag text
1265 * Tag Folding:: Visibly Folding up tags
1268 File: semantic-appdev.info, Node: Tag Highlighting, Next: Tag Visible Properties, Up: Tag Decoration
1273 -- Function: semantic-highlight-tag tag &optional face
1274 Specify that TAG should be highlighted. Optional FACE specifies
1277 *Compatibility*: 'semantic-highlight-tag' introduced in semantic
1278 version 2.0 supercedes 'semantic-highlight-token' which is now
1281 -- Function: semantic-unhighlight-tag tag
1282 Unhighlight TAG, restoring it's previous face.
1284 *Compatibility*: 'semantic-unhighlight-tag' introduced in semantic
1285 version 2.0 supercedes 'semantic-unhighlight-token' which is now
1288 -- Function: semantic-momentary-highlight-tag tag &optional face
1289 Highlight TAG, removing highlighting when the user hits a key.
1290 Optional argument FACE is the face to use for highlighting. If
1291 FACE is not specified, then 'highlight' will be used.
1293 *Compatibility*: 'semantic-momentary-highlight-tag' introduced in
1294 semantic version 2.0 supercedes
1295 'semantic-momentary-highlight-token' which is now obsolete.
1297 The highlighting routines do their work by changing the face property of
1298 the tag overlay. The raw routine is:
1300 -- Function: semantic-set-tag-face tag face
1301 Specify that TAG should use FACE for display.
1303 *Compatibility*: 'semantic-set-tag-face' introduced in semantic
1304 version 2.0 supercedes 'semantic-set-token-face' which is now
1308 File: semantic-appdev.info, Node: Tag Visible Properties, Next: Tag Secondary Overlays, Prev: Tag Highlighting, Up: Tag Decoration
1310 4.2 Changing a tag's visible properties
1311 =======================================
1313 You can give a tag other properties as well, such as making it invisible
1314 or intangible. You can control how code is edited programatically
1315 through these routines.
1317 -- Function: semantic-set-tag-invisible tag &optional visible
1318 Enable the text in TAG to be made invisible. If VISIBLE is
1319 non-'nil', make the text visible.
1321 *Compatibility*: 'semantic-set-tag-invisible' introduced in
1322 semantic version 2.0 supercedes 'semantic-set-token-invisible'
1323 which is now obsolete.
1325 -- Function: semantic-tag-invisible-p tag
1326 Return non-'nil' if TAG is invisible.
1328 *Compatibility*: 'semantic-tag-invisible-p' introduced in semantic
1329 version 2.0 supercedes 'semantic-token-invisible-p' which is now
1332 -- Function: semantic-set-tag-intangible tag &optional tangible
1333 Enable the text in TAG to be made intangible. If TANGIBLE is
1334 non-'nil', make the text visible. This function does not have
1335 meaning in XEmacs because it seems that the extent 'intangible'
1336 property does not exist.
1338 *Compatibility*: 'semantic-set-tag-intangible' introduced in
1339 semantic version 2.0 supercedes 'semantic-set-token-intangible'
1340 which is now obsolete.
1342 -- Function: semantic-tag-intangible-p tag
1343 Return non-'nil' if TAG is intangible. This function does not have
1344 meaning in XEmacs because it seems that the extent 'intangible'
1345 property does not exist.
1347 *Compatibility*: 'semantic-tag-intangible-p' introduced in semantic
1348 version 2.0 supercedes 'semantic-token-intangible-p' which is now
1351 -- Function: semantic-set-tag-read-only tag &optional writable
1352 Enable the text in TAG to be made read-only. Optional argument
1353 WRITABLE should be non-'nil' to make the text writable instead of
1356 *Compatibility*: 'semantic-set-tag-read-only' introduced in
1357 semantic version 2.0 supercedes 'semantic-set-token-read-only'
1358 which is now obsolete.
1360 -- Function: semantic-tag-read-only-p tag
1361 Return non-'nil' if the current TAG is marked read only.
1363 *Compatibility*: 'semantic-tag-read-only-p' introduced in semantic
1364 version 2.0 supercedes 'semantic-token-read-only-p' which is now
1368 File: semantic-appdev.info, Node: Tag Secondary Overlays, Next: Tag Folding, Prev: Tag Visible Properties, Up: Tag Decoration
1370 4.3 Secondary Overlays
1371 ======================
1373 Each tag which is being visited in a buffer has one overlay. This
1374 overlay is used to track where the tag is while a user is editing, and
1375 can also be used for fast tag identification, and some simple decoration
1378 A secondary overlay associates a new overlay object with a tag which
1379 does not cover the entire body of a tag. You can then put visible
1380 features on that overlay to decorate portions of a tag. This is how tag
1381 boundaries are drawn.
1383 4.3.1 Creation and Deletion
1384 ---------------------------
1386 -- Function: semantic-tag-create-secondary-overlay tag &optional
1388 Create a secondary overlay for TAG. Returns an overlay. The
1389 overlay is also saved in TAG. LINK-HOOK is a function called
1390 whenever TAG is to be linked into a buffer. It should take TAG and
1391 OVERLAY as arguments. The LINK-HOOK should be used to position and
1392 set properties on the generated secondary overlay.
1394 -- Function: semantic-tag-delete-secondary-overlay tag
1396 Delete from TAG the secondary overlay OVERLAY-OR-PROPERTY. If
1397 OVERLAY-OR-PROPERTY is an overlay, delete that overlay. If
1398 OVERLAY-OR-PROPERTY is a symbol, find the overlay with that
1404 -- Function: semantic-tag-get-secondary-overlay tag property
1405 Return secondary overlays from TAG with PROPERTY. PROPERTY is a
1406 symbol and all overlays with that symbol are returned..
1408 -- Function: semantic-tag-secondary-overlays tag
1409 Return a list of secondary overlays active on TAG.
1411 4.3.3 Linking and Unlinking
1412 ---------------------------
1414 When a tag's file is put in a buffer, that tag is "linked" into the
1415 buffer. When the buffer is deleted, the tag is "unlinked". This
1416 process adds and removes the default overlay on the tag. Secondary
1417 overlays use 'semantic-tag-add-hook' and 'semantic-tag-remove-hook' too
1418 apply link and unlink hooks.
1420 This allows the secondary overlays to be automatically removed or added
1421 by the seconary overlay system whenever a tag's file goes in or out of a
1425 File: semantic-appdev.info, Node: Tag Folding, Prev: Tag Secondary Overlays, Up: Tag Decoration
1430 Using secondary overlays, a set of tag folding routines are made
1431 available. These routines are similar to the tag visible properties.
1433 -- Function: semantic-set-tag-folded tag &optional folded
1434 Fold TAG, such that only the first line of text is shown. Optional
1435 argument FOLDED should be non-'nil' to fold the tag. 'nil' implies
1436 the tag should be fully shown.
1438 -- Function: semantic-tag-folded-p tag
1439 Non-'nil' if TAG is currently folded.
1442 File: semantic-appdev.info, Node: Tag Sorting, Next: Tag Completion, Prev: Tag Decoration, Up: Top
1447 Sometimes it is important to reorganize a tag stream into a form that is
1448 better for display to a user. It is important to not use functions with
1449 side effects that could effect the tag cache.
1451 There are some existing utility functions which will reorganize the tag
1454 -- Function: semantic-unique-tag-table tags
1455 Scan a list of TAGS, removing duplicates. This must first sort the
1456 tags by position ascending. TAGS are removed only if they are
1457 equivalent, as can happen when multiple tag sources are scanned.
1459 -- Function: semantic-unique-tag-table-by-name tags
1460 Scan a list of TAGS, removing duplicate names. This must first
1461 sort the tags by name alphabetically ascending.
1463 -- Function: semantic-bucketize tags &optional parent filter
1464 Sort TAGS into a group of buckets based on tag class. Unknown
1465 classes are placed in a Misc bucket. Type bucket names are defined
1466 by either 'semantic-symbol->name-assoc-list'. If PARENT is
1467 specified, then TAGS belong to this PARENT in some way. This will
1468 use 'semantic-symbol->name-assoc-list-for-type-parts' to generate
1469 bucket names. Optional argument FILTER is a filter function to be
1470 applied to each bucket. The filter function will take one
1471 argument, which is a list of tokens, and may re-organize the list
1474 -- Variable: semantic-bucketize-tag-class
1475 Function used to get a symbol describing the class of a tag. This
1476 function must take one argument of a semantic tag. It should
1477 return a symbol found in 'semantic-symbol->name-assoc-list' which
1478 "semantic-bucketize" uses to bin up tokens. To create new bins for
1479 an application augment 'semantic-symbol->name-assoc-list', and
1480 'semantic-symbol->name-assoc-list-for-type-parts' in addition to
1481 setting this variable (locally in your function).
1483 -- Function: semantic-adopt-external-members tags
1484 Rebuild TAGS so that externally defined members are regrouped.
1485 Some languages such as C++ and CLOS permit the declaration of
1486 member functions outside the definition of the class. It is easier
1487 to study the structure of a program when such methods are grouped
1488 together more logically.
1490 This function uses "semantic-tag-external-member-p" to determine
1491 when a potential child is an externally defined member.
1493 Note: Applications which use this function must account for token
1494 types which do not have a position, but have children which *do*
1497 Applications should use 'semantic-mark-external-member-function' to
1498 modify all tags which are found as externally defined to some type.
1499 For example, changing the token type for generating extra buckets
1500 with the bucket function.
1502 -- Variable: semantic-orphaned-member-metaparent-type
1503 In "semantic-adopt-external-members", the type of ''type' for
1504 metaparents. A metaparent is a made-up type semantic token used to
1505 hold the child list of orphaned members of a named type.
1507 -- Variable: semantic-mark-external-member-function
1508 Function called when an externally defined orphan is found. By
1509 default, the token is always marked with the 'adopted' property.
1510 This function should be locally bound by a program that needs to
1511 add additional behaviors into the token list. This function is
1512 called with two arguments. The first is TOKEN which is a shallow
1513 copy of the token to be modified. The second is the PARENT which
1514 is adopting TOKEN. This function should return TOKEN (or a copy of
1515 it) which is then integrated into the revised token list.
1518 File: semantic-appdev.info, Node: Tag Completion, Next: Override Methods, Prev: Tag Sorting, Up: Top
1523 Often time, it is useful to ask the user for the name of some tag. This
1524 can be as simple as just prompting for a name, but often time, the
1525 semantics can be quite complex. If two tags have the same name, which
1528 Semantic provides a completion engine for prompting for tags by name,
1529 and providing fancy ways to display completion lists that allow the user
1530 to choose a tag if several have the same name.
1532 To use a completion function in your interactive function, you can
1533 augment the "interactive" command like this:
1535 (defun my-function (tag)
1536 "Do something to TAG."
1537 (interactive (list (my-completion-function "Tag: ")))
1542 * Tag Completion Convenience Functions:: Provided functions
1543 * Custom Tag Completion Functions:: Build your own completion function
1544 * Old Tag Completion:: Completion functions from older releases
1547 File: semantic-appdev.info, Node: Tag Completion Convenience Functions, Next: Custom Tag Completion Functions, Up: Tag Completion
1549 6.1 Tag Completion Convenience Functions
1550 ========================================
1552 There are some pre written completion functions that can be used in your
1555 -- Function: semantic-complete-read-tag-buffer-deep prompt &optional
1556 default-tag initial-input history
1557 Ask for a tag by name from the current buffer. Available tags are
1558 from the current buffer, at any level. Completion options are
1559 presented in a traditional way, with highlighting to resolve
1560 same-name collisions. PROMPT is a string to prompt with.
1561 DEFAULT-TAG is a semantic tag or string to use as the default
1562 value. If INITIAL-INPUT is non-'nil', insert it in the minibuffer
1563 initially. HISTORY is a symbol representing a variable to story
1566 -- Function: semantic-complete-read-tag-project prompt &optional
1567 default-tag initial-input history
1568 Ask for a tag by name from the current project. Available tags are
1569 from the current project, at the top level. Completion options are
1570 presented in a traditional way, with highlighting to resolve
1571 same-name collisions. PROMPT is a string to prompt with.
1572 DEFAULT-TAG is a semantic tag or string to use as the default
1573 value. If INITIAL-INPUT is non-'nil', insert it in the minibuffer
1574 initially. HISTORY is a symbol representing a variable to store
1577 -- Function: semantic-complete-read-tag-analyzer prompt &optional
1579 Ask for a tag by name based on the current context. The function
1580 "semantic-analyze-current-context" is used to calculate the
1581 context. "semantic-analyze-possible-completions" is used to
1582 generate the list of possible completions. PROMPT is the first
1583 part of the prompt. Additional prompt is added based on the
1584 contexts full prefix. CONTEXT is the semantic analyzer context to
1585 start with. HISTORY is a symbol representing a variable to stor
1586 the history in. usually a default-tag and initial-input are
1587 available for completion prompts. these are calculated from the
1588 CONTEXT variable passed in.
1590 -- Function: semantic-complete-inline-analyzer context
1591 Complete a symbol name by name based on the current context. This
1592 is similar to 'semantic-complete-read-tag-analyze', except that the
1593 completion interaction is in the buffer where the context was
1594 calculated from. CONTEXT is the semantic analyzer context to start
1595 with. See 'semantic-complete-inline-tag-engine' for details on how
1599 File: semantic-appdev.info, Node: Custom Tag Completion Functions, Next: Old Tag Completion, Prev: Tag Completion Convenience Functions, Up: Tag Completion
1601 6.2 Custom Tag Completion Functions
1602 ===================================
1604 There aren't many built in completion functions, but there are many
1605 parts that can be put together into custom completion functions.
1607 A completion function is built up of three important parts.
1610 Something that selects tags, and provides some list of tags
1611 available, such as all functions, or all classes named "bob".
1612 Typing and selecting
1613 The prompt where you can type in the name of a tag.
1614 Displaying possible completion values
1615 A mechanism for displaying completion lists.
1617 There is one typing and selecting routine that can be used to create
1618 your custom completion prompt.
1620 -- Function: semantic-complete-read-tag-engine collector displayor
1621 prompt default-tag initial-input history
1622 Read a semantic tag, and return a tag for the selection. Argument
1623 COLLECTOR is an object which can be used to to calculate a list of
1624 possible hits. See 'semantic-completion-collector-engine' for
1625 details on COLLECTOR. Argumeng DISPLAYOR is an object used to
1626 display a list of possible completions for a given prefix.
1627 See'semantic-completion-display-engine' for details on DISPLAYOR.
1628 PROMPT is a string to prompt with. DEFAULT-TAG is a semantic tag
1629 or string to use as the default value. If INITIAL-INPUT is
1630 non-'nil', insert it in the minibuffer initially. HISTORY is a
1631 symbol representing a variable to story the history in.
1633 As you can see, this takes one "collector", and one "displayor". These
1634 are objects created for this prompt at runtime. The completion engine
1635 then uses to perform their tasks.
1639 (defun semantic-complete-read-tag-buffer-deep (prompt &optional
1640 default-tag initial-input history)
1641 "Ask for a tag by name from the current buffer.
1642 PROMPT is a string to prompt with.
1643 DEFAULT-TAG is a semantic tag or string to use as the default value.
1644 If INITIAL-INPUT is non-nil, insert it in the minibuffer initially.
1645 HISTORY is a symbol representing a variable to story the history in."
1646 (semantic-complete-read-tag-engine
1647 (semantic-collector-buffer-deep prompt :buffer (current-buffer))
1648 (semantic-displayor-traditional-with-focus-highlight "simple")
1649 ;;(semantic-displayor-tooltip "simple")
1662 File: semantic-appdev.info, Node: Tag Collectors, Next: Tag Displayors, Up: Custom Tag Completion Functions
1664 6.2.1 Tag Collectors
1665 --------------------
1667 A tag collector is an object that inherits from
1668 "semantic-collector-abstract". A new collector is needed for each
1669 specialized type of prompt that draws from a different selection of
1672 You can have a collector that satisfies multiple purposes using slots
1673 filled in the initializer for that object.
1675 Collectors inherit from some of the following:
1677 -- Type: semantic-collector-abstract
1678 Root class for completion engines. The baseclass provides basic
1679 functionality for interacting with a completion displayor object,
1680 and tracking the current progress of a completion.
1682 -- Type: semantic-collector-buffer-abstract
1683 Root class for per-buffer completion engines. These collectors
1684 track themselves on a per-buffer basis.
1686 -- Type: semantic-collector-project-abstract
1687 Root class for project wide completion engines. Uses semanticdb
1688 for searching all tags in the current project.
1690 Available instantiable classes are:
1692 -- Type: semantic-collector-buffer-deep
1693 Completion engine for tags in the current buffer. When searching
1694 for a tag, uses semantic deep searche functions. Basics search
1695 only in the current buffer.
1697 -- Type: semantic-collector-project
1698 Completion engine for tags in a project.
1700 -- Type: semantic-collector-project-brutish
1701 Completion engine for tags in a project.
1703 -- Type: semantic-collector-analyze-completions
1704 Completion engine that uses the context analyzer to provide
1705 options. The only options available for completion are those which
1706 can be logically inserted into the current context.
1708 NOTE: Add sections for writing new collectors.
1711 File: semantic-appdev.info, Node: Tag Displayors, Prev: Tag Collectors, Up: Custom Tag Completion Functions
1713 6.2.2 Tag Displayors
1714 --------------------
1716 When a user is interacting with the prompt, and requests completion,
1717 those tags are drawn from the collector. If the user asks for a list of
1718 completion by hitting a complete key twice, then the list of completions
1719 heeds to be displayed in some way.
1721 Displayors can be used to manage the display of all tags currently
1722 available, AND often needs to be used to focus one one particular tag of
1723 many in a visible way.
1725 All displayors inherit from the displayor baseclass that defines the
1728 -- Type: semantic-displayor-abstract
1729 Manages the display of some number of tags. Provides the basics
1730 for a displayor, including interacting with a collector, and
1731 tracking tables of completion to display.
1733 -- Type: semantic-displayor-focus-abstract
1734 A displayor which has the ability to focus in on one tag. Focusing
1735 is a way of differentiationg between multiple tags which have the
1738 Distinct implementations of displayors include:
1740 -- Type: semantic-displayor-traditional
1741 Traditional display mechanism for a list of possible completions.
1742 Completions are showin in a new buffer and listed with the ability
1743 to click on the items to aid in completion.
1745 -- Type: semantic-displayor-traditional-with-focus-highlight
1746 A traditional displayor which can focus on a tag by showing it.
1747 Same as 'semantic-displayor-traditional', but with selection
1748 between multiple tags with the same name done by 'focusing' on the
1749 source location of the different tags to differentiate them.
1751 -- Type: semantic-displayor-tooltip
1752 Display mechanism using tooltip for a list of possible completions.
1754 NOTE: Add sections for writing new collectors.
1757 File: semantic-appdev.info, Node: Old Tag Completion, Prev: Custom Tag Completion Functions, Up: Tag Completion
1759 6.3 Older Tag Completion functions
1760 ==================================
1762 These are older completion functions. They may still be useful.
1764 -- Function: semantic-read-symbol prompt &optional default stream
1766 Read a symbol name from the user for the current buffer. PROMPT is
1767 the prompt to use. Optional arguments: DEFAULT is the default
1768 choice. If no default is given, one is read from under point.
1769 STREAM is the list of tokens to complete from. FILTER is provides
1770 a filter on the types of things to complete. FILTER must be a
1771 function to call on each element.
1773 -- Function: semantic-read-variable prompt &optional default stream
1774 Read a variable name from the user for the current buffer. PROMPT
1775 is the prompt to use. Optional arguments: DEFAULT is the default
1776 choice. If no default is given, one is read from under point.
1777 STREAM is the list of tokens to complete from.
1779 -- Function: semantic-read-function prompt &optional default stream
1780 Read a function name from the user for the current buffer. PROMPT
1781 is the prompt to use. Optional arguments: DEFAULT is the default
1782 choice. If no default is given, one is read from under point.
1783 STREAM is the list of tags to complete from.
1785 -- Function: semantic-read-type prompt &optional default stream
1786 Read a type name from the user for the current buffer. PROMPT is
1787 the prompt to use. Optional arguments: DEFAULT is the default
1788 choice. If no default is given, one is read from under point.
1789 STREAM is the list of tags to complete from.
1792 File: semantic-appdev.info, Node: Override Methods, Next: Parser Features, Prev: Tag Completion, Up: Top
1797 These functions are called 'override methods' because they provide
1798 generic behaviors, which a given language can override. For example,
1799 finding a dependency file in Emacs lisp can be done with the
1800 'locate-library' command (which overrides the default behavior.) In C,
1801 a dependency can be found by searching a generic search path which can
1802 be passed in via a variable.
1804 If you plan to use one of these functions from a buffer that is not of
1805 the same major-mode as the original tag, you can use this form to make
1806 sure the correct action takes place:
1808 -- Function: semantic-with-mode-bindings mode &rest body
1809 Evaluate BODY with the local bindings of MODE. The current mode
1810 bindings are saved, BODY is evaluated, and the saved bindings are
1811 restored, even in case of an abnormal exit. Value is what BODY
1814 For more on override methods, *note (lang-support-guide)Semantic
1815 Overload Mechanism::.
1819 * Format Tag:: Converting Tokens into text strings
1820 * Tag Members:: Tags in tags
1821 * Tag Details:: Arbitrary token detail fetching
1822 * Making New Methods:: How to add your own methods for a tool
1825 File: semantic-appdev.info, Node: Format Tag, Next: Tag Members, Up: Override Methods
1830 Any given tag consists of Meta information which is best viewed in some
1831 textual form. This could be as simple as the tag's name, or as a
1832 prototype to be added to header file in C. Not only are there several
1833 default converters from a Tag into text, but there is also some
1834 convenient variables that can be used with them. Use these variables to
1835 allow options on output forms when displaying tags in your programs.
1837 -- Variable: semantic-format-tag-functions
1838 List of functions which convert a tag to text. Each function must
1839 take the parameters TAG &optional PARENT COLOR. TAG is the tag to
1840 convert. PARENT is a parent tag or name which refers to the
1841 structure or class which contains TAG. PARENT is NOT a class which
1842 a TAG would claim as a parent. COLOR indicates that the generated
1843 text should be colored using 'font-lock'.
1845 -- Variable: semantic-format-tag-custom-list
1846 A List used by customizeable variables to choose a tag to text
1847 function. Use this variable in the ':type' field of a customizable
1850 Every tag to text conversion function must take the same parameters,
1851 which are TAG, the tag to be converted, PARENT, the containing parent
1852 (like a structure which contains a variable), and COLOR, which is a flag
1853 specifying that color should be applied to the returned string.
1855 When creating, or using these strings, particularly with color, use
1856 "concat" to build up larger strings instead of "format". This will
1857 preserve text properties.
1859 -- Function: semantic-format-tag-name tag &optional parent color
1860 Return the name string describing TAG. The name is the shortest
1861 possible representation. Optional argument PARENT is the parent
1862 type if TAG is a detail. Optional argument COLOR means highlight
1863 the prototype with font-lock colors. This function can be
1864 overloaded (see "define-mode-local-override" for details).
1866 *Compatibility*: 'semantic-format-tag-name' introduced in semantic
1867 version 2.0 supercedes 'semantic-name-nonterminal' which is now
1870 -- Function: semantic-format-tag-abbreviate tag &optional parent color
1871 Return an abbreviated string describing TAG. The abbreviation is
1872 to be short, with possible symbols indicating the type of tag, or
1873 other information. Optional argument PARENT is the parent type if
1874 TAG is a detail. Optional argument COLOR means highlight the
1875 prototype with font-lock colors. This function can be overloaded
1876 (see "define-mode-local-override" for details).
1878 *Compatibility*: 'semantic-format-tag-abbreviate' introduced in
1879 semantic version 2.0 supercedes 'semantic-abbreviate-nonterminal'
1880 which is now obsolete.
1882 -- Function: semantic-format-tag-summarize tag &optional parent color
1883 Summarize TAG in a reasonable way. Optional argument PARENT is the
1884 parent type if TAG is a detail. Optional argument COLOR means
1885 highlight the prototype with font-lock colors. This function can
1886 be overloaded (see "define-mode-local-override" for details).
1888 *Compatibility*: 'semantic-format-tag-summarize' introduced in
1889 semantic version 2.0 supercedes 'semantic-summerize-nonterminal'
1890 which is now obsolete.
1892 -- Function: semantic-format-tag-prototype tag &optional parent color
1893 Return a prototype for TAG. This function should be overloaded,
1894 though it need not be used. This is because it can be used to
1895 create code by language independent tools. Optional argument
1896 PARENT is the parent type if TAG is a detail. Optional argument
1897 COLOR means highlight the prototype with font-lock colors. This
1898 function can be overloaded (see "define-mode-local-override" for
1901 *Compatibility*: 'semantic-format-tag-prototype' introduced in
1902 semantic version 2.0 supercedes 'semantic-prototype-nonterminal'
1903 which is now obsolete.
1905 -- Function: semantic-format-tag-concise-prototype tag &optional parent
1907 Return a concise prototype for TAG. Optional argument PARENT is
1908 the parent type if TAG is a detail. Optional argument COLOR means
1909 highlight the prototype with font-lock colors. This function can
1910 be overloaded (see "define-mode-local-override" for details).
1912 *Compatibility*: 'semantic-format-tag-concise-prototype' introduced
1913 in semantic version 2.0 supercedes
1914 'semantic-concise-prototype-nonterminal' which is now obsolete.
1916 -- Function: semantic-format-tag-uml-abbreviate tag &optional parent
1918 Return a UML style abbreviation for TAG. Optional argument PARENT
1919 is the parent type if TAG is a detail. Optional argument COLOR
1920 means highlight the prototype with font-lock colors. This function
1921 can be overloaded (see "define-mode-local-override" for details).
1923 *Compatibility*: 'semantic-format-tag-uml-abbreviate' introduced in
1924 semantic version 2.0 supercedes
1925 'semantic-uml-abbreviate-nonterminal' which is now obsolete.
1927 -- Function: semantic-format-tag-uml-prototype tag &optional parent
1929 Return a UML style prototype for TAG. Optional argument PARENT is
1930 the parent type if TAG is a detail. Optional argument COLOR means
1931 highlight the prototype with font-lock colors. This function can
1932 be overloaded (see "define-mode-local-override" for details).
1934 *Compatibility*: 'semantic-format-tag-uml-prototype' introduced in
1935 semantic version 2.0 supercedes
1936 'semantic-uml-prototype-nonterminal' which is now obsolete.
1938 -- Function: semantic-format-tag-uml-concise-prototype tag &optional
1940 Return a UML style concise prototype for TAG. Optional argument
1941 PARENT is the parent type if TAG is a detail. Optional argument
1942 COLOR means highlight the prototype with font-lock colors. This
1943 function can be overloaded (see "define-mode-local-override" for
1946 *Compatibility*: 'semantic-format-tag-uml-concise-prototype'
1947 introduced in semantic version 2.0 supercedes
1948 'semantic-uml-concise-prototype-nonterminal' which is now obsolete.
1950 -- Function: semantic-format-tag-prin1 tag &optional parent color
1951 Convert TAG to a string that is the print name for TAG. PARENT and
1954 *Compatibility*: 'semantic-format-tag-prin1' introduced in semantic
1955 version 2.0 supercedes 'semantic-prin1-nonterminal' which is now
1958 An additional utility will return a string for just the data type of a
1959 tag. This function is used in the above routines as well.
1961 -- Function: semantic-format-tag-type tag color
1962 Convert the data type of TAG to a string usable in tag formatting.
1963 It is presumed that TYPE is a string or semantic tag. This
1964 function can be overloaded (see "define-mode-local-override" for
1968 File: semantic-appdev.info, Node: Tag Members, Next: Tag Details, Prev: Format Tag, Up: Override Methods
1973 Tags are often in a hierarchical form, meaning that a tag found in the
1974 top-level list may itself contain additional members.
1976 The following overridable functions can fetch those tags.
1978 -- Function: semantic-tag-components tag
1979 Return a list of components for TAG. A Component is a part of TAG
1980 which itself may be a TAG. Examples include the elements of a
1981 structure in a tag of class 'type, or the list of arguments to a
1982 tag of class ''function'. This function can be overloaded (see
1983 "define-mode-local-override" for details).
1985 -- Function: semantic-tag-components-with-overlays tag
1986 Return the list of top level components belonging to TAG. Children
1987 are any sub-tags which contain overlays.
1989 Default behavior is to get "semantic-tag-components" in addition to
1990 the components of an anonymous types (if applicable.)
1992 Note for language authors: If a mode defines a language tag that
1993 has tags in it with overlays you should still return them with this
1994 function. Ignoring this step will prevent several features from
1995 working correctly. This function can be overloaded (see
1996 "define-mode-local-override" for details).
1998 Some languages can define parts of a tag outside the actual scope of the
1999 parent tag. You can fetch information about them with these overload
2002 -- Function: semantic-tag-external-member-p parent tag
2003 Return non-'nil' if PARENT is the parent of TAG. TAG is an
2004 external member of PARENT when it is somehow tagged as having
2005 PARENT as it's parent. PARENT and TAG must both be semantic tags.
2007 The default behavior, if not overridden with
2008 'tag-external-member-p' is to match ':parent' attribute in the name
2011 If this function is overridden, use
2012 'semantic-tag-external-member-children-p-default' to also include
2013 the default behavior, and merely extend your own. This function
2014 can be overloaded (see "define-mode-local-override" for details).
2016 *Compatibility*: 'semantic-tag-external-member-p' introduced in
2017 semantic version 2.0 supercedes
2018 'semantic-nonterminal-external-member-p' which is now obsolete.
2020 -- Function: semantic-tag-external-member-children tag &optional usedb
2021 Return the list of children which are not *in* TAG. If optional
2022 argument USEDB is non-'nil', then also search files in the Semantic
2023 Database. If USEDB is a list of databases, search those databases.
2025 Children in this case are functions or types which are members of
2026 TAG, such as the parts of a type, but which are not defined inside
2027 the class. C++ and CLOS both permit methods of a class to be
2028 defined outside the bounds of the class' definition.
2030 The default behavior, if not overridden with
2031 'tag-external-member-children' is to search using
2032 "semantic-tag-external-member-p" in all top level definitions with
2035 If this function is overridden, use
2036 "semantic-tag-external-member-children-default" to also include the
2037 default behavior, and merely extend your own. This function can be
2038 overloaded (see "define-mode-local-override" for details).
2040 *Compatibility*: 'semantic-tag-external-member-children' introduced
2041 in semantic version 2.0 supercedes
2042 'semantic-nonterminal-external-member-children' which is now
2046 File: semantic-appdev.info, Node: Tag Details, Next: Making New Methods, Prev: Tag Members, Up: Override Methods
2051 These functions help derive information about tags that may not be
2052 obvious for non-traditional languages with their own token types.
2054 -- Function: semantic-tag-protection tag &optional parent
2055 Return protection information about TAG with optional PARENT. This
2056 function returns on of the following symbols: 'nil' - No special
2057 protection. Language dependent. ''public' - Anyone can access
2058 this TAG. ''private' - Only methods in the local scope can access
2059 TAG. ''protected' - Like private for outside scopes, like public
2060 for child classes. Some languages may choose to provide additional
2061 return symbols specific to themselves. Use of this function should
2064 The default behavior (if not overridden with 'tag-protection' is to
2065 return a symbol based on type modifiers. This function can be
2066 overloaded (see "define-mode-local-override" for details). It
2067 makes the overload "semantic-nonterminal-protection" obsolete.
2069 *Compatibility*: 'semantic-tag-protection' introduced in semantic
2070 version 2.0 supercedes 'semantic-nonterminal-protection' which is
2073 -- Function: semantic-tag-protected-p tag protection &optional parent
2074 Non-'nil' if TAG is is protected. PROTECTION is a symbol which can
2075 be returned by the method "semantic-tag-protection". PARENT is the
2076 parent data type which contains TAG.
2078 For these PROTECTIONs, true is returned if TAG is:
2084 True if private or 'nil'.
2086 True if private, protected, or 'nil'.
2088 -- Function: semantic-tag-abstract-p tag &optional parent
2089 Return non 'nil' if TAG is abstract. Optional PARENT is the parent
2090 tag of TAG. In UML, abstract methods and classes have special
2091 meaning and behavior in how methods are overridden. In UML,
2092 abstract methods are italicized.
2094 The default behavior (if not overridden with 'tag-abstract-p' is to
2095 return true if 'abstract' is in the type modifiers. This function
2096 can be overloaded (see "define-mode-local-override" for details).
2097 It makes the overload "semantic-nonterminal-abstract" obsolete.
2099 *Compatibility*: 'semantic-tag-abstract-p' introduced in semantic
2100 version 2.0 supercedes 'semantic-nonterminal-abstract' which is now
2103 -- Function: semantic-tag-leaf-p tag &optional parent
2104 Return non 'nil' if TAG is leaf. Optional PARENT is the parent tag
2105 of TAG. In UML, leaf methods and classes have special meaning and
2108 The default behavior (if not overridden with 'tag-leaf-p' is to
2109 return true if 'leaf' is in the type modifiers. This function can
2110 be overloaded (see "define-mode-local-override" for details). It
2111 makes the overload "semantic-nonterminal-leaf" obsolete.
2113 *Compatibility*: 'semantic-tag-leaf-p' introduced in semantic
2114 version 2.0 supercedes 'semantic-tag-leaf' which is now obsolete.
2116 -- Function: semantic-tag-static-p tag &optional parent
2117 Return non 'nil' if TAG is static. Optional PARENT is the parent
2118 tag of TAG. In UML, static methods and attributes mean that they
2119 are allocated in the parent class, and are not instance specific.
2120 UML notation specifies that STATIC entries are underlined. This
2121 function can be overloaded (see "define-mode-local-override" for
2124 *Compatibility*: 'semantic-tag-static-p' introduced in semantic
2125 version 2.0 supercedes 'semantic-tag-static' which is now obsolete.
2127 -- Variable: semantic-dependency-include-path
2128 Defines the include path used when searching for files. This
2129 should be a list of directories to search which is specific to the
2130 file being included.
2132 If "semantic-dependency-tag-file" is overridden for a given
2133 language, this path is most likely ignored.
2135 This function, reguardless of being overriden, caches the located
2136 dependency file location in the tag property 'dependency-file'. If
2137 you override this function, you do not need to implement your own
2138 cache. Each time the buffer is fully reparsed, the cache will be
2141 TODO: use ffap.el to locate such items.
2143 -- Function: semantic-dependency-tag-file &optional tag
2144 Find the filename represented from TAG. Depends on
2145 'semantic-dependency-include-path' for searching. Always searches
2146 '.' first, then searches additional paths. This function can be
2147 overloaded (see "define-mode-local-override" for details). It
2148 makes the overload "semantic-find-dependency" obsolete.
2150 *Compatibility*: 'semantic-dependency-tag-file' introduced in
2151 semantic version 2.0 supercedes 'semantic-find-dependency' which is
2154 -- Function: semantic-prototype-file buffer
2155 Return a file in which prototypes belonging to BUFFER should be
2156 placed. Default behavior (if not overridden) looks for a token
2157 specifying the prototype file, or the existence of an EDE variable
2158 indicating which file prototypes belong in. This function can be
2159 overloaded (see "define-mode-local-override" for details).
2161 -- Function: semantic-go-to-tag tag &optional parent
2162 Go to the location of TAG. TAG may be a stripped element, in which
2163 case PARENT specifies a parent tag that has position information.
2164 Different behaviors are provided depending on the type of tag. For
2165 example, dependencies (includes) will seek out the file that is
2166 depended on (see "semantic-dependency-tag-file". This function can
2167 be overloaded (see "define-mode-local-override" for details). It
2168 makes the overload "semantic-find-nonterminal" obsolete.
2170 *Compatibility*: 'semantic-go-to-tag' introduced in semantic
2171 version 2.0 supercedes 'semantic-find-nonterminal' which is now
2174 -- Function: semantic-texi-find-documentation name &optional type
2175 Find the function or variable NAME of TYPE in the texinfo source.
2176 NAME is a string representing some functional symbol. TYPE is a
2177 string, such as "variable" or "Command" used to find the correct
2178 definition in case NAME qualifies as several things. When this
2179 function exists, POINT is at the definition. If the doc was not
2180 found, an error is thrown. Note: TYPE not yet implemented.
2183 File: semantic-appdev.info, Node: Making New Methods, Prev: Tag Details, Up: Override Methods
2185 7.4 Making New Methods
2186 ======================
2188 To create your own application specific mode local function, you should
2189 use "define-overload". This function creates the framework needed for
2190 different mode-authors to customize your applications.
2192 Once a function has been defined as mode-local, you should use
2193 "define-mode-local-override" to add a mode specific feature.
2195 -- Function: define-overload name args docstring &rest body
2196 Define a new function, as with "defun" which can be overloaded.
2197 NAME is the name of the function to create. ARGS are the arguments
2198 to the function. DOCSTRING is a documentation string to describe
2199 the function. The docstring will automatically had details about
2200 its overload symbol appended to the end. BODY is code that would
2201 be run when there is no override defined. The default is to call
2202 the function 'NAME-default' with the appropriate arguments.
2204 BODY can also include an override form that specifies which part of
2205 BODY is specifically overridden. This permits to specify common
2206 code run for both default and overridden implementations. An
2207 override form is one of:
2209 1. (:override [OVERBODY]) 2. (:override-with-args OVERARGS
2212 OVERBODY is the code that would be run when there is no override
2213 defined. The default is to call the function 'NAME-default' with
2214 the appropriate arguments deduced from ARGS. OVERARGS is a list of
2215 arguments passed to the override and 'NAME-default' function, in
2216 place of those deduced from ARGS.
2218 -- Function: define-mode-local-override name mode args docstring &rest
2220 Define a mode specific override of the function overload NAME. Has
2221 meaning only if NAME has been created with "define-overload". MODE
2222 is the major mode this override is being defined for. ARGS are the
2223 function arguments, which should match those of the same named
2224 function created with "define-overload". DOCSTRING is the
2225 documentation string. BODY is the implementation of this function.
2227 *Compatibility*: 'define-mode-local-override' introduced in
2228 semantic version 2.0 supercedes
2229 'define-mode-overload-implementation' which is now obsolete.
2232 File: semantic-appdev.info, Node: Parser Features, Next: Semantic Database, Prev: Override Methods, Up: Top
2237 If you write a program that uses a tag table in a persistent display or
2238 database, it is necessary to know when tag tables change so that your
2239 displays can be updated. This is especially important as tags can be
2240 replaced, changed, or deleted, and the associated overlays will then
2241 throw errors when you try to use them. Complete integration with tag
2242 changes can be achieved via several hooks.
2244 If you write an application that frequenly accesses the tags tables, it
2245 is important to make sure those tags are up to date, and to make sure
2246 you application does not adversely effect all the other minor modes that
2249 The semantic parser has many features and hooks that applications can
2250 use to provide a good user experience.
2254 * Editing Buffers:: Let the parser know you are changing a buffer.
2255 * Parser State:: Knowing if the tag table is out of date
2256 * Parser Hooks:: Knowing when tags change
2257 * Lexical Safety:: Preventing lexical errors from making a mess
2260 File: semantic-appdev.info, Node: Editing Buffers, Next: Parser State, Up: Parser Features
2265 One interesting way to interact with the parser is to let it know that
2266 changes you are going to make will not require re-parsing.
2268 -- Variable: semantic-edits-are-safe
2269 When non-'nil', modifications do not require a reparse. This
2270 prevents tokens from being marked dirty, and it prevents top level
2271 edits from causing a cache check. Use this when writing programs
2272 that could cause a full reparse, but will not change the tag
2273 structure, such as adding or updating top-level comments.
2276 File: semantic-appdev.info, Node: Parser State, Next: Parser Hooks, Prev: Editing Buffers, Up: Parser Features
2281 It is sometimes useful to know what the current parsing state is. These
2282 function can let you know what level of re-parsing may be needed.
2283 Careful choices on when to reparse can make your program much faster.
2285 -- Function: semantic-parse-tree-needs-update-p
2286 Return non-'nil' if the current parse tree needs to be updated.
2288 -- Function: semantic-parse-tree-needs-rebuild-p
2289 Return non-'nil' if the current parse tree needs to be rebuilt.
2291 -- Function: semantic-parse-tree-unparseable-p
2292 Return non-'nil' if the current buffer has been marked unparseable.
2294 -- Function: semantic-parse-tree-up-to-date-p
2295 Return non-'nil' if the current parse tree is up to date.
2298 File: semantic-appdev.info, Node: Parser Hooks, Next: Lexical Safety, Prev: Parser State, Up: Parser Features
2303 If you just want to know when a buffer changes, use this hook.
2305 -- Variable: semantic-after-toplevel-cache-change-hook
2306 Hooks run after the buffer tag list has changed. This list will
2307 change when a buffer is reparsed, or when the tag list in a buffer
2308 is cleared. It is *NOT* called if the current tag list is
2311 Hook functions must take one argument, which is the new list of
2312 tags associated with this buffer.
2314 For language specific hooks, make sure you define this as a local
2317 If you want tighter interaction with how the user is editing different
2318 tags, you can use this hook instead.
2320 -- Variable: semantic-after-partial-cache-change-hook
2321 Hooks run after the buffer cache has been updated.
2323 This hook will run when the cache has been partially reparsed.
2324 Partial reparses are incurred when a user edits a buffer, and only
2325 the modified sections are rescanned.
2327 Hook functions must take one argument, which is the list of tokens
2328 updated in the current buffer.
2330 For language specific hooks, make sure you define this as a local
2333 It is also useful to clean up any data your application is using when
2334 semantic flushes its tags table.
2336 -- Variable: semantic-before-toplevel-cache-flush-hook
2337 Hooks run before the toplevel nonterminal cache is flushed. For
2338 language specific hooks, make sure you define this as a local hook.
2339 This hook is called before a corresponding
2340 'semantic-after-toplevel-cache-change-hook' which is also called
2341 during a flush when the cache is given a new value of 'nil'.
2344 File: semantic-appdev.info, Node: Lexical Safety, Prev: Parser Hooks, Up: Parser Features
2349 If you application frequenly requests lists of tags upon user request,
2350 it may be important to avoid lexical problems that frequenly occur when
2351 the user has partially written an expression, such as starting a string,
2354 You can protect your code from lexical problems with this macro:
2356 -- Function: semantic-lex-catch-errors symbol &rest forms
2357 Using SYMBOL, execute FORMS catching lexical errors. If FORMS
2358 results in a call to the parser that throws a lexical error, the
2359 error will be caught here without the buffer's cache being thrown
2360 out of date. If there is an error, the syntax that failed is
2361 returned. If there is no error, then the last value of FORMS is
2364 It is important to provide a good SYMBOL so that these macros can nest
2367 If you want your code to run anyway, even if there is a lexical error,
2368 using this macro like this:
2370 (semantic-lex-catch-errors
2371 (semantic-fetch-tags))
2373 will put the parser into the 'unparseable' state, and allow other
2374 routines to request the tag table without incurring additional parser
2378 File: semantic-appdev.info, Node: Semantic Database, Next: Idle Scheduling, Prev: Parser Features, Up: Top
2383 Semanticdb is a database mechanism for storing tags parsed by semantic.
2384 The database operates in the background, saving tags as they are parsed
2385 between sessions. When a file is read in, and there is a previously
2386 created set of tags available for it, sematnicdb will save time by not
2387 parsing the file, and using the cached copy.
2389 In applications, semanticdb can provide access to the sum of all tags in
2390 a project or in the basic system. This database can they be searched
2391 using a set of special routines.
2395 * Semanticdb in Programs:: Basic usage.
2396 * Semanticdb Tag Queries:: Searching for tokens in the databases.
2397 * System Databases:: Special kinds of databases for system tags.
2400 File: semantic-appdev.info, Node: Semanticdb in Programs, Next: Semanticdb Tag Queries, Up: Semantic Database
2402 9.1 Semanticdb in Programs::
2403 ============================
2405 If you write a program using semanticdb, you will probably want to make
2406 sure it is active in your program.
2408 -- Function: semanticdb-minor-mode-p
2409 Return non-'nil' if 'semanticdb-minor-mode' is active.
2411 Since semanticdb is optional, it is best if a program can gracefully
2412 degrade service when semanticdb is not available, or to throw an error
2413 letting the user know it is required to be active.
2415 At the simplest level, you can ask if a given file is in the database,
2416 recieving a tag table. Semanticdb will give you an accurate set of tags
2419 -- Function: semanticdb-file-stream file
2420 Return a list of tags belonging to FILE. If file has database tags
2421 available in the database, return them. If file does not have tags
2422 available, then load the file, and create them.
2424 Alternately, you can get at the table object for a file by asking for
2427 -- Function: semanticdb-file-table-object file &optional dontload
2428 Return a semanticdb table belonging to FILE. If file has database
2429 tags available in the database, return it. If file does not have
2430 tags available, and DONTLOAD is 'nil', then load the tags for FILE,
2431 and create a new table object for it. DONTLOAD does not affect the
2432 creation of new database objects.
2435 File: semantic-appdev.info, Node: Semanticdb Tag Queries, Next: System Databases, Prev: Semanticdb in Programs, Up: Semantic Database
2437 9.2 Semanticdb Tag Queries
2438 ==========================
2440 You can search for tags in the semantic database using the
2441 semanticdb-find API. It is important to note that database search
2442 functions do not return a plain list of tags. This is because some tags
2443 may not be loaded in a buffer, which means that the found tag would not
2444 have an overlay, and no way to determine where it came from.
2446 As such, all search functions return a special Database Results list.
2448 There are several types of searches, divided into groups by
2449 implementation. While it is possible to add new types of searches, or
2450 write custom searches, the built in searches are usually the only ones
2451 available in system backends *note System Databases::.
2453 When the term brute or brutish is used as a search criteria, that is
2454 distinguishing between an include-path based search, and a search that
2455 scans everything available in a project.
2457 Non-brute force searches assume that all symbols available in a given
2458 buffer are on the search path, or in some file that has been included,
2459 imported, or otherwise indicated in the source file itself. While not
2460 always true for interpreted languages (such as Emacs Lisp), it is common
2461 among declaritive languages.
2463 Sometimes a brute force approach is needed, scanning every file
2464 available to the database. You may want to do this if your application
2465 is collecting data unrelated to a file currently being worked on.
2469 * DB Results:: Accessing the results of a search.
2470 * DB Search Paths:: The list of tables to search.
2471 * DB Basic Name Search:: Searches based on name.
2472 * DB Basic Brute Search:: Searches on common tag attributes.
2473 * DB Advanced Search:: Complex searches on associations
2474 * DB Generic Brute Search:: Do It Yourself search criteria
2477 File: semantic-appdev.info, Node: DB Results, Next: DB Search Paths, Up: Semanticdb Tag Queries
2482 The successful results of a search returns a special list of the
2485 ( (DATABASE TAG1 TAG2 ...) (DATABASE2 TAG3 TAG4 ...) ...)
2487 It should not be necessary to access the results in this way, however,
2488 as there are several routines that can be used to access this list.
2490 To turn a semanticdb search result into a simple tag table, use:
2492 -- Function: semanticdb-strip-find-results results &optional
2494 Strip a semanticdb search RESULTS to exclude objects. This makes
2495 it appear more like the results of a 'semantic-find-' call.
2496 Optional FIND-FILE-MATCH loads all files associated with RESULTS
2497 into buffers. This has the side effect of enabling
2498 "semantic-tag-buffer" to return a value.
2500 To write a function that accepts a tag table, or a semanticdb search
2501 result, use this to test if it is a semanticdb search result:
2503 -- Function: semanticdb-find-results-p resultp
2504 Non-'nil' if RESULTP is in the form of a semanticdb search result.
2505 This query only really tests the first entry in the list that is
2506 RESULTP, but should be good enough for debugging assertions.
2508 -- Function: semanticdb-find-result-with-nil-p resultp
2509 Non-'nil' of RESULTP is in the form of a semanticdb search result.
2510 'nil' is a valid value where a TABLE usually is, but only if the
2511 TAG results include overlays. This query only really tests the
2512 first entry in the list that is RESULTP, but should be good enough
2513 for debugging assertions.
2515 To operate on the search results as though it were a simple tags table,
2516 or plain list, use these routines.
2518 -- Function: semanticdb-find-result-length result
2519 Number of tags found in RESULT.
2521 -- Function: semanticdb-find-result-nth result n
2522 In RESULT, return the Nth search result. This is a 0 based search
2523 result, with the first match being element 0.
2525 The returned value is a cons cell: (TAG . TABLE) where TAG is the
2526 tag at the Nth position. TABLE is the semanticdb table where the
2527 TAG was found. Sometimes TABLE can be 'nil'.
2529 -- Function: semanticdb-find-result-nth-in-buffer result n
2530 In RESULT, return the Nth search result. Like
2531 "semanticdb-find-result-nth", except that only the TAG is returned,
2532 and the buffer it is found it will be made current. If the result
2533 tag has no position information, the originating buffer is still
2537 File: semantic-appdev.info, Node: DB Search Paths, Next: DB Basic Name Search, Prev: DB Results, Up: Semanticdb Tag Queries
2539 9.2.2 DB Search Paths
2540 ---------------------
2542 For searches based on an include path (non-brutish) a path of tables
2543 needs to be generated. Searching a lot of tables is slow, which is why
2544 a brutish search is not always recommended. An include-based approach
2545 can also generate a lot of tables, so you can control how detailed a
2546 search is with a throttle variable.
2548 Ideally, each language mode will have a mode-specific value for this
2549 throttle value. A user can also specify their own values if the default
2552 -- Variable: semanticdb-find-default-throttle
2553 The default throttle for 'semanticdb-find' routines. The throttle
2554 controls how detailed the list of database tables is for a symbol
2555 lookup. The value is a list with the following keys:
2558 The file the search is being performed from. This option is
2559 here for completeness only, and is assumed to always be on.
2561 Tables from the same local directory are included. This
2562 includes files directly referenced by a file name which might
2563 be in a different directory.
2565 Tables from the same local project are included If 'project'
2566 is specified, then 'local' is assumed.
2568 If a table is not in memory, load it. If it is not cached on
2569 disk either, get the source, parse it, and create the table.
2571 Tables from system databases. These are specifically tables
2572 from system header files, or language equivalent.
2574 For include based searches, includes tables referenced by
2577 Included system databases which are omniscience, or somehow
2578 know everything. Omniscience databases are found in
2579 'semanticdb-project-system-databases'. The Emacs Lisp system
2580 DB is an omniscience database.
2582 You can use the command 'semanticdb-find-test-translate-path' to
2583 interactively test out how the path translator is working. The path
2584 translation routines are:
2586 -- Function: semanticdb-find-translate-path path brutish
2587 Translate PATH into a list of semantic tables. Path translation
2588 involves identifying the PATH input argument in one of the
2589 following ways: 'nil' - Take the current buffer, and use it's
2590 include list buffer - Use that buffer's include list. filename -
2591 Use that file's include list. If the file is not in a buffer, see
2592 of there is a semanticdb table for it. If not, read that file into
2593 a buffer. tag - Get that tag's buffer of file file. See above.
2594 table - Search that table, and it's include list. find result -
2595 Search the results of a previous find.
2597 In addition, once the base path is found, there is the possibility
2598 of each added table adding yet more tables to the path, so this
2599 routine can return a lengthy list.
2601 If argument BRUTISH is non-'nil', then instead of using the include
2602 list, use all tables found in the parent project of the table
2603 identified by translating PATH. Such searches use brute force to
2604 scan every available table.
2606 The return value is a list of objects of type "semanticdb-table" or
2607 it's children. In the case of passing in a find result, the result
2608 is returned unchanged.
2610 This routine uses "semanticdb-find-table-for-include" to translate
2611 specific include tags into a semanticdb table. This function can
2612 be overloaded (see "define-mode-local-override" for details).
2614 -- Function: semanticdb-find-table-for-include includetag &optional
2616 For a single INCLUDETAG found in TABLE, find a "semanticdb-table"
2617 object INCLUDETAG is a semantic TAG of class ''include'. TABLE as
2618 defined by "semantic-something-to-tag-table" to identify where the
2619 tag came from. TABLE is optional if INCLUDETAG has an overlay of
2620 ':filename' attribute. This function can be overloaded (see
2621 "define-mode-local-override" for details).
2624 File: semantic-appdev.info, Node: DB Basic Name Search, Next: DB Basic Brute Search, Prev: DB Search Paths, Up: Semanticdb Tag Queries
2626 9.2.3 DB Basic Name Search
2627 --------------------------
2629 These searches scan a database table collection for tags based on name.
2630 They are divided into normal and deep searches. A deep search, as with
2631 in buffer tag scanning, implies that all entries are scanned, including
2632 those in type declarations.
2636 -- Function: semanticdb-find-tags-by-name name &optional path
2638 Search for all tags matching NAME on PATH. See
2639 "semanticdb-find-translate-path" for details on PATH.
2640 FIND-FILE-MATCH indicates that any time a match is found, the file
2641 associated with that tag should be loaded into a buffer.
2643 -- Function: semanticdb-find-tags-by-name-regexp regexp &optional path
2645 Search for all tags matching REGEXP on PATH. See
2646 "semanticdb-find-translate-path" for details on PATH.
2647 FIND-FILE-MATCH indicates that any time a match is found, the file
2648 associated with that tag should be loaded into a buffer.
2650 -- Function: semanticdb-find-tags-for-completion prefix &optional path
2652 Search for all tags matching PREFIX on PATH. See
2653 "semanticdb-find-translate-path" for details on PATH.
2654 FIND-FILE-MATCH indicates that any time a match is found, the file
2655 associated with that tag should be loaded into a buffer.
2657 -- Function: semanticdb-find-tags-by-class class &optional path
2659 Search for all tags of CLASS on PATH. See
2660 "semanticdb-find-translate-path" for details on PATH.
2661 FIND-FILE-MATCH indicates that any time a match is found, the file
2662 associated with that tag should be loaded into a buffer.
2666 -- Function: semanticdb-deep-find-tags-by-name name &optional path
2668 Search for all tags matching NAME on PATH. Search also in all
2669 components of top level tags founds. See
2670 "semanticdb-find-translate-path" for details on PATH.
2671 FIND-FILE-MATCH indicates that any time a match is found, the file
2672 associated with that tag should be loaded into a buffer.
2674 -- Function: semanticdb-deep-find-tags-by-name-regexp regexp &optional
2675 path find-file-match
2676 Search for all tags matching REGEXP on PATH. Search also in all
2677 components of top level tags founds. See
2678 "semanticdb-find-translate-path" for details on PATH.
2679 FIND-FILE-MATCH indicates that any time a match is found, the file
2680 associated with that tag should be loaded into a buffer.
2682 -- Function: semanticdb-deep-find-tags-for-completion prefix &optional
2683 path find-file-match
2684 Search for all tags matching PREFIX on PATH. Search also in all
2685 components of top level tags founds. See
2686 "semanticdb-find-translate-path" for details on PATH.
2687 FIND-FILE-MATCH indicates that any time a match is found, the file
2688 associated with that tag should be loaded into a buffer.
2691 File: semantic-appdev.info, Node: DB Basic Brute Search, Next: DB Advanced Search, Prev: DB Basic Name Search, Up: Semanticdb Tag Queries
2693 9.2.4 DB Basic Brute Search
2694 ---------------------------
2696 These searches allow searching on specific attributes of tags, such as
2697 name, type, or other attribute.
2699 -- Function: semanticdb-brute-deep-find-tags-by-name name &optional
2700 path find-file-match
2701 Search for all tags matching NAME on PATH. See
2702 "semanticdb-find-translate-path" for details on PATH. The argument
2703 BRUTISH will be set so that searching includes all tables in the
2704 current project. FIND-FILE-MATCH indicates that any time a matchi
2705 is found, the file associated wit that tag should be loaded into a
2709 File: semantic-appdev.info, Node: DB Advanced Search, Next: DB Generic Brute Search, Prev: DB Basic Brute Search, Up: Semanticdb Tag Queries
2711 9.2.5 DB Advanced Search
2712 ------------------------
2714 These are searches that were needed to accomplish some specialized tasks
2715 as discovered in utilities. Advanced searches include matching methods
2716 defined outside some parent class.
2718 The reason for advanced searches are so that external repositories such
2719 as the Emacs obarray, or java '.class' files can quickly answer these
2720 needed questions without dumping the entire symbol list into Emacs for a
2721 regular semanticdb search.
2723 -- Function: semanticdb-find-tags-external-children-of-type type
2724 &optional path find-file-match
2725 Search for all tags defined outside of TYPE w/ TYPE as a parent.
2726 See "semanticdb-find-translate-path" for details on PATH.
2727 FIND-FILE-MATCH indicates that any time a match is found, the file
2728 associated with that tag should be loaded into a buffer.
2731 File: semantic-appdev.info, Node: DB Generic Brute Search, Prev: DB Advanced Search, Up: Semanticdb Tag Queries
2733 9.2.6 DB Generic Brute Search
2734 -----------------------------
2736 The generic search, "semanticdb-find-nonterminal-by-function" will call
2737 your function with every tag available. (Very slow for system
2740 NOTE: There is no such function. Hopefully we can get away without
2741 implementing one, which will make system databases more useful. If you
2742 are really stuck, you can use the following, though I don't recommend
2745 -- Function: semanticdb-find-tags-collector function &optional path
2746 find-file-match brutish
2747 Search for all tags returned by FUNCTION over PATH. See
2748 "semanticdb-find-translate-path" for details on PATH.
2749 FIND-FILE-MATCH indicates that any time a match is found, the file
2750 associated with that tag should be loaded into a buffer. If
2751 optional argument BRUTISH is non-'nil', then ignore include
2752 statements, and search all tables in this project tree.
2755 File: semantic-appdev.info, Node: System Databases, Prev: Semanticdb Tag Queries, Up: Semantic Database
2757 9.3 System Databases
2758 ====================
2760 System Databases are special implementations of the database and table
2761 API which make some external tag source appear as though it were a
2762 normal buffer with semantic parsed tags available.
2764 Search routines for these databases return a special type of table not
2765 associated with a file. It is important to be aware of this possible
2768 -- Type: semanticdb-project-database-emacs-lisp
2769 Database representing Emacs core.
2771 This Emacs database is loaded automatically.
2773 -- Type: semanticdb-project-database-ebrowse
2774 Semantic Database deriving tags using the EBROWSE tool. EBROWSE is
2775 a C/C++ parser for use with 'ebrowse' Emacs program.
2777 To create new EBROWSE project databases, use:
2779 -- Command: semanticdb-create-ebrowse-database dir
2780 Create an EBROSE database for directory DIR. The database file is
2781 stored in ~/.semanticdb, or whichever directory is specified by
2782 'semanticdb-default-system-save-directory'.
2784 9.3.1 Semantic Parsed System Databases
2785 --------------------------------------
2787 Another kind of system database is one created by the semantic tools,
2788 but saved in a special way. These databases are created with a script,
2789 or at some other convenient time. They can then be searched normally.
2790 They will appear on the same list of system databases as back ends that
2791 refer to object files indirectly.
2793 A simple way to create one from Emacs is with this function:
2795 -- Command: semanticdb-create-system-database path &optional class
2796 Create a system database starting at PATH. PATH should be a top
2797 level directory for a series of files containing declarations for
2798 SYSTEM files. In C, this would be header filaes. CLASS is the
2799 class for the database to create. Only child classes of symbol
2800 "semanticdb-project-database-system" are accepted.
2803 File: semantic-appdev.info, Node: Idle Scheduling, Next: Example Programs, Prev: Semantic Database, Up: Top
2808 The Semantic Idle Scheduler is a minor mode which performs semantic
2809 specific tasks in idle time. See *note (semantic-user.info)Idle
2812 It performs the following tasks in order:
2814 1. Reprarse the current buffer if needed
2815 2. Reparse other buffers that need it
2816 3. Execute other scheduled semantic related operations.
2818 Care is take in the idle scheduler to exit immediatly if user input is
2819 detected, improving editing performance.
2821 The reason for grouping these tasks together is so that the automatic
2822 reparsing code executes before other idle services. This allows
2823 lexically broken buffers to be detected so that the other applications
2824 that follow do not accidentally reparse the buffer leaving unmatched
2827 You can create new minor modes that are automatically scheduled by the
2828 semantic idle scheduler. Create the new minor mode with:
2830 -- Function: define-semantic-idle-service name doc &rest forms
2831 Create a new idle services with NAME. DOC will be a documentation
2832 string describing FORMS. FORMS will be called during idle time
2833 after the current buffer's semantic tag information has been
2834 updated. This routines creates the following functions and
2837 10.1 User Input Handling
2838 ========================
2840 When writing an idle service, it is important for tasks that can take a
2841 long time to correctly exit upon user input.
2843 You can test for user input in your idle handler with the following
2846 -- Function: semantic-throw-on-input from
2847 Exit with "throw" when in "semantic-exit-on-input" on user input.
2848 FROM is an indication of where this function is called from as a
2849 value to pass to "throw". It is recommended to use the name of the
2850 function calling this one.
2852 If you need to carefully extract from your function, you can wrap just a
2853 section of your function to exit on user input by wrapping it with this
2856 -- Function: semantic-exit-on-input symbol &rest forms
2857 Using SYMBOL as an argument to "throw", execute FORMS. If FORMS
2858 includes a call to 'semantic-thow-on-input', then if a user presses
2859 any key during execution, this form macro will exit with the value
2860 passed to "semantic-throw-on-input". If FORMS completes, then the
2861 return value is the same as "progn".
2863 Upon catching user input, you can try to detect if there was an exit
2864 from the return argument, and continue throwing with an additional call
2865 to 'semantic-throw-on-input'.
2868 File: semantic-appdev.info, Node: Example Programs, Next: Current Context, Prev: Idle Scheduling, Up: Top
2870 11 Programming Examples
2871 ***********************
2873 *** NOTE *** These examples are for semantic 1.4. Using the below
2874 functions will generate compile time warnings with advice on what
2875 functions to use in semantic 2.0.
2877 Here are some simple examples that use different aspects of the semantic
2878 library APIs. For fully functional example programs with lots of
2879 comments, see the file 'semantic-examples.el'.
2881 Interactively querying for a token name
2882 =======================================
2884 If you need a command that asks the user for a token name, you can get
2885 full range completion using the query functions *note Tag Completion::.
2887 (interactive (list (semantic-read-symbol "Symbol: ")))
2889 Finding a symbol in a buffer
2890 ============================
2892 If you have the name of a function or variable, and need to find its
2893 location in a buffer, you need a search function. There is a wide range
2894 of searches you can perform *note Searching Tag Tables::.
2896 (semantic-find-nonterminal-by-name
2899 t ;; look inside structures and classes for these symbols
2900 nil) ;; do not look inside header files.
2902 Finding a symbol in a project
2903 =============================
2905 If you have the name of a function or variable, and need to find its
2906 location somewhere in a project, you need to use the Semantic Database
2907 *note (semanticdb)semanticdb::. There are many search functions similar
2908 to the ones found in *note Searching Tag Tables::.
2910 The Semantic Database is interesting in that the return structure is not
2912 Locating a token in a buffer
2913 ============================
2915 If you have a nonterminal token, or a list of them, you may want to find
2916 their position in a buffer.
2918 (semanticdb-find-nonterminal-by-name
2920 nil ;; Defaults to the current project's database list.
2921 t ;; Search inside types
2922 nil ;; Do not search include files
2923 nil ;; Only search files in the same mode (all C files)
2924 t ;; When a token is found, make sure it is loaded in a buffer.
2927 Of interesting note above, semanticdb can find symbols in files that are
2928 not loaded into an Emacs buffer. These tokens do not have an associated
2929 overlay, and the function "semantic-token-buffer" will fail.
2931 The last parameter's tells the search function to "find-file-noselect"
2932 any file in which a matching token was found. This will allow you to
2933 merge all the tokens into a completion list, or other flat list needed
2934 by most functions that use association lists.
2936 If you do not ask semanticdb to load those files, you will need to
2937 explicitly request the database object (found in the 'car' of each
2938 sublist) get the file loaded. It is useful to not auto find all files
2939 if you don't need to jump to that token.
2941 Converting a token into a human readable string.
2942 ================================================
2944 A tag is a rather unpleasant Lisp structure when trying to decipher what
2945 is going on. As such, there is a wide range of functions available that
2946 can convert a token into a human readable, and colorful string *note
2949 If you program interfaces with lots of users, you will probably want to
2950 have your program define a configurable variable that will let users
2951 change the visible portion of your program.
2953 (defcustom my-summary-function 'semantic-uml-prototype-nonterminal
2954 "*Function to use when showing info about my tag."
2956 :type semantic-format-tag-custom-list)
2958 Note the special type provided by Semantic.
2960 Next, you can call this function to create a string.
2962 (funcall my-summary-function tag
2967 In this case, TAG-PARENT is an optional argument. In many cases, parent
2968 is not used by the outputting function. The parent must be a tag whose
2969 'semantic-tag-componenets' contains TAG, or nil for top-level
2970 definitions. In particular, C++ needs the parent to correctly calculate
2971 the protection of each method.
2974 File: semantic-appdev.info, Node: Current Context, Next: App Debugger, Prev: Example Programs, Up: Top
2976 12 Deriving the Current Context
2977 *******************************
2979 This chapter deals with how to derive the current context, and also how
2980 a language maintainer can get the current context API to work with their
2983 By default, the behavior will function in C like languages. This means
2984 languages with parenthetical blocks, and type dereferencing which uses a
2990 * Local Variables:: Getting lists of local variables.
2991 * Derived Context:: What goes at a given location?
2992 * Context Analysis:: Analysis information about the local context.
2995 File: semantic-appdev.info, Node: Blocks, Next: Local Variables, Up: Current Context
2997 12.1 Blocks and Navigation
2998 ==========================
3000 Source code is typically built up of control structures, and blocks of
3001 context, or lexical scope. Semantic terms these lexical scopes as a
3002 "context". The following functions can be used to navigate contexts.
3003 Some of them are override functions. Language authors can override a
3004 subset of them to make them work for their language.
3006 -- Function: semantic-up-context &optional point bounds-type
3007 Move point up one context from POINT. Return non-'nil' if there
3008 are no more context levels. Overloaded functions using
3009 'up-context' take no parameters. BOUNDS-TYPE is a symbol
3010 representing a tag class to restrict movement to. If this is
3011 'nil', ''function' is used. This will find the smallest tag of
3012 that class (function, variable, type, etc) and make sure non-'nil'
3013 is returned if you cannot go up past the bounds of that tag. This
3014 function can be overloaded (see "define-mode-local-override" for
3017 -- Function: semantic-beginning-of-context &optional point
3018 Move POINT to the beginning of the current context. Return
3019 non-'nil' if there is no upper context. The default behavior uses
3020 "semantic-up-context". This function can be overloaded (see
3021 "define-mode-local-override" for details).
3023 -- Function: semantic-end-of-context &optional point
3024 Move POINT to the end of the current context. Return non-'nil' if
3025 there is no upper context. Be default, this uses
3026 "semantic-up-context", and assumes parenthetical block delimiters.
3027 This function can be overloaded (see "define-mode-local-override"
3030 These next set of functions can be used to navigate across commands.
3032 -- Function: semantic-end-of-command
3033 Move to the end of the current command. Be default, uses
3034 'semantic-command-separation-character'. This function can be
3035 overloaded (see "define-mode-local-override" for details).
3037 -- Function: semantic-beginning-of-command
3038 Move to the beginning of the current command. Be default, uses
3039 'semantic-command-separation-character'. This function can be
3040 overloaded (see "define-mode-local-override" for details).
3043 File: semantic-appdev.info, Node: Local Variables, Next: Derived Context, Prev: Blocks, Up: Current Context
3045 12.2 Deriving local variables
3046 =============================
3048 Within a given context, or block of code, local variables are often
3049 defined. These functions can be used to retrieve lists of locally
3052 -- Function: semantic-get-local-variables &optional point
3053 Get the local variables based on POINT's context. Local variables
3054 are returned in Semantic tag format. This can be overriden with
3055 'get-local-variables'. This function can be overloaded (see
3056 "define-mode-local-override" for details).
3058 -- Function: semantic-get-local-arguments &optional point
3059 Get arguments (variables) from the current context at POINT.
3060 Parameters are available if the point is in a function or method.
3061 Return a list of tags unlinked from the originating buffer.
3062 Arguments are obtained by overriding 'get-local-arguments', or by
3063 the default function "semantic-get-local-arguments-default". This,
3064 must return a list of tags, or a list of strings that will be
3065 converted to tags. This function can be overloaded (see
3066 "define-mode-local-override" for details).
3068 -- Function: semantic-get-all-local-variables &optional point
3069 Get all local variables for this context, and parent contexts.
3070 Local variables are returned in Semantic tag format. Be default,
3071 this gets local variables, and local arguments. Optional argument
3072 POINT is the location to start getting the variables from. This
3073 function can be overloaded (see "define-mode-local-override" for
3077 File: semantic-appdev.info, Node: Derived Context, Next: Context Analysis, Prev: Local Variables, Up: Current Context
3079 12.3 Deriving the Current Context
3080 =================================
3082 While a context has already been used to describe blocks of code, other
3083 context include more local details, such as the symbol the cursor is on,
3084 or the fact we are assigning into some other variable.
3086 These context deriving functions can be overridden to provide language
3087 specific behavior. By default, it assumes a C like language.
3089 -- Function: semantic-ctxt-current-symbol &optional point
3090 Return the current symbol the cursor is on at POINT in a list.
3091 This will include a list of type/field names when applicable. This
3092 function can be overloaded (see "define-mode-local-override" for
3095 -- Function: semantic-ctxt-current-assignment &optional point
3096 Return the current assignment near the cursor at POINT. Return a
3097 list as per "semantic-ctxt-current-symbol". Return 'nil' if there
3098 is nothing relevant. This function can be overloaded (see
3099 "define-mode-local-override" for details).
3101 -- Function: semantic-ctxt-current-function &optional point
3102 Return the current function call the cursor is in at POINT. The
3103 function returned is the one accepting the arguments that the
3104 cursor is currently in. It will not return function symbol if the
3105 cursor is on the text representing that function. This function
3106 can be overloaded (see "define-mode-local-override" for details).
3108 -- Function: semantic-ctxt-current-argument &optional point
3109 Return the index of the argument position the cursor is on at
3110 POINT. This function can be overloaded (see
3111 "define-mode-local-override" for details).
3113 -- Function: semantic-ctxt-current-thing
3114 Calculate a thing identified by the current cursor position. Calls
3115 previously defined 'semantic-ctxt-current-...' calls until
3116 something gets a match. See "semantic-ctxt-current-symbol",
3117 "semantic-ctxt-current-function", and
3118 "semantic-ctxt-current-assignment" for details on the return value.
3120 -- Function: semantic-ctxt-current-class-list &optional point
3121 Return a list of tag classes that are allowed at POINT. If POINT
3122 is 'nil', the current buffer location is used. For example, in
3123 Emacs Lisp, the symbol after a ( is most likely a function. In a
3124 makefile, symbols after a : are rules, and symbols after a $( are
3125 variables. This function can be overloaded (see
3126 "define-mode-local-override" for details).
3128 -- Function: semantic-ctxt-scoped-types &optional point
3129 Return a list of type names currently in scope at POINT. The
3130 return value can be a mixed list of either strings (names of types
3131 that are in scope) or actual tags (type declared locally that may
3132 or may not have a name.) This function can be overloaded (see
3133 "define-mode-local-override" for details).
3136 File: semantic-appdev.info, Node: Context Analysis, Prev: Derived Context, Up: Current Context
3138 12.4 Analysis of the current context
3139 ====================================
3141 The context parsing API is used in a context analysis library. This
3142 library provides high level routines for scanning through token
3143 databases to create lists of token associates. At it's core is a set of
3144 EIEIO classes defining a context. The context contains information
3145 about what was parsed at a given position, such as the strings there,
3146 and they type of assignment. The analysis library then searches the
3147 databases to determine the types and names available.
3149 Two high level functions which can be run interactively are:
3151 -- Command: semantic-analyze-current-context &optional position
3152 Analyze the current context at optional POSITION. If called
3153 interactively, display interesting information about POSITION in a
3154 separate buffer. Returns an object based on symbol
3155 "semantic-analyze-context".
3157 This function can be overriden with the symbol 'analyze-context'.
3158 When overriding this function, your override will be called while
3159 cursor is at POSITION. In addition, your function will not be
3160 called if a cached copy of the return object is found. This
3161 function can be overloaded (see "define-mode-local-override" for
3164 -- Command: semantic-analyze-possible-completions context
3165 Return a list of semantic tags which are possible completions.
3166 CONTEXT is either a position (such as point), or a precalculated
3167 context. Passing in a context is useful if the caller also needs
3168 to access parts of the analysis. Completions run through the
3171 * Elements currently in scope
3172 * Constants currently in scope
3173 * Elements match the ':prefix' in the CONTEXT.
3174 * Type of the completion matches the type of the context.
3176 Context type matching can identify the following:
3179 * Assignment into a variable of some type.
3180 * Argument to a function with type constraints.
3182 When called interactively, displays the list of possible
3183 completions in a buffer. This function can be overloaded (see
3184 "define-mode-local-override" for details).
3188 * Analysis Overview:: A description of how the analyzer works.
3189 * Analysis Objects:: What is in the analysis object.
3190 * Completion Overview:: How completions are calculated.
3193 File: semantic-appdev.info, Node: Analysis Overview, Next: Analysis Objects, Up: Context Analysis
3195 12.4.1 Analysis Overview
3196 ------------------------
3198 The semantic analysis function "semantic-analye-current-context" creates
3199 an Analysis Object. See *note Analysis Objects::. This object contains
3200 many useful pieces of information needed to do any other kind of
3201 intelligent action on the local context.
3203 If you call this function interactively, it will popup a buffer with a
3204 summary of the return value. This is useful when debugging.
3206 +--------+ +----------------+ +----------------------------+
3207 | Buffer |---| Context Parser |---| Local Context Synax Result |
3208 +--------+ +----------------+ +----------------------------+
3210 +--------+ +-----------+ |
3211 | Parser |---| Tag Table |------------+ |
3212 +--------+ +-----------+ | |
3214 +-------------+ +-------------------+
3215 | Semantic DB |-------------------->| Semantic Analyzer |
3216 +-------------+ +-------------------+
3224 File: semantic-appdev.info, Node: Analysis Objects, Next: Completion Overview, Prev: Analysis Overview, Up: Context Analysis
3226 12.4.2 Analysis Objects
3227 -----------------------
3230 File: semantic-appdev.info, Node: Completion Overview, Prev: Analysis Objects, Up: Context Analysis
3232 12.4.3 Completion Overview
3233 --------------------------
3236 File: semantic-appdev.info, Node: App Debugger, Next: GNU Free Documentation License, Prev: Current Context, Up: Top
3238 13 Application level Data structure debugger
3239 ********************************************
3241 The data structures that Semantic provides can be complex, and figuring
3242 out why some level of application API performs incorrectly can be
3245 The semantic Application debugger provides a way to look inside the
3246 various data structures of Semantic in a structures and complete way to
3247 help identify what a problem may be.
3249 13.1 App Debugger Entry Points
3250 ==============================
3252 There are a few basic functions that enter into the debugger:
3254 -- Command: semantic-adebug-bovinate
3255 The same as "bovinate". Display the results in a debug buffer.
3257 -- Command: semantic-adebug-searchdb regex
3258 Search the semanticdb for REGEX for the current buffer. Display
3259 the results as a debug list.
3261 -- Command: semantic-adebug-analyze
3262 Perform "semantic-analyze-current-context". Display the results as
3268 The semantic debugger mode provides a simple user facing UI for looking
3269 into the data structures.
3271 -- Command: semantic-adebug-mode
3272 Major-mode for the Analyzer debugger.
3276 semantic-adebug-expand-or-contract
3278 semantic-adebug-next-expando
3280 semantic-adebug-prev-expando
3282 semantic-adebug-next
3284 semantic-adebug-prev
3286 semantic-adebug-expand-or-contract-mouse
3288 13.3 Create new debugger entry commands
3289 =======================================
3291 Creating a new Application debugger entry point is easy. First, get a
3292 datastructure you need to analyze.
3294 The first function to call is:
3296 -- Function: semantic-adebug-new-buffer name
3297 Create a new adebug buffer with NAME.
3299 Next, you need to find the correct function for inserting your
3300 datastructure. All adebug insertion functions are of the form
3301 'semantic-adebug-insert-THING', where THING is whatever you object is.
3302 Use Emacs help to pick something out.
3305 File: semantic-appdev.info, Node: GNU Free Documentation License, Next: Index, Prev: App Debugger, Up: Top
3307 Appendix A GNU Free Documentation License
3308 *****************************************
3310 Version 1.1, March 2000
3312 Copyright (C) 2000 Free Software Foundation, Inc.
3313 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
3315 Everyone is permitted to copy and distribute verbatim copies
3316 of this license document, but changing it is not allowed.
3320 The purpose of this License is to make a manual, textbook, or other
3321 written document "free" in the sense of freedom: to assure everyone
3322 the effective freedom to copy and redistribute it, with or without
3323 modifying it, either commercially or noncommercially. Secondarily,
3324 this License preserves for the author and publisher a way to get
3325 credit for their work, while not being considered responsible for
3326 modifications made by others.
3328 This License is a kind of "copyleft", which means that derivative
3329 works of the document must themselves be free in the same sense.
3330 It complements the GNU General Public License, which is a copyleft
3331 license designed for free software.
3333 We have designed this License in order to use it for manuals for
3334 free software, because free software needs free documentation: a
3335 free program should come with manuals providing the same freedoms
3336 that the software does. But this License is not limited to
3337 software manuals; it can be used for any textual work, regardless
3338 of subject matter or whether it is published as a printed book. We
3339 recommend this License principally for works whose purpose is
3340 instruction or reference.
3343 1. APPLICABILITY AND DEFINITIONS
3345 This License applies to any manual or other work that contains a
3346 notice placed by the copyright holder saying it can be distributed
3347 under the terms of this License. The "Document", below, refers to
3348 any such manual or work. Any member of the public is a licensee,
3349 and is addressed as "you".
3351 A "Modified Version" of the Document means any work containing the
3352 Document or a portion of it, either copied verbatim, or with
3353 modifications and/or translated into another language.
3355 A "Secondary Section" is a named appendix or a front-matter section
3356 of the Document that deals exclusively with the relationship of the
3357 publishers or authors of the Document to the Document's overall
3358 subject (or to related matters) and contains nothing that could
3359 fall directly within that overall subject. (For example, if the
3360 Document is in part a textbook of mathematics, a Secondary Section
3361 may not explain any mathematics.) The relationship could be a
3362 matter of historical connection with the subject or with related
3363 matters, or of legal, commercial, philosophical, ethical or
3364 political position regarding them.
3366 The "Invariant Sections" are certain Secondary Sections whose
3367 titles are designated, as being those of Invariant Sections, in the
3368 notice that says that the Document is released under this License.
3370 The "Cover Texts" are certain short passages of text that are
3371 listed, as Front-Cover Texts or Back-Cover Texts, in the notice
3372 that says that the Document is released under this License.
3374 A "Transparent" copy of the Document means a machine-readable copy,
3375 represented in a format whose specification is available to the
3376 general public, whose contents can be viewed and edited directly
3377 and straightforwardly with generic text editors or (for images
3378 composed of pixels) generic paint programs or (for drawings) some
3379 widely available drawing editor, and that is suitable for input to
3380 text formatters or for automatic translation to a variety of
3381 formats suitable for input to text formatters. A copy made in an
3382 otherwise Transparent file format whose markup has been designed to
3383 thwart or discourage subsequent modification by readers is not
3384 Transparent. A copy that is not "Transparent" is called "Opaque".
3386 Examples of suitable formats for Transparent copies include plain
3387 ASCII without markup, Texinfo input format, LaTeX input format,
3388 SGML or XML using a publicly available DTD, and standard-conforming
3389 simple HTML designed for human modification. Opaque formats
3390 include PostScript, PDF, proprietary formats that can be read and
3391 edited only by proprietary word processors, SGML or XML for which
3392 the DTD and/or processing tools are not generally available, and
3393 the machine-generated HTML produced by some word processors for
3394 output purposes only.
3396 The "Title Page" means, for a printed book, the title page itself,
3397 plus such following pages as are needed to hold, legibly, the
3398 material this License requires to appear in the title page. For
3399 works in formats which do not have any title page as such, "Title
3400 Page" means the text near the most prominent appearance of the
3401 work's title, preceding the beginning of the body of the text.
3405 You may copy and distribute the Document in any medium, either
3406 commercially or noncommercially, provided that this License, the
3407 copyright notices, and the license notice saying this License
3408 applies to the Document are reproduced in all copies, and that you
3409 add no other conditions whatsoever to those of this License. You
3410 may not use technical measures to obstruct or control the reading
3411 or further copying of the copies you make or distribute. However,
3412 you may accept compensation in exchange for copies. If you
3413 distribute a large enough number of copies you must also follow the
3414 conditions in section 3.
3416 You may also lend copies, under the same conditions stated above,
3417 and you may publicly display copies.
3419 3. COPYING IN QUANTITY
3421 If you publish printed copies of the Document numbering more than
3422 100, and the Document's license notice requires Cover Texts, you
3423 must enclose the copies in covers that carry, clearly and legibly,
3424 all these Cover Texts: Front-Cover Texts on the front cover, and
3425 Back-Cover Texts on the back cover. Both covers must also clearly
3426 and legibly identify you as the publisher of these copies. The
3427 front cover must present the full title with all words of the title
3428 equally prominent and visible. You may add other material on the
3429 covers in addition. Copying with changes limited to the covers, as
3430 long as they preserve the title of the Document and satisfy these
3431 conditions, can be treated as verbatim copying in other respects.
3433 If the required texts for either cover are too voluminous to fit
3434 legibly, you should put the first ones listed (as many as fit
3435 reasonably) on the actual cover, and continue the rest onto
3438 If you publish or distribute Opaque copies of the Document
3439 numbering more than 100, you must either include a machine-readable
3440 Transparent copy along with each Opaque copy, or state in or with
3441 each Opaque copy a publicly-accessible computer-network location
3442 containing a complete Transparent copy of the Document, free of
3443 added material, which the general network-using public has access
3444 to download anonymously at no charge using public-standard network
3445 protocols. If you use the latter option, you must take reasonably
3446 prudent steps, when you begin distribution of Opaque copies in
3447 quantity, to ensure that this Transparent copy will remain thus
3448 accessible at the stated location until at least one year after the
3449 last time you distribute an Opaque copy (directly or through your
3450 agents or retailers) of that edition to the public.
3452 It is requested, but not required, that you contact the authors of
3453 the Document well before redistributing any large number of copies,
3454 to give them a chance to provide you with an updated version of the
3459 You may copy and distribute a Modified Version of the Document
3460 under the conditions of sections 2 and 3 above, provided that you
3461 release the Modified Version under precisely this License, with the
3462 Modified Version filling the role of the Document, thus licensing
3463 distribution and modification of the Modified Version to whoever
3464 possesses a copy of it. In addition, you must do these things in
3465 the Modified Version:
3467 A. Use in the Title Page (and on the covers, if any) a title
3468 distinct from that of the Document, and from those of previous
3469 versions (which should, if there were any, be listed in the History
3470 section of the Document). You may use the same title as a previous
3471 version if the original publisher of that version gives permission.
3472 B. List on the Title Page, as authors, one or more persons or
3473 entities responsible for authorship of the modifications in the
3474 Modified Version, together with at least five of the principal
3475 authors of the Document (all of its principal authors, if it has
3477 C. State on the Title page the name of the publisher of the
3478 Modified Version, as the publisher.
3479 D. Preserve all the copyright notices of the Document.
3480 E. Add an appropriate copyright notice for your modifications
3481 adjacent to the other copyright notices.
3482 F. Include, immediately after the copyright notices, a license
3483 notice giving the public permission to use the Modified Version
3484 under the terms of this License, in the form shown in the Addendum
3486 G. Preserve in that license notice the full lists of Invariant
3487 Sections and required Cover Texts given in the Document's license
3489 H. Include an unaltered copy of this License.
3490 I. Preserve the section entitled "History", and its title, and add
3491 to it an item stating at least the title, year, new authors, and
3492 publisher of the Modified Version as given on the Title Page. If
3493 there is no section entitled "History" in the Document, create one
3494 stating the title, year, authors, and publisher of the Document as
3495 given on its Title Page, then add an item describing the Modified
3496 Version as stated in the previous sentence.
3497 J. Preserve the network location, if any, given in the Document for
3498 public access to a Transparent copy of the Document, and likewise
3499 the network locations given in the Document for previous versions
3500 it was based on. These may be placed in the "History" section.
3501 You may omit a network location for a work that was published at
3502 least four years before the Document itself, or if the original
3503 publisher of the version it refers to gives permission.
3504 K. In any section entitled "Acknowledgements" or "Dedications",
3505 preserve the section's title, and preserve in the section all the
3506 substance and tone of each of the contributor acknowledgements
3507 and/or dedications given therein.
3508 L. Preserve all the Invariant Sections of the Document, unaltered
3509 in their text and in their titles. Section numbers or the
3510 equivalent are not considered part of the section titles.
3511 M. Delete any section entitled "Endorsements". Such a section may
3512 not be included in the Modified Version.
3513 N. Do not retitle any existing section as "Endorsements" or to
3514 conflict in title with any Invariant Section.
3516 If the Modified Version includes new front-matter sections or
3517 appendices that qualify as Secondary Sections and contain no
3518 material copied from the Document, you may at your option designate
3519 some or all of these sections as invariant. To do this, add their
3520 titles to the list of Invariant Sections in the Modified Version's
3521 license notice. These titles must be distinct from any other
3524 You may add a section entitled "Endorsements", provided it contains
3525 nothing but endorsements of your Modified Version by various
3526 parties-for example, statements of peer review or that the text has
3527 been approved by an organization as the authoritative definition of
3530 You may add a passage of up to five words as a Front-Cover Text,
3531 and a passage of up to 25 words as a Back-Cover Text, to the end of
3532 the list of Cover Texts in the Modified Version. Only one passage
3533 of Front-Cover Text and one of Back-Cover Text may be added by (or
3534 through arrangements made by) any one entity. If the Document
3535 already includes a cover text for the same cover, previously added
3536 by you or by arrangement made by the same entity you are acting on
3537 behalf of, you may not add another; but you may replace the old
3538 one, on explicit permission from the previous publisher that added
3541 The author(s) and publisher(s) of the Document do not by this
3542 License give permission to use their names for publicity for or to
3543 assert or imply endorsement of any Modified Version.
3545 5. COMBINING DOCUMENTS
3547 You may combine the Document with other documents released under
3548 this License, under the terms defined in section 4 above for
3549 modified versions, provided that you include in the combination all
3550 of the Invariant Sections of all of the original documents,
3551 unmodified, and list them all as Invariant Sections of your
3552 combined work in its license notice.
3554 The combined work need only contain one copy of this License, and
3555 multiple identical Invariant Sections may be replaced with a single
3556 copy. If there are multiple Invariant Sections with the same name
3557 but different contents, make the title of each such section unique
3558 by adding at the end of it, in parentheses, the name of the
3559 original author or publisher of that section if known, or else a
3560 unique number. Make the same adjustment to the section titles in
3561 the list of Invariant Sections in the license notice of the
3564 In the combination, you must combine any sections entitled
3565 "History" in the various original documents, forming one section
3566 entitled "History"; likewise combine any sections entitled
3567 "Acknowledgements", and any sections entitled "Dedications". You
3568 must delete all sections entitled "Endorsements."
3570 6. COLLECTIONS OF DOCUMENTS
3572 You may make a collection consisting of the Document and other
3573 documents released under this License, and replace the individual
3574 copies of this License in the various documents with a single copy
3575 that is included in the collection, provided that you follow the
3576 rules of this License for verbatim copying of each of the documents
3577 in all other respects.
3579 You may extract a single document from such a collection, and
3580 distribute it individually under this License, provided you insert
3581 a copy of this License into the extracted document, and follow this
3582 License in all other respects regarding verbatim copying of that
3585 7. AGGREGATION WITH INDEPENDENT WORKS
3587 A compilation of the Document or its derivatives with other
3588 separate and independent documents or works, in or on a volume of a
3589 storage or distribution medium, does not as a whole count as a
3590 Modified Version of the Document, provided no compilation copyright
3591 is claimed for the compilation. Such a compilation is called an
3592 "aggregate", and this License does not apply to the other
3593 self-contained works thus compiled with the Document, on account of
3594 their being thus compiled, if they are not themselves derivative
3595 works of the Document.
3597 If the Cover Text requirement of section 3 is applicable to these
3598 copies of the Document, then if the Document is less than one
3599 quarter of the entire aggregate, the Document's Cover Texts may be
3600 placed on covers that surround only the Document within the
3601 aggregate. Otherwise they must appear on covers around the whole
3606 Translation is considered a kind of modification, so you may
3607 distribute translations of the Document under the terms of section
3608 4. Replacing Invariant Sections with translations requires special
3609 permission from their copyright holders, but you may include
3610 translations of some or all Invariant Sections in addition to the
3611 original versions of these Invariant Sections. You may include a
3612 translation of this License provided that you also include the
3613 original English version of this License. In case of a
3614 disagreement between the translation and the original English
3615 version of this License, the original English version will prevail.
3619 You may not copy, modify, sublicense, or distribute the Document
3620 except as expressly provided for under this License. Any other
3621 attempt to copy, modify, sublicense or distribute the Document is
3622 void, and will automatically terminate your rights under this
3623 License. However, parties who have received copies, or rights,
3624 from you under this License will not have their licenses terminated
3625 so long as such parties remain in full compliance.
3627 10. FUTURE REVISIONS OF THIS LICENSE
3629 The Free Software Foundation may publish new, revised versions of
3630 the GNU Free Documentation License from time to time. Such new
3631 versions will be similar in spirit to the present version, but may
3632 differ in detail to address new problems or concerns. See
3633 http://www.gnu.org/copyleft/.
3635 Each version of the License is given a distinguishing version
3636 number. If the Document specifies that a particular numbered
3637 version of this License "or any later version" applies to it, you
3638 have the option of following the terms and conditions either of
3639 that specified version or of any later version that has been
3640 published (not as a draft) by the Free Software Foundation. If the
3641 Document does not specify a version number of this License, you may
3642 choose any version ever published (not as a draft) by the Free
3643 Software Foundation.
3645 ADDENDUM: How to use this License for your documents
3646 ====================================================
3648 To use this License in a document you have written, include a copy of
3649 the License in the document and put the following copyright and license
3650 notices just after the title page:
3653 Copyright (C) YEAR YOUR NAME.
3654 Permission is granted to copy, distribute and/or modify this document
3655 under the terms of the GNU Free Documentation License, Version 1.1
3656 or any later version published by the Free Software Foundation;
3657 with the Invariant Sections being LIST THEIR TITLES, with the
3658 Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
3659 A copy of the license is included in the section entitled ``GNU
3660 Free Documentation License''.
3661 If you have no Invariant Sections, write "with no Invariant Sections"
3662 instead of saying which ones are invariant. If you have no Front-Cover
3663 Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
3664 LIST"; likewise for Back-Cover Texts.
3666 If your document contains nontrivial examples of program code, we
3667 recommend releasing these examples in parallel under your choice of free
3668 software license, such as the GNU General Public License, to permit
3669 their use in free software.
3672 File: semantic-appdev.info, Node: Index, Prev: GNU Free Documentation License, Up: Top
3680 * define-mode-local-override: Making New Methods. (line 36)
3681 * define-overload: Making New Methods. (line 13)
3682 * define-semantic-idle-service: Idle Scheduling. (line 28)
3683 * Misc Tag Functions: Misc Tag Functions. (line 6)
3684 * semantic--find-tags-by-function: Custom Search. (line 12)
3685 * semantic--find-tags-by-macro: Custom Search. (line 17)
3686 * semantic--tag-expand: Misc Tag Internals. (line 41)
3687 * semantic--tag-expanded-p: Misc Tag Internals. (line 37)
3688 * semantic--tag-get-property: Tag Properties Internals.
3690 * semantic--tag-link-cache-to-buffer: Misc Tag Internals. (line 33)
3691 * semantic--tag-link-list-to-buffer: Misc Tag Internals. (line 25)
3692 * semantic--tag-link-to-buffer: Misc Tag Internals. (line 16)
3693 * semantic--tag-put-property: Tag Properties Internals.
3695 * semantic--tag-put-property-no-side-effect: Tag Properties Internals.
3697 * semantic--tag-run-hooks: Tag Hooks. (line 30)
3698 * semantic--tag-run-hooks <1>: Misc Tag Internals. (line 6)
3699 * semantic--tag-unlink-cache-from-buffer: Misc Tag Internals. (line 29)
3700 * semantic--tag-unlink-from-buffer: Misc Tag Internals. (line 11)
3701 * semantic--tag-unlink-list-from-buffer: Misc Tag Internals. (line 21)
3702 * semantic-adebug-analyze: App Debugger. (line 26)
3703 * semantic-adebug-bovinate: App Debugger. (line 19)
3704 * semantic-adebug-mode: App Debugger. (line 36)
3705 * semantic-adebug-new-buffer: App Debugger. (line 61)
3706 * semantic-adebug-searchdb: App Debugger. (line 22)
3707 * semantic-adopt-external-members: Tag Sorting. (line 42)
3708 * semantic-after-partial-cache-change-hook: Parser Hooks. (line 23)
3709 * semantic-after-toplevel-cache-change-hook: Parser Hooks. (line 8)
3710 * semantic-analyze-current-context: Context Analysis. (line 16)
3711 * semantic-analyze-possible-completions: Context Analysis. (line 29)
3712 * semantic-before-toplevel-cache-flush-hook: Parser Hooks. (line 39)
3713 * semantic-beginning-of-command: Blocks. (line 43)
3714 * semantic-beginning-of-context: Blocks. (line 23)
3715 * semantic-brute-find-first-tag-by-function: Deep Search. (line 142)
3716 * semantic-brute-find-first-tag-by-name: Deep Search. (line 6)
3717 * semantic-brute-find-innermost-tag-by-position: Deep Search. (line 67)
3718 * semantic-brute-find-tag-by-attribute: Deep Search. (line 30)
3719 * semantic-brute-find-tag-by-attribute-value: Deep Search. (line 42)
3720 * semantic-brute-find-tag-by-class: Deep Search. (line 81)
3721 * semantic-brute-find-tag-by-function: Deep Search. (line 121)
3722 * semantic-brute-find-tag-by-position: Deep Search. (line 56)
3723 * semantic-brute-find-tag-by-property: Deep Search. (line 19)
3724 * semantic-brute-find-tag-by-type: Deep Search. (line 108)
3725 * semantic-brute-find-tag-standard: Deep Search. (line 96)
3726 * semantic-bucketize: Tag Sorting. (line 22)
3727 * semantic-bucketize-tag-class: Tag Sorting. (line 33)
3728 * semantic-collector-abstract: Tag Collectors. (line 16)
3729 * semantic-collector-analyze-completions: Tag Collectors. (line 42)
3730 * semantic-collector-buffer-abstract: Tag Collectors. (line 21)
3731 * semantic-collector-buffer-deep: Tag Collectors. (line 31)
3732 * semantic-collector-project: Tag Collectors. (line 36)
3733 * semantic-collector-project-abstract: Tag Collectors. (line 25)
3734 * semantic-collector-project-brutish: Tag Collectors. (line 39)
3735 * semantic-complete-inline-analyzer: Tag Completion Convenience Functions.
3737 * semantic-complete-read-tag-analyzer: Tag Completion Convenience Functions.
3739 * semantic-complete-read-tag-buffer-deep: Tag Completion Convenience Functions.
3741 * semantic-complete-read-tag-engine: Custom Tag Completion Functions.
3743 * semantic-complete-read-tag-project: Tag Completion Convenience Functions.
3745 * semantic-ctxt-current-argument: Derived Context. (line 32)
3746 * semantic-ctxt-current-assignment: Derived Context. (line 19)
3747 * semantic-ctxt-current-class-list: Derived Context. (line 44)
3748 * semantic-ctxt-current-function: Derived Context. (line 25)
3749 * semantic-ctxt-current-symbol: Derived Context. (line 13)
3750 * semantic-ctxt-current-thing: Derived Context. (line 37)
3751 * semantic-ctxt-scoped-types: Derived Context. (line 52)
3752 * semantic-current-tag: Tags at Point. (line 49)
3753 * semantic-current-tag-parent: Tags at Point. (line 59)
3754 * semantic-dependency-include-path: Tag Details. (line 82)
3755 * semantic-dependency-tag-file: Tag Details. (line 98)
3756 * semantic-displayor-abstract: Tag Displayors. (line 18)
3757 * semantic-displayor-focus-abstract: Tag Displayors. (line 23)
3758 * semantic-displayor-tooltip: Tag Displayors. (line 41)
3759 * semantic-displayor-traditional: Tag Displayors. (line 30)
3760 * semantic-displayor-traditional-with-focus-highlight: Tag Displayors.
3762 * semantic-edits-are-safe: Editing Buffers. (line 9)
3763 * semantic-end-of-command: Blocks. (line 38)
3764 * semantic-end-of-context: Blocks. (line 29)
3765 * semantic-equivalent-tag-p: Tag Query. (line 18)
3766 * semantic-exit-on-input: Idle Scheduling. (line 54)
3767 * semantic-find-first-tag-by-name: Breadth Search. (line 10)
3768 * semantic-find-tag-by-overlay: Tags at Point. (line 14)
3769 * semantic-find-tag-by-overlay-in-region: Tags at Point. (line 29)
3770 * semantic-find-tag-by-overlay-next: Tags at Point. (line 41)
3771 * semantic-find-tag-by-overlay-prev: Tags at Point. (line 45)
3772 * semantic-find-tags-by-class: Breadth Search. (line 34)
3773 * semantic-find-tags-by-name: Breadth Search. (line 15)
3774 * semantic-find-tags-by-name-regexp: Breadth Search. (line 27)
3775 * semantic-find-tags-by-scope-protection: Specialty Search. (line 15)
3776 * semantic-find-tags-by-type: Breadth Search. (line 40)
3777 * semantic-find-tags-external-children-of-type: Specialty Search.
3779 * semantic-find-tags-for-completion: Breadth Search. (line 19)
3780 * semantic-find-tags-included: Breadth Search. (line 47)
3781 * semantic-find-tags-of-compound-type: Specialty Search. (line 10)
3782 * semantic-format-tag-abbreviate: Format Tag. (line 46)
3783 * semantic-format-tag-concise-prototype: Format Tag. (line 81)
3784 * semantic-format-tag-custom-list: Format Tag. (line 21)
3785 * semantic-format-tag-functions: Format Tag. (line 13)
3786 * semantic-format-tag-name: Format Tag. (line 35)
3787 * semantic-format-tag-prin1: Format Tag. (line 126)
3788 * semantic-format-tag-prototype: Format Tag. (line 68)
3789 * semantic-format-tag-summarize: Format Tag. (line 58)
3790 * semantic-format-tag-type: Format Tag. (line 137)
3791 * semantic-format-tag-uml-abbreviate: Format Tag. (line 92)
3792 * semantic-format-tag-uml-concise-prototype: Format Tag. (line 114)
3793 * semantic-format-tag-uml-prototype: Format Tag. (line 103)
3794 * semantic-get-all-local-variables: Local Variables. (line 26)
3795 * semantic-get-local-arguments: Local Variables. (line 16)
3796 * semantic-get-local-variables: Local Variables. (line 10)
3797 * semantic-go-to-tag: Tag Details. (line 116)
3798 * semantic-highlight-tag: Tag Highlighting. (line 6)
3799 * semantic-lex-catch-errors: Lexical Safety. (line 13)
3800 * semantic-mark-external-member-function: Tag Sorting. (line 66)
3801 * semantic-momentary-highlight-tag: Tag Highlighting. (line 21)
3802 * semantic-narrow-to-tag: Misc Tag Functions. (line 6)
3803 * semantic-orphaned-member-metaparent-type: Tag Sorting. (line 61)
3804 * semantic-parse-tree-needs-rebuild-p: Parser State. (line 13)
3805 * semantic-parse-tree-needs-update-p: Parser State. (line 10)
3806 * semantic-parse-tree-unparseable-p: Parser State. (line 16)
3807 * semantic-parse-tree-up-to-date-p: Parser State. (line 19)
3808 * semantic-prototype-file: Tag Details. (line 109)
3809 * semantic-read-function: Old Tag Completion. (line 23)
3810 * semantic-read-symbol: Old Tag Completion. (line 8)
3811 * semantic-read-type: Old Tag Completion. (line 29)
3812 * semantic-read-variable: Old Tag Completion. (line 17)
3813 * semantic-set-tag-face: Tag Highlighting. (line 33)
3814 * semantic-set-tag-folded: Tag Folding. (line 9)
3815 * semantic-set-tag-intangible: Tag Visible Properties.
3817 * semantic-set-tag-invisible: Tag Visible Properties.
3819 * semantic-set-tag-read-only: Tag Visible Properties.
3821 * semantic-tag: Creating Tags. (line 6)
3822 * semantic-tag-abstract-p: Tag Details. (line 43)
3823 * semantic-tag-add-hook: Tag Hooks. (line 12)
3824 * semantic-tag-attributes: Tag Attributes Internals.
3826 * semantic-tag-bounds: Tag Overlay. (line 23)
3827 * semantic-tag-buffer: Tag Overlay. (line 30)
3828 * semantic-tag-children-compatibility: Tag Query. (line 223)
3829 * semantic-tag-class: Tag Basics. (line 60)
3830 * semantic-tag-clone: Creating Tags. (line 86)
3831 * semantic-tag-code-detail: Tag Query. (line 205)
3832 * semantic-tag-components: Tag Query. (line 212)
3833 * semantic-tag-components <1>: Tag Members. (line 11)
3834 * semantic-tag-components-default: Tag Query. (line 219)
3835 * semantic-tag-components-with-overlays: Tag Overlay. (line 62)
3836 * semantic-tag-components-with-overlays <1>: Tag Members. (line 18)
3837 * semantic-tag-components-with-overlays-default: Tag Overlay. (line 76)
3838 * semantic-tag-copy: Creating Tags. (line 93)
3839 * semantic-tag-create-secondary-overlay: Tag Secondary Overlays.
3841 * semantic-tag-delete-secondary-overlay: Tag Secondary Overlays.
3843 * semantic-tag-docstring: Tag Query. (line 44)
3844 * semantic-tag-end: Tag Overlay. (line 17)
3845 * semantic-tag-external-member-children: Tag Members. (line 53)
3846 * semantic-tag-external-member-p: Tag Members. (line 35)
3847 * semantic-tag-faux-p: Tag Query. (line 32)
3848 * semantic-tag-file-name: Tag Overlay. (line 39)
3849 * semantic-tag-folded-p: Tag Folding. (line 14)
3850 * semantic-tag-function-arguments: Tag Query. (line 99)
3851 * semantic-tag-function-destructor-p: Tag Query. (line 65)
3852 * semantic-tag-function-parent: Tag Query. (line 140)
3853 * semantic-tag-function-throws: Tag Query. (line 73)
3854 * semantic-tag-get-attribute: Tag Attributes Internals.
3856 * semantic-tag-get-secondary-overlay: Tag Secondary Overlays.
3858 * semantic-tag-include-filename: Tag Query. (line 191)
3859 * semantic-tag-include-system-p: Tag Query. (line 183)
3860 * semantic-tag-intangible-p: Tag Visible Properties.
3862 * semantic-tag-invisible-p: Tag Visible Properties.
3864 * semantic-tag-leaf-p: Tag Details. (line 58)
3865 * semantic-tag-make-plist: Tag Properties Internals.
3867 * semantic-tag-modifiers: Tag Query. (line 81)
3868 * semantic-tag-name: Tag Basics. (line 51)
3869 * semantic-tag-named-parent: Tag Query. (line 134)
3870 * semantic-tag-new-code: Creating Tags. (line 81)
3871 * semantic-tag-new-function: Creating Tags. (line 27)
3872 * semantic-tag-new-include: Creating Tags. (line 60)
3873 * semantic-tag-new-package: Creating Tags. (line 71)
3874 * semantic-tag-new-type: Creating Tags. (line 39)
3875 * semantic-tag-new-variable: Creating Tags. (line 15)
3876 * semantic-tag-of-class-p: Tag Query. (line 29)
3877 * semantic-tag-of-type-p: Tag Query. (line 127)
3878 * semantic-tag-overlay: Tag Overlay. (line 45)
3879 * semantic-tag-p: Tag Query. (line 12)
3880 * semantic-tag-properties: Tag Properties Internals.
3882 * semantic-tag-protected-p: Tag Details. (line 28)
3883 * semantic-tag-protection: Tag Details. (line 9)
3884 * semantic-tag-put-attribute: Tag Attributes Internals.
3886 * semantic-tag-put-attribute-no-side-effect: Tag Attributes Internals.
3888 * semantic-tag-read-only-p: Tag Visible Properties.
3890 * semantic-tag-remove-hook: Tag Hooks. (line 19)
3891 * semantic-tag-secondary-overlays: Tag Secondary Overlays.
3893 * semantic-tag-set-bounds: Tag Overlay Internals.
3895 * semantic-tag-start: Tag Overlay. (line 10)
3896 * semantic-tag-static-p: Tag Details. (line 71)
3897 * semantic-tag-type: Tag Query. (line 121)
3898 * semantic-tag-type-compound-p: Tag Query. (line 36)
3899 * semantic-tag-type-interfaces: Tag Query. (line 161)
3900 * semantic-tag-type-members: Tag Query. (line 172)
3901 * semantic-tag-type-superclasses: Tag Query. (line 150)
3902 * semantic-tag-variable-constant-p: Tag Query. (line 57)
3903 * semantic-tag-variable-default: Tag Query. (line 110)
3904 * semantic-tag-with-position-p: Tag Overlay. (line 55)
3905 * semantic-texi-find-documentation: Tag Details. (line 129)
3906 * semantic-throw-on-input: Idle Scheduling. (line 44)
3907 * semantic-unhighlight-tag: Tag Highlighting. (line 14)
3908 * semantic-unique-tag-table: Tag Sorting. (line 13)
3909 * semantic-unique-tag-table-by-name: Tag Sorting. (line 18)
3910 * semantic-up-context: Blocks. (line 12)
3911 * semantic-with-buffer-narrowed-to-current-tag: Misc Tag Functions.
3913 * semantic-with-buffer-narrowed-to-tag: Misc Tag Functions. (line 22)
3914 * semantic-with-mode-bindings: Override Methods. (line 17)
3915 * semanticdb-brute-deep-find-tags-by-name: DB Basic Brute Search.
3917 * semanticdb-create-ebrowse-database: System Databases. (line 25)
3918 * semanticdb-create-system-database: System Databases. (line 41)
3919 * semanticdb-deep-find-tags-by-name: DB Basic Name Search.
3921 * semanticdb-deep-find-tags-by-name-regexp: DB Basic Name Search.
3923 * semanticdb-deep-find-tags-for-completion: DB Basic Name Search.
3925 * semanticdb-file-stream: Semanticdb in Programs.
3927 * semanticdb-file-table-object: Semanticdb in Programs.
3929 * semanticdb-find-default-throttle: DB Search Paths. (line 16)
3930 * semanticdb-find-result-length: DB Results. (line 42)
3931 * semanticdb-find-result-nth: DB Results. (line 45)
3932 * semanticdb-find-result-nth-in-buffer: DB Results. (line 53)
3933 * semanticdb-find-result-with-nil-p: DB Results. (line 32)
3934 * semanticdb-find-results-p: DB Results. (line 27)
3935 * semanticdb-find-table-for-include: DB Search Paths. (line 78)
3936 * semanticdb-find-tags-by-class: DB Basic Name Search.
3938 * semanticdb-find-tags-by-name: DB Basic Name Search.
3940 * semanticdb-find-tags-by-name-regexp: DB Basic Name Search.
3942 * semanticdb-find-tags-collector: DB Generic Brute Search.
3944 * semanticdb-find-tags-external-children-of-type: DB Advanced Search.
3946 * semanticdb-find-tags-for-completion: DB Basic Name Search.
3948 * semanticdb-find-translate-path: DB Search Paths. (line 50)
3949 * semanticdb-minor-mode-p: Semanticdb in Programs.
3951 * semanticdb-project-database-ebrowse: System Databases. (line 19)
3952 * semanticdb-project-database-emacs-lisp: System Databases. (line 14)
3953 * semanticdb-strip-find-results: DB Results. (line 16)
3954 * Tag Basics: Tag Basics. (line 6)
3955 * Tag Hooks: Tag Hooks. (line 6)
3956 * Tag Internals: Tag Internals. (line 6)
3957 * Tag Overlay: Tag Overlay. (line 6)
3958 * Tag Query: Tag Query. (line 6)
3964 Node: Semantic Tags
\7f2778
3965 Node: Tag Basics
\7f3361
3966 Ref: semantic-tag-name
\7f5754
3967 Ref: semantic-tag-class
\7f6211
3968 Node: Tag Query
\7f7673
3969 Ref: semantic-tag-p
\7f7968
3970 Ref: semantic-equivalent-tag-p
\7f8212
3971 Ref: semantic-tag-of-class-p
\7f8713
3972 Ref: semantic-tag-faux-p
\7f8800
3973 Ref: semantic-tag-type-compound-p
\7f8985
3974 Ref: semantic-tag-docstring
\7f9250
3975 Ref: semantic-tag-variable-constant-p
\7f9732
3976 Ref: semantic-tag-function-destructor-p
\7f10085
3977 Ref: semantic-tag-function-throws
\7f10432
3978 Ref: semantic-tag-modifiers
\7f10761
3979 Ref: semantic-tag-function-arguments
\7f11394
3980 Ref: semantic-tag-variable-default
\7f11760
3981 Ref: semantic-tag-type
\7f12125
3982 Ref: semantic-tag-of-type-p
\7f12366
3983 Ref: semantic-tag-named-parent
\7f12595
3984 Ref: semantic-tag-function-parent
\7f12879
3985 Ref: semantic-tag-type-superclasses
\7f13337
3986 Ref: semantic-tag-type-interfaces
\7f13793
3987 Ref: semantic-tag-type-members
\7f14239
3988 Ref: semantic-tag-include-system-p
\7f14586
3989 Ref: semantic-tag-include-filename
\7f14935
3990 Ref: semantic-tag-code-detail
\7f15487
3991 Ref: semantic-tag-components
\7f15684
3992 Ref: semantic-tag-components-default
\7f16062
3993 Ref: semantic-tag-children-compatibility
\7f16255
3994 Node: Tag Overlay
\7f16704
3995 Ref: semantic-tag-start
\7f17077
3996 Ref: semantic-tag-end
\7f17298
3997 Ref: semantic-tag-bounds
\7f17511
3998 Ref: semantic-tag-buffer
\7f17758
3999 Ref: semantic-tag-file-name
\7f18137
4000 Ref: semantic-tag-overlay
\7f18447
4001 Ref: semantic-tag-with-position-p
\7f18890
4002 Ref: semantic-tag-components-with-overlays
\7f19170
4003 Ref: semantic-tag-components-with-overlays-default
\7f19846
4004 Node: Tag Hooks
\7f20093
4005 Ref: semantic-tag-add-hook
\7f20523
4006 Ref: semantic-tag-remove-hook
\7f20927
4007 Ref: semantic--tag-run-hooks
\7f21459
4008 Node: Misc Tag Functions
\7f22433
4009 Ref: semantic-narrow-to-tag
\7f22647
4010 Ref: semantic-with-buffer-narrowed-to-current-tag
\7f22963
4011 Ref: semantic-with-buffer-narrowed-to-tag
\7f23296
4012 Node: Tag Internals
\7f23517
4013 Node: Tag Attributes Internals
\7f23788
4014 Ref: semantic-tag-attributes
\7f24031
4015 Ref: semantic-tag-get-attribute
\7f24865
4016 Ref: semantic-tag-put-attribute
\7f25619
4017 Ref: semantic-tag-put-attribute-no-side-effect
\7f26134
4018 Node: Tag Properties Internals
\7f26456
4019 Ref: semantic-tag-properties
\7f26707
4020 Ref: semantic--tag-put-property
\7f27050
4021 Ref: semantic--tag-get-property
\7f27477
4022 Ref: semantic--tag-put-property-no-side-effect
\7f27895
4023 Ref: semantic-tag-make-plist
\7f28485
4024 Node: Tag Overlay Internals
\7f29040
4025 Ref: semantic-tag-set-bounds
\7f29382
4026 Node: Creating Tags
\7f29449
4027 Ref: semantic-tag
\7f29674
4028 Ref: semantic-tag-new-variable
\7f30169
4029 Ref: semantic-tag-new-function
\7f30741
4030 Ref: semantic-tag-new-type
\7f31333
4031 Ref: semantic-tag-new-include
\7f32452
4032 Ref: semantic-tag-new-package
\7f32993
4033 Ref: semantic-tag-new-code
\7f33476
4034 Ref: semantic-tag-clone
\7f33730
4035 Ref: semantic-tag-copy
\7f34056
4036 Node: Misc Tag Internals
\7f34440
4037 Node: Searching Tag Tables
\7f36712
4038 Node: Breadth Search
\7f37584
4039 Ref: semantic-find-first-tag-by-name
\7f37978
4040 Ref: semantic-find-tags-by-name
\7f38255
4041 Ref: semantic-find-tags-for-completion
\7f38453
4042 Ref: semantic-find-tags-by-name-regexp
\7f38862
4043 Ref: semantic-find-tags-by-class
\7f39210
4044 Ref: semantic-find-tags-by-type
\7f39487
4045 Ref: semantic-find-tags-included
\7f39855
4046 Node: Deep Search
\7f39986
4047 Node: Specialty Search
\7f46887
4048 Ref: semantic-find-tags-of-compound-type
\7f47314
4049 Ref: semantic-find-tags-by-scope-protection
\7f47613
4050 Ref: semantic-find-tags-external-children-of-type
\7f48207
4051 Node: Custom Search
\7f48410
4052 Ref: semantic--find-tags-by-function
\7f48915
4053 Ref: semantic--find-tags-by-macro
\7f49177
4054 Node: Tags at Point
\7f49309
4055 Node: Tag Decoration
\7f52171
4056 Node: Tag Highlighting
\7f52781
4057 Ref: semantic-highlight-tag
\7f52979
4058 Ref: semantic-unhighlight-tag
\7f53269
4059 Ref: semantic-momentary-highlight-tag
\7f53546
4060 Ref: semantic-set-tag-face
\7f54074
4061 Node: Tag Visible Properties
\7f54278
4062 Ref: semantic-set-tag-invisible
\7f54725
4063 Ref: semantic-tag-invisible-p
\7f55035
4064 Ref: semantic-set-tag-intangible
\7f55302
4065 Ref: semantic-tag-intangible-p
\7f55745
4066 Ref: semantic-set-tag-read-only
\7f56142
4067 Ref: semantic-tag-read-only-p
\7f56504
4068 Node: Tag Secondary Overlays
\7f56725
4069 Ref: semantic-tag-create-secondary-overlay
\7f57504
4070 Ref: semantic-tag-delete-secondary-overlay
\7f57927
4071 Ref: semantic-tag-get-secondary-overlay
\7f58232
4072 Ref: semantic-tag-secondary-overlays
\7f58414
4073 Node: Tag Folding
\7f58986
4074 Ref: semantic-set-tag-folded
\7f59308
4075 Ref: semantic-tag-folded-p
\7f59531
4076 Node: Tag Sorting
\7f59575
4077 Ref: semantic-unique-tag-table
\7f60035
4078 Ref: semantic-unique-tag-table-by-name
\7f60300
4079 Ref: semantic-bucketize
\7f60485
4080 Ref: semantic-bucketize-tag-class
\7f61109
4081 Ref: semantic-adopt-external-members
\7f61637
4082 Ref: semantic-orphaned-member-metaparent-type
\7f62546
4083 Ref: semantic-mark-external-member-function
\7f62802
4084 Node: Tag Completion
\7f63359
4085 Node: Tag Completion Convenience Functions
\7f64386
4086 Ref: semantic-complete-read-tag-project
\7f65413
4087 Ref: semantic-complete-read-tag-analyzer
\7f66012
4088 Ref: semantic-complete-inline-analyzer
\7f66717
4089 Node: Custom Tag Completion Functions
\7f67099
4090 Ref: semantic-complete-read-tag-engine
\7f68064
4091 Node: Tag Collectors
\7f69770
4092 Ref: semantic-collector-abstract
\7f70317
4093 Ref: semantic-collector-buffer-abstract
\7f70560
4094 Ref: semantic-collector-project-abstract
\7f70721
4095 Ref: semantic-collector-buffer-deep
\7f70922
4096 Ref: semantic-collector-project
\7f71133
4097 Ref: semantic-collector-project-brutish
\7f71225
4098 Ref: semantic-collector-analyze-completions
\7f71321
4099 Node: Tag Displayors
\7f71565
4100 Ref: semantic-displayor-abstract
\7f72264
4101 Ref: semantic-displayor-focus-abstract
\7f72492
4102 Ref: semantic-displayor-traditional
\7f72743
4103 Ref: semantic-displayor-traditional-with-focus-highlight
\7f72998
4104 Ref: semantic-displayor-tooltip
\7f73309
4105 Node: Old Tag Completion
\7f73431
4106 Ref: semantic-read-symbol
\7f73770
4107 Ref: semantic-read-variable
\7f74228
4108 Ref: semantic-read-function
\7f74561
4109 Ref: semantic-read-type
\7f74888
4110 Node: Override Methods
\7f75146
4111 Ref: semantic-with-mode-bindings
\7f75906
4112 Node: Format Tag
\7f76477
4113 Ref: semantic-format-tag-functions
\7f77059
4114 Ref: semantic-format-tag-custom-list
\7f77508
4115 Ref: semantic-format-tag-name
\7f78171
4116 Ref: semantic-format-tag-abbreviate
\7f78740
4117 Ref: semantic-format-tag-summarize
\7f79386
4118 Ref: semantic-format-tag-prototype
\7f79904
4119 Ref: semantic-format-tag-concise-prototype
\7f80591
4120 Ref: semantic-format-tag-uml-abbreviate
\7f81141
4121 Ref: semantic-format-tag-uml-prototype
\7f81689
4122 Ref: semantic-format-tag-uml-concise-prototype
\7f82240
4123 Ref: semantic-format-tag-prin1
\7f82794
4124 Ref: semantic-format-tag-type
\7f83231
4125 Node: Tag Members
\7f83454
4126 Ref: semantic-tag-external-member-p
\7f84998
4127 Ref: semantic-tag-external-member-children
\7f85842
4128 Node: Tag Details
\7f86975
4129 Ref: semantic-tag-protection
\7f87321
4130 Ref: semantic-tag-protected-p
\7f88355
4131 Ref: semantic-tag-abstract-p
\7f88842
4132 Ref: semantic-tag-leaf-p
\7f89589
4133 Ref: semantic-tag-static-p
\7f90221
4134 Ref: semantic-dependency-include-path
\7f90780
4135 Ref: semantic-dependency-tag-file
\7f91463
4136 Ref: semantic-prototype-file
\7f91997
4137 Ref: semantic-go-to-tag
\7f92397
4138 Ref: semantic-texi-find-documentation
\7f93108
4139 Node: Making New Methods
\7f93524
4140 Ref: define-overload
\7f94056
4141 Ref: define-mode-local-override
\7f95284
4142 Node: Parser Features
\7f95878
4143 Node: Editing Buffers
\7f97062
4144 Node: Parser State
\7f97709
4145 Ref: semantic-parse-tree-needs-update-p
\7f98121
4146 Ref: semantic-parse-tree-needs-rebuild-p
\7f98241
4147 Ref: semantic-parse-tree-unparseable-p
\7f98359
4148 Ref: semantic-parse-tree-up-to-date-p
\7f98480
4149 Node: Parser Hooks
\7f98544
4150 Ref: semantic-after-toplevel-cache-change-hook
\7f98816
4151 Ref: semantic-after-partial-cache-change-hook
\7f99404
4152 Ref: semantic-before-toplevel-cache-flush-hook
\7f99996
4153 Node: Lexical Safety
\7f100324
4154 Ref: semantic-lex-catch-errors
\7f100819
4155 Node: Semantic Database
\7f101575
4156 Node: Semanticdb in Programs
\7f102439
4157 Ref: semanticdb-minor-mode-p
\7f102760
4158 Ref: semanticdb-file-stream
\7f103216
4159 Ref: semanticdb-file-table-object
\7f103558
4160 Node: Semanticdb Tag Queries
\7f103887
4161 Node: DB Results
\7f105834
4162 Ref: semanticdb-strip-find-results
\7f106414
4163 Ref: semanticdb-find-results-p
\7f106904
4164 Ref: semanticdb-find-result-with-nil-p
\7f107169
4165 Ref: semanticdb-find-result-length
\7f107643
4166 Ref: semanticdb-find-result-nth
\7f107731
4167 Ref: semanticdb-find-result-nth-in-buffer
\7f108110
4168 Node: DB Search Paths
\7f108397
4169 Ref: semanticdb-find-default-throttle
\7f109101
4170 Ref: semanticdb-find-translate-path
\7f110683
4171 Ref: semanticdb-find-table-for-include
\7f112183
4172 Node: DB Basic Name Search
\7f112584
4173 Ref: semanticdb-find-tags-by-name
\7f113133
4174 Ref: semanticdb-find-tags-by-name-regexp
\7f113478
4175 Ref: semanticdb-find-tags-for-completion
\7f113825
4176 Ref: semanticdb-find-tags-by-class
\7f114165
4177 Ref: semanticdb-deep-find-tags-by-name
\7f114517
4178 Ref: semanticdb-deep-find-tags-by-name-regexp
\7f114929
4179 Ref: semanticdb-deep-find-tags-for-completion
\7f115343
4180 Node: DB Basic Brute Search
\7f115654
4181 Ref: semanticdb-brute-deep-find-tags-by-name
\7f116060
4182 Node: DB Advanced Search
\7f116414
4183 Ref: semanticdb-find-tags-external-children-of-type
\7f117144
4184 Node: DB Generic Brute Search
\7f117412
4185 Ref: semanticdb-find-tags-collector
\7f118057
4186 Node: System Databases
\7f118443
4187 Ref: semanticdb-project-database-emacs-lisp
\7f118991
4188 Ref: semanticdb-project-database-ebrowse
\7f119123
4189 Ref: semanticdb-create-ebrowse-database
\7f119354
4190 Ref: semanticdb-create-system-database
\7f120074
4191 Node: Idle Scheduling
\7f120410
4192 Ref: define-semantic-idle-service
\7f121496
4193 Ref: semantic-throw-on-input
\7f122076
4194 Ref: semantic-exit-on-input
\7f122532
4195 Node: Example Programs
\7f123034
4196 Node: Current Context
\7f127211
4197 Node: Blocks
\7f127952
4198 Ref: semantic-up-context
\7f128494
4199 Ref: semantic-beginning-of-context
\7f129114
4200 Ref: semantic-end-of-context
\7f129420
4201 Ref: semantic-end-of-command
\7f129818
4202 Ref: semantic-beginning-of-command
\7f130058
4203 Node: Local Variables
\7f130260
4204 Ref: semantic-get-local-variables
\7f130649
4205 Ref: semantic-get-local-arguments
\7f130965
4206 Ref: semantic-get-all-local-variables
\7f131552
4207 Node: Derived Context
\7f131919
4208 Ref: semantic-ctxt-current-symbol
\7f132507
4209 Ref: semantic-ctxt-current-assignment
\7f132797
4210 Ref: semantic-ctxt-current-function
\7f133114
4211 Ref: semantic-ctxt-current-argument
\7f133526
4212 Ref: semantic-ctxt-current-thing
\7f133734
4213 Ref: semantic-ctxt-current-class-list
\7f134117
4214 Ref: semantic-ctxt-scoped-types
\7f134559
4215 Node: Context Analysis
\7f134886
4216 Ref: semantic-analyze-current-context
\7f135657
4217 Ref: semantic-analyze-possible-completions
\7f136307
4218 Node: Analysis Overview
\7f137388
4219 Node: Analysis Objects
\7f138879
4220 Node: Completion Overview
\7f139060
4221 Node: App Debugger
\7f139221
4222 Ref: semantic-adebug-bovinate
\7f139928
4223 Ref: semantic-adebug-searchdb
\7f140042
4224 Ref: semantic-adebug-analyze
\7f140184
4225 Ref: semantic-adebug-mode
\7f140445
4226 Ref: semantic-adebug-new-buffer
\7f141074
4227 Node: GNU Free Documentation License
\7f141354
4228 Node: Index
\7f161002