[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4. Semantic Internals

This chapter explains the internals of semantic. This information would not be needed by neither application developers nor grammar developers.

It would be useful mostly for the hackers who would like to learn more about how semantic works.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.1 Semanticdb

Semanticdb complexity is certainly an issue. It is a rather hairy problem to try and solve.

This is just an overview really. The basic organization is this:

`semanticdb.el'
Defines a database and a table base class. You can instantiate these classes, and use them, but they are not persistent.

This file also provides support for semanticdb-minor-mode, which automatically associates files with tables in databases so that tags are saved while a buffer is not in memory.

Lastly, it has that root stuff in it. Basically, it is a system by which a file can be associated with the root of a project, so if you have a tree of directories and source files, it can find the root, and allow a tag-search to span all available databases in that directory hierarchy.

`semanticdb-file.el'
Subclass the base class database so that it can be saved to disk. Implements all the hooks needed to unbind/rebind tags to a buffer while writing them to a file. Overrides various methods as necessary.

`semanticdb-system.el'
Subclass semanticdb-file. Supports creating a DB in a directory you do not have write-access to, and saving the cache in your home directory. Also implements a C/C++ subclass which can be used for caching `/usr/include'. (A rather slow process.)

`semanticdb-el.el'
Implements a different kind of system database that uses Emacs internals to perform queries. Sadly, this shows a problem of nomenclature since it is not a semanticdb-system-database (which saves to a file), but database with no file component that queries system tags in a different way.

`semanticdb-find.el'
Infrastructure for searching groups semantic databases, and dealing with the search results format.

New things partly written, or to be written someday.

`semanticdb-postgres.el'
Any DB would do, MySQL would be fine. Basically write tags into a relational database, and provide searching facilities. This is probably the only way to allow fast look-ups in humongous source areas. Another possibility would be something like what Cscope does.

`semanticdb-java.el'
A system database for Java that uses JDEE BeanShell queries.

`semanticdb-obj.el'
A system database that uses command line tools to rip symbols out of `.so', or `.a', or `.o' files, and translates into tags.

`semanticdb-javascript.el'
A recent notion that somehow knows all those built-ins JavaScript has.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by XEmacs shared group account on December, 19 2009 using texi2html 1.65.