The term keyctionary is made of the words keyword and dictionary. It denotes a dictionary storing names to be declared as keywords in the programming language the source code to be vahunzed is written in.
In this context, keyword means pretty much anything that is a
reserved word. In ANSI C, this for example applies to
while
, include
of #include
and
ul
of int sepp = 123ul
.
Compiler specific keywords like __inline__
or
far
are not stored in the keyctionary but rather in the
dignorary.
Normally, you do not need a keyctionary, as Vahunz already has internal ones, and decides which one to use depending on the programming language the source code is written in.
To find out the programming language used, Vahunz looks at the suffices of all files to be vahunzed. The following suffices are recognized:
Suffix | Language |
---|---|
c, h | C (both ANSI and K&R) |
c++, cpp, cxx, cc | C++ |
java | Java |
The suffix comparison is case insensitive.
The same programming language has to be used for all files. That means, you can not vahunz C and Java together, as C has reserved words Java does not have, and the other way round.
An exception of this is C and C++. If source codes in both languages show up, C++'s reserved words will be used even on the plain C sources.
Unfortunately, the internal keyctionaries for C++ and Java are not complete. That means, some reserved words are missing, and will show up in your vahunz.names when the source code is scanned.
That is no real problem, as you can easily put them into the
dignorary. Still, if you want Vahunz to improve in future versions,
you can create a file by default called vahunz.keywords
(depending on the value of --base-name
) and store all reserved
words there, with a period (.
) as vahunz mode.
Copies of all internal keyctionaries currently used by Vahunz can be found in the directory vahunz/keyctionary coming with the main archive. You can use them as a base for your additions, and later on send them to the author, so also the internal tables are updated in future versions.
To use one of these files, simply copy it to vahunz.keywords.
Different to the dignorary, the keyctionary is not rewritten by Vahunz after it has done its job. Therefor, lines starting with a period are only allowed in vahunz.keywords and nowhere else.
Keep in mind that this is only a workaround to make it easier for you to submit updated keyword dictionaries.