Initial Commit
[packages] / xemacs-packages / semantic / doc / internals.texi
1 @ignore
2 @node Semantic Internals
3 @chapter Semantic Internals
4 @c This 'ignore' section fools texinfo-all-menus-update into creating
5 @c proper menus for this chapter.
6 @end ignore
7
8 This chapter explains the internals of @semantic{}.
9 This information would not be needed by neither application developers
10 nor grammar developers.
11
12 It would be useful mostly for the hackers who would like to learn
13 more about how @semantic{} works.
14
15 @section Semanticdb
16
17 @acronym{Semanticdb} complexity is certainly an issue.  It is a rather
18 hairy problem to try and solve.
19
20 This is just an overview really.  The basic organization is this:
21
22 @table @file
23 @item semanticdb.el
24 Defines a @dfn{database} and a @dfn{table} base class.  You can
25 instantiate these classes, and use them, but they are not persistent.
26
27 This file also provides support for @code{semanticdb-minor-mode},
28 which automatically associates files with tables in databases so that
29 tags are @emph{saved} while a buffer is not in memory.
30
31 Lastly, it has that @dfn{root} stuff in it.  Basically, it is a system
32 by which a file can be associated with the root of a project, so if
33 you have a tree of directories and source files, it can find the root,
34 and allow a tag-search to span all available databases in that
35 directory hierarchy.
36
37 @item semanticdb-file.el
38 Subclass the base class database so that it can be saved to disk.
39 Implements all the hooks needed to unbind/rebind tags to a buffer
40 while writing them to a file.  Overrides various methods as necessary.
41
42 @item semanticdb-system.el
43 Subclass @code{semanticdb-file}.  Supports creating a @acronym{DB} in
44 a directory you do not have write-access to, and saving the cache in
45 your home directory.  Also implements a @acronym{C}/@acronym{C++}
46 subclass which can be used for caching @file{/usr/include}.  (A rather
47 slow process.)
48
49 @item semanticdb-el.el
50 Implements a different kind of @dfn{system} database that uses Emacs
51 internals to perform queries.  Sadly, this shows a problem of
52 nomenclature since it is not a @code{semanticdb-system-database}
53 (which saves to a file), but database with no file component that
54 queries system tags in a different way.
55
56 @item semanticdb-find.el
57 Infrastructure for searching groups @semantic{} databases, and dealing
58 with the search results format.
59 @end table
60
61 New things partly written, or to be written someday.
62
63 @table @file
64 @item semanticdb-postgres.el
65 Any @acronym{DB} would do, @acronym{MySQL} would be fine.  Basically write
66 tags into a relational database, and provide searching facilities.
67 This is probably the only way to allow fast look-ups in humongous
68 source areas.  Another possibility would be something like what
69 @acronym{Cscope} does.
70
71 @item semanticdb-java.el
72 A system database for @acronym{Java} that uses @acronym{JDEE}
73 @acronym{BeanShell} queries.
74
75 @item semanticdb-obj.el
76 A system database that uses command line tools to rip symbols out of
77 @file{.so}, or @file{.a}, or @file{.o} files, and translates into
78 tags.
79
80 @item semanticdb-javascript.el
81 A recent notion that somehow knows all those built-ins
82 @acronym{JavaScript} has.
83 @end table
84
85 @c  LocalWords:  Cscope JDEE BeanShell JavaScript MySQL Semanticdb