On 26 February 2012 16:33, klo uo klonuo@gmail.com wrote:
On Sun, Feb 26, 2012 at 4:47 AM, klo uo klonuo@gmail.com wrote:
I want to transfer custom .api file created for SciTE to Geany .tags file
I changed the file to confirm to Tagmanager format as described in documentation
Well I made a mistake, it's not Tagmanger format but pipe-separated format.
So I can't convert already made .api files, using this simple pipe-separated format and at the same time be useful, but I need to use Tagmanager format which is not described and it is generated by Geany from already prepared sources.
Yes, tagmanager format is not described because there is some dissatisfaction with tagmanager and when we have sufficient resources we would like to replace it. The format may then change (personally I hope to etags or ctags, but that depends on the implementation). So we do not want to be bound by a described tagmanager format.
But how can I find source that has all possible functions in it?
Tags are usually made from the language header files.
And this way it seems impossible to supply description text.
No, also the manual notes that it is ignored anyway.
Looking for ctags format, then etags format, I see they are not the same as Geany'. From provided .tags files I distil this scheme:
funtion {xCC} [2^(x)] {xCD} (**params) {xCF} Description
the 0xCC field is a type code, see [1] below the 0xCF field is labelled VAR_TYPE is the code, I'm not sure its a description?
All is fine except, [2^(x)] which seems like some kind of identifier, although I noticed number 131072 in php.tags which is not exponent of 2.
How can I know this number, so that I may create some Lua function to reparse my SciTE .api files to Geany .tags?
Its worth a try, but you might have to figure out how nested scopes are encoded to get the dialog.hr to work. Not sure though.
Cheers Lex
[1] type codes
tm_tag_undef_t = 0, /*!< Unknown type */ tm_tag_class_t = 1, /*!< Class declaration */ tm_tag_enum_t = 2, /*!< Enum declaration */ tm_tag_enumerator_t = 4, /*!< Enumerator value */ tm_tag_field_t = 8, /*!< Field (Java only) */ tm_tag_function_t = 16, /*!< Function definition */ tm_tag_interface_t = 32, /*!< Interface (Java only) */ tm_tag_member_t = 64, /*!< Member variable of class/struct */ tm_tag_method_t = 128, /*!< Class method (Java only) */ tm_tag_namespace_t = 256, /*!< Namespace declaration */ tm_tag_package_t = 512, /*!< Package (Java only) */ tm_tag_prototype_t = 1024, /*!< Function prototype */ tm_tag_struct_t = 2048, /*!< Struct declaration */ tm_tag_typedef_t = 4096, /*!< Typedef */ tm_tag_union_t = 8192, /*!< Union */ tm_tag_variable_t = 16384, /*!< Variable */ tm_tag_externvar_t = 32768, /*!< Extern or forward declaration */ tm_tag_macro_t = 65536, /*!< Macro (without arguments) */ tm_tag_macro_with_arg_t = 131072, /*!< Parameterized macro */ tm_tag_file_t = 262144, /*!< File (Pseudo tag) */ tm_tag_other_t = 524288, /*!< Other (non C/C++/Java tag) */ tm_tag_max_t = 1048575 /*!< Maximum value of TMTagType */